You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by John Cleary <jo...@innovit.com> on 2000/10/03 01:31:19 UTC
Using wildcards in the classpath
Hi people,
I'm writing my first build script and I'm starting to get frustrated
(mainly because of my own stupidity).
Is this a valid build.xml snippet?
<javac srcdir="${srcDir}" destdir="${buildDir}" target="1.2"
classpath="${libDir}/**">
It doesn't seem to expand out the classpath...
Any ideas?
John.
RE: Using wildcards in the classpath
Posted by Adam Murdoch <ad...@yahoo.com>.
Hi,
Patterns in the classpath attribute don't get expanded. You should use a
nested file set instead:
<javac srcdir="..." destdir="...">
<classpath>
<fileset dir="${libdir}"/>
</classpath>
</javac>
This'll pull everything under ${libdir} into the classpath. You might want
to qualify this with an includes or excludes attribute on the <fileset>
element if there's non-jar/zip files in there.
You'll need to be using ant 1.2 to do this. Grab one of the nightly builds
if you're using something older
Adam
> -----Original Message-----
> From: johnc [mailto:johnc]On Behalf Of John Cleary
> Sent: Tuesday, 3 October 2000 9:31 AM
> To: ant-user@jakarta.apache.org
> Subject: Using wildcards in the classpath
>
>
> Hi people,
>
> I'm writing my first build script and I'm starting to get frustrated
> (mainly because of my own stupidity).
>
> Is this a valid build.xml snippet?
>
> <javac srcdir="${srcDir}" destdir="${buildDir}" target="1.2"
> classpath="${libDir}/**">
>
> It doesn't seem to expand out the classpath...
>
> Any ideas?
>
> John.
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com