This discussion is archived
0 Replies Latest reply: Aug 20, 2008 6:01 AM by 843804 RSS

Java 6 upgrade -- ant replicating class files on compilation

843804 Newbie
Currently Being Moderated
On upgradation to java 6 , ant seems to replicated class files
which have already been compiled into jars (which i have mentioned in classpath).

This is the ant script

<javac srcdir="src" destdir="/WEB-INF/classes" classpath="${library.jar}" deprecation="on" debug="true">

<classpath refid="library.classpath"/>
     <include name="com/test1/webapp/common/**/*.java"/>


library.classpath contains path to library.jar
The above script works perfectly for java 5 but not for java 6.

The problem is that classes in the folder com/test1 are getting recompiled to WEB-INF/classes, when the classes were already in compiled to library.jar (which is in classpath).

Is there a solution to this problem?