ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: How to conditionally add something to a path ?
Date Mon, 19 Dec 2005 15:37:16 GMT
>Oham - I was just going to ask, how the docu can be used e.g.
>to find all possible subelements of a given element, since the 
>ant docu doesn't work too well for me...


Should be in the manual, isnt it?


>Now I ended up with 
>
>	<path id="classpath_jacorb">
>		<fileset dir="${jarpath}">
>		   <include name="**/jacorb*.jar" />
>		</fileset>
>	</path>
>	<pathconvert property="classpath_jacorb.property" 
>                   refid="classpath_jacorb" targetos="unix"/>	 
>
>	<condition property="jacorb.present">
>	   <contains string="${classpath_jacorb.property}"
>substring="jar"/>
>	</condition> 
>
>This is quite ugly, but at least it works :-/


Have you tried <pathconvert setonempty="false"/> ?

And with Ant 1.7 you could use nested resource collections.
See http://marc.theaimsgroup.com/?l=ant-user&m=113449111905331&w=2 for
a little different topic - but could be interesting for you.


Jan

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


Mime
View raw message