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: Multiple properties
Date Tue, 31 May 2005 12:50:04 GMT
> > Hello, I'm new to Ant and I was wondering if I can do the 
> following :
> > 
> > <property name="java.lib.1" vaule="D:\test\test.jar" />
> > <property name="java.lib.2" vaule="C:\est2\test2.jar" />
> > <property name="java.lib.3" vaule="A:\est3\test3.jar" />
> > <property name="java.lib...." vaule="..." />

yes



> > <target name="extract-lib" if=${java.lib.*}>
> >     <unjar src="${java.lib.*}" dest="${classes.dir}" />
> > </target>

no


> > Can someone give me some hints how I can do this ?

But you can do something like that with AntContrib.

<property name="java.lib.1" ... />
<property ... />
<property name="java.lib.4" ... />
<property name="java.lib.list" value="1,2,3,4"/>

<target name="extract-lib" if="${java.lib.list}">
    <for param="lib" list="${java.lib.list}">
        <sequential>
            <unjar src="${java.lib.@{lib}}" dest="${classes.dir}"/>
        </sequential> 
    </for>
</target>


Not sure about that syntax - try out.


Jan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message