ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <Gilbert.Reb...@huk-coburg.de>
Subject RE: <buffer> ?!
Date Fri, 25 Aug 2006 09:30:20 GMT
 
Hi,

thanks for the pointer, didn't notice about the possibility
to append to a variable property via antcontrib <var> task.

so i tried with =

<project name="bla" default="main" basedir=".">

<!-- Import AntContrib -->
<taskdef resource="net/sf/antcontrib/antlib.xml" />
<target name="depends">
     <var name="bla" value="Firstline"/>  
     <var name="bla" value="${bla}${line.separator}Second Line"/>
     <var name="bla" value="${bla}${line.separator}Third Line"/>   
</target>

<target name="main" depends="depends">
<echo>$${bla} = 
  ${bla}
 </echo>
</target>

</project>

gives me 

     [echo] ${bla} =
     [echo] Firstline
     [echo] Second Line
     [echo] Third Line


not exactly what i want, but it's a step in the right direction.

If there's no other solution i'll go with that until i have the time
to roll my own buffer.

Regards, Gilbert


-----Original Message-----
From: David Corley (AT/LMI) [mailto:david.corley@ericsson.com] 
Sent: Thursday, August 24, 2006 9:53 AM
To: Ant Users List
Subject: RE: <buffer> ?!

Well, this idea may seem like a hack, but perhaps it'll work for you.
You can use the ant-contrib library <var> task
(http://ant-contrib.sourceforge.net/tasks/tasks/variable_task.html),
which is like a mutable ant property. You could use it such you
constantly append data to it, using some kind of a seperator as you
append to make it easier to break it down when you're done.
 


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


Mime
View raw message