ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vasco Lemoine <vasco.lemo...@imc.nl>
Subject Ivy triggers and scope of properties
Date Thu, 17 Jan 2008 15:43:55 GMT
Hi,

I'm struggling with a problem concerning ivy triggers. What I want to is
the following. As a in a pre-resolve trigger i want to concatenate the
module that are resolve (transitively).

this is in my ivy-setting.xml

<triggers>
	<ant-call target="ivy-pre-resolve-dependency" prefix="dep"
	          event="pre-resolve-dependency" />
</triggers>  

this is in my build file:

<property name="foo" value="" />

<target name="ivy-pre-resolve-dependency">
<echo>foo=${foo}</echo>
<var name="bar" value="${foo}"/>
<echo>bar=${bar}</echo>
<if>
<length string="${bar}"when="greater"length="0" />
<then>	
  <var name="bar"value="${bar},{dep.module}" />				
</then>
<else>
  <var name="bar" value="${dep.module}" />	
</else>
</if>
<propertycopy name="foo" from="bar" override="true"/>
<echo>
  module=${dep.module}
  bar=${bar} 
  foo=${foo} 
</echo>
</target>



output is:(having declared dependency: this->module1->module2)

foo=
bar=
module=module1
bar=module1
foo=module1

foo=
bar=
module=module2
bar=module2
foo=module2

instead of:

foo=
bar=
module=module1
bar=module1
foo=module1

foo=module1
bar=module1
module=module2
bar=module1,module2
foo=module1,module2

Is there some way of getting variables or properties to the scope from
which the trigger was generated.

By the way the var and propertycopy are from the antcontrib library.

Thanx Vasco





Mime
View raw message