The handy, dandy ant task is the ticket. This from
ant.apache.org/manual.
<ant antfile="subproject/subbuild.xml" target="compile"/>
<ant dir="subproject"/>
<ant antfile="subproject/property_based_subbuild.xml">
<property name="param1" value="version 1.x"/>
<property file="config/subproject/default.properties"/>
</ant>
<ant inheritAll="false" antfile="subproject/subbuild.xml">
<property name="output.type" value="html"/>
</ant>
These lines invoke the same build file:
<ant antfile="sub1/sub2/build.xml" />
<ant antfile="sub2/build.xml" dir="sub1" />
<ant antfile="build.xml" dir="sub1/sub2" />
The build file of the calling project defines some <path> elements like
this:
<path id="path1">
...
</path>
<path id="path2">
...
</path>
and the called build file (subbuild.xml) also defines a <path> with the
id path1, but path2 is not defined:
<ant antfile="subbuild.xml" inheritrefs="true"/>
will not override subbuild's definition of path1, but make the parent's
definition of path2 available in the subbuild.
<ant antfile="subbuild.xml"/>
as well as
<ant antfile="subbuild.xml" inheritrefs="false"/>
will neither override path1 nor copy path2.
<ant antfile="subbuild.xml" inheritrefs="false">
<reference refid="path1"/>
</ant>
will override subbuild's definition of path1.
<ant antfile="subbuild.xml" inheritrefs="false">
<reference refid="path1" torefid="path2"/>
</ant>
will copy the parent's definition of path1 into the new project using
the id path2.
-----Original Message-----
From: Sayed, Irfan (Irfan) [mailto:[EMAIL PROTECTED]
Sent: Friday, October 05, 2007 6:46 AM
To: Ant Users List
Subject: Calling another ant script
Hi All,
I need to call one ant script from another ant script. Can somebody
please tell me how to do that.
Regards
Irfan.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]