Ant and classpaths

E

Elisa

Hi,

With ANT you can easily set up different classpaths structures. You can
also re-use classpaths to create other classpaths. But is there a way to
verify that you yourself and ANT have to same idea what jars and
directories are contained in one particular classpath?

I tried using ANT with the -verbose and -debug flags, but neither print
out the actual classpath used by for example a "java" or "javac" task. I
also tried something like <echo message="${my.classpath}"/>, where
my.classpath is the id I assigned to a classpath structure, but that
didn't work either.

In short, I've been looking all day to figure out if the classpath I
constructed in my build.xml file is actually what I think it should be,
but I can't find a way to verify it. Any help?


Thanks,

Elisa
 
P

Pete Gieser

Elisa said:
Hi,

With ANT you can easily set up different classpaths structures. You can
also re-use classpaths to create other classpaths. But is there a way to
verify that you yourself and ANT have to same idea what jars and
directories are contained in one particular classpath?

I tried using ANT with the -verbose and -debug flags, but neither print
out the actual classpath used by for example a "java" or "javac" task. I
also tried something like <echo message="${my.classpath}"/>, where
my.classpath is the id I assigned to a classpath structure, but that
didn't work either.

In short, I've been looking all day to figure out if the classpath I
constructed in my build.xml file is actually what I think it should be,
but I can't find a way to verify it. Any help?

Try this:

<property name="print.classpath" refid="my.classpath" />
<echo message="${print.classpath}" />

Pete
 
E

Elisa

Hi Pete,

Thanks, you're a gem! You wouldn't believe how long I've been trying to
figure that one out myself :-(


Regards,

Elisa
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top