ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn <javajun...@koyuru.com>
Subject Lost Property Value
Date Fri, 15 Aug 2003 03:47:13 GMT
Hello,

Am I losing a property value or can the value of a property set in one 
target (called as a depends) not be used in another?

For instance,

my build target depends on  a get_pass target which has: 		<exec 
executable="gpg" outputproperty="the_value">
		<echo>the_value in get_pass=${the_value}

and my output is:
		get_pass:
     			[echo] the_value in get_pass=testtest

testtest is the correct value that should be returned by ${the_value}, so 
far so good.

but then build uses a target which is called via a foreach task that has:

		<echo>the_value seems lost here:${the_value}</echo>

and results in:

		gpg.target:

			[echo] the_value seems lost here:${the_value}

Is this how Ant is supposed to behave, is this due to the alpha status of 
1.6, is this a bug in the ant-contrib (ie foreach task) side of things?  Is 
there anything I can do?


--------------------below are build and gpg.target targets ----------------- 
-


	<target name="build" depends="get_pass">
		<foreach target="gpg.target" param="gpg.param" delimiter=" ">
		<fileset refid="fs"/>
		</foreach>
		<echo>(in build) for file in:${gpg.param}</echo>
	</target>
 	
	
	 	 	<target name="gpg.target">
		<echo>(in gpg.target) for file:${gpg.param}</echo>
		<echo>the_value:${the_value}</echo>
		<exec executable="gpg" os="RH Linux" errorproperty="none" 
inputstring="${the_value}">
			<arg value="--symmetric"/>
			<arg value="--force-mdc"/>
			<arg value="--ignore-mdc-error"/>
			<arg value="--passphrase-fd"/>
			<arg value="0"/>
			<arg value="${gpg.param}"/>
		</exec>
		 		<echo>the_value seems lost here:${the_value}</echo>
	 	</target>
	

</project>
-- 
Shawn

Happily using M2, Opera's revolutionary e-mail client: 
http://www.opera.com/m2/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message