Calling 1 ant routine inside another - path issue.

P

Piper707

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.
 
P

Piper707

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top