我已经从svn中提取了一个旧的java应用程序项目,并且我很痛苦地使用ANT正确编译它.ANT声称"建立成功",但没有类文件.
build.xml文件:
${ant.project.name} Ant version: ${ant.version} Ant Java version: ${ant.java.version} Java version: ${java.version}
编译:
t1 @ hostname1(/ export/t1/JAVA)$ ant -verbose compile
ant -verbose compile Apache Ant(TM) version 1.8.2 compiled on December 20 2010 Trying the default build file: build.xml Buildfile: /export/t1/JAVA/build.xml Detected Java version: 1.7 in: /usr/java/jdk1.7.0_11/jre Detected OS: Linux parsing buildfile /export/t1/JAVA/build.xml with URI = file:/export/t1/JAVA/build.xml Project base dir set to: /export/t1/JAVA parsing buildfile jar:file:/export/t1/FOSS/apache-ant-1.8.2/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/export/t1/FOSS/apache-ant-1.8.2/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file [property] Loading Environment env. [echo] myproj [echo] Ant version: Apache Ant(TM) version 1.8.2 compiled on December 20 2010 [echo] Ant Java version: 1.7 [echo] Java version: 1.7.0_11 Build sequence for target(s) `compile' is [init, prepare, compile] Complete build sequence is [init, prepare, compile, mklib, all, install, clean] ... compile: [javac] com/gis/GISUtils.java added as com/gis/GISUtils.class doesn't exist. [javac] com/gis/advisory/Advisory.java added as com/gis/advisory/Advisory.class doesn't exist. [javac] com/gis/application/TabbedApplication.java added as com/gis/application/TabbedApplication.class doesn't exist. [javac] ... 874 files remaining removed for brevity [javac] Compiling 877 source files to /export/t1/JAVA/bin [javac] Using modern compiler [javac] Compilation arguments: [javac] '-deprecation' [javac] '-d' [javac] '/export/t1/JAVA/bin' [javac] '-classpath' [javac] '< list of all my jars ...>' [javac] '-sourcepath' [javac] '/export/t1/JAVA/src' [javac] '-g' [javac] [javac] The ' characters around the executable and arguments are [javac] not part of the command. [javac] Files to be compiled: [javac] /export/t1/JAVA/src/com/gis/GISUtils.java [javac] /export/t1/JAVA/src/com/gis/advisory/Advisory.java [javac] /export/t1/JAVA/src/com/gis/application/TabbedApplication.java [javac] ... 874 files remaining removed for brevity BUILD SUCCESSFUL Total time: 4 seconds
在bin目录中构建成功但没有类文件.
t1@hostname1(/export/t1/JAVA)$ ll bin/ total 12K drwxrwxr-x. 3 t1 t1 4.0K Sep 11 22:32 . drwxrwxr-x. 9 t1 t1 4.0K Sep 11 22:30 .. drwxrwxr-x. 2 t1 t1 4.0K Sep 11 22:32 .cache
找到java文件,嗯......,我尝试了几种不同的配置,但仍然没有.任何帮助表示赞赏.谢谢!