Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2005

Tip: Looking for answers? Try searching our database.

Calling 1 ant routine inside another - path issue.

Thread view: 
Piper707@hotmail.com - 23 Nov 2005 09:11 GMT
Hi,

I need to execute a different ant routine (build2.xml) inside my
build1.xml.

This is my directory structure:

Parent/source/myproject/Human/Man/John/Peter/build1.xml (current)

Parent/source/myproject/Human/Man/build2.xml (different routine)

i.e The ant routine that I need to call inside my build1.xml, is
located 2 levels above it.

I'm not sure how to refer to build2.xml, can this be done? How can I
have a property in build1.xml tell me the location of "Man" directory,
so that I can call the build2.xml routine?

>From build1.xml's point of view, it can only see everything from
"Peter" onwards. (basedir="." in build1.xml)

//build1.xml - call to 2nd ant routine
<ant antfile="${**location of Man**}/build2.xml target="compile"
dir="xyz" />

1)  **location of Man** = ?

2) Can I set any windows variables that ant may read when executed from
the command line to figure out the path to "Man"?

3) Any other solutions?

Thanks for any help
Rohit.
Piper707@hotmail.com - 23 Nov 2005 11:05 GMT
Figured it out, this was easier than I thought.  All it takes is a
property to point 'x' levels up:

<property name ="root.dir" value="../../" />

just wasn't sure if ../../ would be understood.

I'd still like to hear about any possibilities of picking up these
paths from Windows system properties at ant runtime.

Thanks
Rohit.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.