ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jamie Lawrence <>
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?


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

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

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

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

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

View raw message