Only a guess, but it looks like the class files for each of the compile
targets go in the same directory. Javac will use that directory to resolve
class files it needs as well as the classpath.

HTH Bill 

-----Original Message-----
From: Barak Yaish [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 29, 2005 7:02 AM
To: user@ant.apache.org
Subject: Debug javac task

Hi,
 
I've a javac target which behave strange. It seems compiling successfully
code modules, which contains imports statements to files not found in the
classpath.
Here are some snippets:
 
<target name=debug" depends="compile_1, compile_2, compile_3"/>
 
<target name="compile_1">
            <javac srcdir="${dir1}" destdir="${output}"
                        <classpath>
            <pathelement location="${jars}/jar_x.jar"/> </classpath>
</javac> </target>
 
<target name="compile_2">
            <javac srcdir="${dir2}" destdir="${output}"
                        <classpath>
            <pathelement location="${jars}/jar_y.jar"/> </classpath>
</javac> </target>
 
<target name="compile_3">
            <javac srcdir="${dir3}" destdir="${output}"
                        <classpath>
            <pathelement location="${jars}/jar_x.jar"/>
            <pathelement location="${jars}/jar_1.jar"/> <!-- this is a jar
contains classes of  "compile_1" target --> </classpath> </javac> </target>
 
Today, I found that the code being compiled in "compile_3" contains java
import statements to java files belong to the module compiled in
"compile_2", BUT, the jar of classes of "compile_2" is NOT found in the
classpath!...
 
What's wrong with the way I wrote the target? Can I echo the classpath the
target used to verify which jars are found in the classpath?
 
Thanks a lot,
 
Barak.
 
 
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to