ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From One Way <oneway_...@yahoo.com>
Subject <javac> compiles files with no changes
Date Tue, 06 Feb 2001 15:01:18 GMT
Hi,

For some reason, <javac> task appears to recompile a set of files twice
even though no changes were made to the source files.

Any ideas? Thanks for any suggestions.

-----------------------------------------------------------

The tasks were defined as follows, "test2" compiles the same files that
have benn already compiled by "test1" for the second time ... why?

  <target name="test1" depends="prepare,check_for_optional_packages">
    <javac srcdir="${cms.java.dir}/cmscontroller"
           destdir="${build.ejb.dir}"
           debug="on"
           deprecation="off"
           optimize="on" >
      <classpath refid="cms.classpath.javac" />
      <include name="*.java"/>
    </javac>
  </target>

  <target name="test2">
    <javac srcdir="${cms.java.dir}/cmscontroller"
           destdir="${build.ejb.dir}"
           debug="on"
           deprecation="off"
           optimize="on" >
      <classpath refid="cms.classpath.javac" />
      <include name="*.java"/>
    </javac>
  </target>

  <target name="test3" depends="test1,test2">
	<echo> message="test1 and test2 done"</echo>
  </target>

-----------------------------------------------------------
Ant's output (slightly edited for shortness) is as follows:

Build sequence for target `test3' is [prepare,
check_for_optional_packages, test1, test2, test3]
Complete build sequence is [prepare, check_for_optional_packages,
test1, test2, test3]
java.lang.ClassNotFoundException: junit.framework.TestCase
java.lang.ClassNotFoundException: com.oroinc.net.ftp.FTPClient
Compiling 3 source files to D:devcmsuildejb
Using modern compiler
Compilation args: -d D:devcmsuildejb -classpath
D:devcmsuildejb;D:Appsjdk1.3lib
ools.jar;D:Appsj2sdkee1.21libj2ee.jar;D:Appswls60libweblogic_sp.jar;D:Appswls60libweblogic.jar;D:Appsantlibant.jar;D:Appsantlibjaxp.jar;D:Appsantlibparser.jar
-sourcepath D:devcmsjavacomoppencmscmscontroller -g -O
Files to be compiled:
    D:devcmsjavacmscontrollerCmsController.java
    D:devcmsjavacmscontrollerCmsControllerEJB.java
    D:devcmsjavacmscontrollerCmsControllerHome.java

Compiling 3 source files to D:devcmsuildejb
Using modern compiler
Compilation args: -d D:devcmsuildejb -classpath
D:devcmsuildejb;D:Appsjdk1.3lib
ools.jar;D:Appsj2sdkee1.21libj2ee.jar;D:Appswls60libweblogic_sp.jar;D:Appswls60libweblogic.jar;D:Appsantlibant.jar;D:Appsantlibjaxp.jar;D:Appsantlibparser.jar
-sourcepath D:devcmsjavacomoppencmscmscontroller -g -O
Files to be compiled:
---> Why are the files compiled for the second time???
    D:devcmsjavacmscontrollerCmsController.java
    D:devcmsjavacmscontrollerCmsControllerEJB.java
    D:devcmsjavacmscontrollerCmsControllerHome.java

 message="test1 and test2 done"

BUILD SUCCESSFUL


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/

Mime
View raw message