ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Com Pegasus-CC-Hotline" <pegasus-cc-hotline....@siemens.com>
Subject How to conditionally add something to a path ?
Date Mon, 19 Dec 2005 10:56:22 GMT
Hello,

I am trying to add an entry to a path, if some other
entry is not existant. I'm trying since hours now,=20
without success. I am somewhere here:


	<available file=3D"${jarpath}/**/jacorb*.jar"
property=3D"jacorb.present"/>

	<path id=3D"classpath">
		<fileset dir=3D"${jarpath}">
		   <include name=3D"**/*.jar" />
		   <exclude name=3D"orbacus.jar" />
		</fileset>
		<if>
		   <isfalse property=3D"${jacorb.present}" />
		   <fileset dir=3D"${jarpath}">
		      <include name=3D"orbacus.jar" />
		   </fileset>
		</if>
	</path>

... but it doesn't work. A fileset doesn't accept a
if inside, and a if does not accept
a fileset inside, and so on ...

How can I do this???

Thomas


PS: I also found http://ant-contrib.sourceforge.net/fileset.html
but it just "didn't" work. (I downloaded/placed the contrib jar 
and added the line
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
but it still said, that the fileset doesnt know the "unless".)

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


Mime
View raw message