• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Ant contrib pathelement

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello again,

I'm using antcontrib and I'm trying to setup the location of its lib in a custom location say /home/lxu/lib/ant-contrib.jar, so in my build.xml I define...

<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="/home/lxu/lib/ant-contrib.jar"/>
</classpath>
</taskdef>

This works fine. Now, I'm trying to name the location path into a build.properties file say

antcontrib.lib=/home/lxu/lib

so in my build.xml I have

<property file="build.properties" />
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="${antcontrib.lib}/ant-contrib.jar"/>
</classpath>
</taskdef>

as soon as I did that, I'm getting "could not create task or type of type:foreach. Ant could not find the task or a class this task relies upon"

please help. thanks.
 
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why don't you just copy ant-contrib.jar to your ant*/lib directory, save your all the trouble and time to solve more important problems? That is also the exact place it is supposed to be.

Don't trouble troubles until trouble troubles you.
[ April 26, 2005: Message edited by: Roseanne Zhang ]
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Seems to me like it should work.

Run Ant using the -verbose option and see wether it tells you anything usefull about where it tries to find the jar file. Perhaps you have a typo somewhere...
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic