maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dan tran <dant...@gmail.com>
Subject Re: exec resultproperty only set once
Date Mon, 09 May 2005 20:44:31 GMT
thanks for the tip

-D

On 5/9/05, Damien Bargiacchi <dbargiacchi@boats.com> wrote:
> I figured out a workaround. On each loop, I generated a new property name
> and stored the results there.
> 
> In my loop I have something like this"
> 
> <j:forEach items="${item_list}" var="cur" indexVar="num">
>        <j:set var="test_res_prop_name" value="testTrans_res_${num}"/>
>        <j:set var="test_out_prop_name" value="testTrans_out_${num}"/>
>        <j:set var="test_err_prop_name" value="testTrans_err_${num}"/>
>                <exec executable="ssh"
> outputproperty="${test_out_prop_name}"
> 
> errorproperty="${test_err_prop_name}"
> 
> resultproperty="${test_res_prop_name}">
>                        <!--...-->
>                </exec>
>                <echo message="Return Code:
> ${context.getVariable(test_res_prop_name)}"/>
>                <echo message="    Std Out:
> ${context.getVariable(test_out_prop_name)}"/>
>                <echo message="    Err Out:
> ${context.getVariable(test_err_prop_name)}"/>
> </j:forEach>
> 
>        ...Damien
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message