Ant compiles, but not class files

I pulled out an old Java application project from svn and I have a royal pain to compile it correctly with ANT. ANT claims that "BUILD SUCCESSFUL" does not contain class files.

build.xml

<?xml version="1.0" encoding="UTF-8"?> <project basedir="." default="all" name="myproj"> <property environment="env" /> <property name="src.dir" value="${basedir}/src" /> <property name="bin.dir" value="${basedir}/bin" /> <property name="lib.dir" value="${basedir}/lib" /> <property name="cache.dir" value="${bin.dir}/.cache" /> <property name="config.dir" value="${basedir}/config" /> <property name="data.dir" value="${basedir}/data" /> <property name="images.dir" value="${data.dir}/images" /> <property name="doc.dir" value="${basedir}/docs" /> <property name="install.dir" value="${env.JAVA_APPS}/myproj" /> <property name="debug.flag" value="on" /> <echo> ${ant.project.name}</echo> <echo> Ant version: ${ant.version}</echo> <echo> Ant Java version: ${ant.java.version}</echo> <echo> Java version: ${java.version}</echo> <!-- ********************************************************************** compile, compile the source *********************************************************************** --> <target name="compile" depends="prepare"> <depend srcdir="${src.dir}" destdir="${bin.dir}" cache="${cache.dir}" closure="yes"/> <javac destdir="${bin.dir}" debug="${debug.flag}" deprecation="on" fork="false" includeantruntime="false"> <src path="${src.dir}"/> <classpath refid="classpath"/> </javac> </target> </project> 

Compile:

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 

Create successful but not class files in the bin directory.

 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 files found, hmmm ..., I tried several different configurations and still nothing. Any help is appreciated. thanks!

+5
source share

Source: https://habr.com/ru/post/1202387/


All Articles