Java Mailing List Archive

Apache Ant Archive

» Ant Users List
» Ant Developers List
ant -lib seems not working on Linux RHEL 5

ant -lib seems not working on Linux RHEL 5

2007-07-03       - By Vladimir Egorov
Reply:     1     2     3  

Hi Ant Users,

The Ant -lib option does not seem working on Linux RHEL 5.

I am in a directory, where I have ant-contrib-1.0b2.jar and the
following t.xml.

$ cat t.xml
 <taskdef resource="net/sf/antcontrib/antlib.xml" />
 <if><istrue value="true"/>
   <then><echo message="it works!"/></then>

I run this using the -lib option.

$ ant -lib ant-contrib-1.0.b2 -f t.xml
Buildfile: t.xml
 [taskdef] Could not load definitions from resource
net/sf/antcontrib/antlib.xml. It could not be found.

 ... Could not create task or type of type: if.

The above t.xml works on a different platform.

Thank you,


P.S. If I explicitly specify classpath in taskdef, it works on Linux

$ cat t.xml
 <taskdef resource="net/sf/antcontrib/antlib.xml"
 <if><istrue value="true"/>
   <then><echo message="it works!"/></then>

$ ant -f t.xml
Buildfile: t.xml
    [echo] it works!


Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or legally
privileged, and is intended solely for the use of the individual or entity
named in this message. If you are not the intended recipient, and have received
this message in error, please immediately return this by email and then delete

To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 - Jax Systems, LLC, U.S.A.