ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jamie Lawrence <jamie.lawre...@broadcom.ie>
Subject Properties not set properly after <antcall>
Date Wed, 27 Jun 2001 10:07:31 GMT
Why do properties in a target only get set if the target is called from the
cmd-line or init, but aren't set when called using antcall?

For example, if I call "ant pc compile" everything work fine (the pc target
sets a property pc, compile then calls the pc.xml file and if the pc
property is set execute the compile target there).  However, when I call
"ant all compile" the pc property isn't set!

Script extracts below.  Odd?

Jamie


---------------------------------------------------------
in build.xml...
<target name="all">
	<antcall target="pc"/>
	<antcall target="palm"/>
	<antcall target="compile"/>
</target>

<target name="pc">
	<property name="pc" value="true"/>
	<echo>PC Property set</echo>
</target>

<target name="palm">
	<property name="palm" value="true"/>
</target>

<target name="compile">
	<ant antfile="pc.xml" target="compile" dir="${root}"/>
	<ant antfile="palm.xml" target="compile" dir="${root}"/>
</target>

---------------------------------------------------------
in pc.xml...
<target name="compile" if="pc" >
	<echo>Called PC compile</echo>
</target>


Mime
View raw message