This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Setting PATH inside ANT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Setting PATH inside ANT" Watch "Setting PATH inside ANT" New topic

Setting PATH inside ANT

Jithesh Kozhipurath
Ranch Hand

Joined: Aug 27, 2003
Posts: 76
I have some java tasks inside ant, which access some property files from the application root folder. But my build file is not in the application root. How can I set the path to application root inside the build file. Is it possible to access those files by setting the path, because the path is relative.
Thanks in advance,

Jithesh K
Amber Vaidya
Ranch Hand

Joined: Oct 14, 2003
Posts: 42
You can set path using something like
<path id="classpath">
<fileset dir="${application.path}>
<include name="**/*.properties" />
And then use it as
<path refid="classpath" />
Consider Paul's rocket mass heater.
subject: Setting PATH inside ANT
Similar Threads
context.xml + Help Needed
import to eclipse
Setting build path to an EAR
change context-root in application.xml at runtime
Do we have Application specific class-path?