Java 项目中的 build.xml [英] build.xml in Java project
问题描述
build.xml
文件是什么?
我想知道是否可以使用这个 build.xml
在 Eclipse 或 Netbeans 中导入这个项目.我尝试导入该项目,但出现了一些错误,因为其中一部分是使用 J2ME 创建的,而另一部分是使用 J2SE 创建的,我猜这个文件应该是配置.
I was wondering if it is a possibility to import this project in Eclipse or Netbeans using this build.xml
. I tried to import the project but I get some errors since one part is created using J2ME and the other J2SE and I guess this file should be the configuration.
推荐答案
build.xml
通常是一个 ant 构建脚本.
build.xml
usually is an ant build script.
它包含构建项目以产生所需输出所需的信息,无论是 Javadoc、已编译的项目还是 JAR 文件.
It contains information necessary to build the project to produce the desired output, be it Javadocs, a compiled project, or a JAR file.
我相信 Eclipse 内置了 ant,因此应该可以通过选择Run As..."和Ant Build"来执行 build.xml
.
I believe Eclipse has ant built-in, so it should be possible to execute the build.xml
by choosing "Run As..." and "Ant Build".
build.xml
文件,如果是 ant 脚本,则不用于将项目导入 IDE(如 Eclipse 或 Netbeans).构建脚本用于构建项目(或生成一些所需的输出),而不是将项目导入 IDE 的机制.
The build.xml
file, if it is an ant script, is not used to import the project into an IDE like Eclipse or Netbeans. A build script is used to build the project (or produce some desired output) rather than an mechanism for importing the project into an IDE.
这篇关于Java 项目中的 build.xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!