Thanks Rob!
I did not see this!

I changed now from location to value and now it works!
Refid did not help finally, because I want a list of fileset ids.

Jürgen

-----Ursprüngliche Nachricht-----
Von: Echlin, Robert [mailto:robert.ech...@windriver.com] 
Gesendet: Freitag, 3. Juni 2011 15:22
An: Ant Users List
Betreff: RE: references id names stored in properties

Hi Juergen,
Read the docs on the property task.

You want "refid" instead of "location".

<property name="local.filesetlist"

                  refid="local.fileset1,local.fileset2" />

Quote: 
"location - Sets the property to the absolute filename of the given file."
"refid  - Reference to an object defined elsewhere. Only yields reasonable 
results for references to PATH like structures or properties."

Rob
direct: +1.613.270.5796  |  robert.ech...@windriver.com
 

> -----Original Message-----
> From: Knuplesch, Juergen [mailto:juergen.knuple...@icongmbh.de] 
> Sent: Friday, June 03, 2011 9:09 AM
> To: Ant Users List
> Subject: references id names stored in properties
> 
> Hello,
> 
>  
> 
> I want to call Ant from another Ant File and send some 
> filsets: sth like this:
> 
>  
> 
>         <fileset id="local.fileset1"
> 
>                  dir="${example.basedir}" />
> 
>         <fileset id="local.fileset2" dir="." />
> 
>         <property name="local.filesetlist"
> 
>                   location="local.fileset1,local.fileset2" />
> 
>  
> 
>         <ant antfile="antfile2"
> 
>              target="doit"
> 
>              inheritall="true"
> 
>              inheritrefs="true">
> 
>             <property name="dopecreatepackdir.filesetlist"
> 
>                       value="${local.filesetlist}" />
> 
>  
> 
>         </ant>
> 
>  
> 
> The variable local.filesetlist stores now a list of two filset ids.
> 
>  
> 
> In antfile2 I want to do sth. like this (using antcontrib):
> 
>  
> 
>         <for list="${ dopecreatepackdir.filesetlist }"
> 
>              param="pack.fileset.id"
> 
>              parallel="false">
> 
>             <sequential>
> 
>                 <echo level="info">Copy @{pack.fileset.id}</echo>
> 
>  
> 
>                 <copy todir="${dopecreatepackdir.location}" 
> preservelastmodified="true" overwrite="true">
> 
>                   <fileset refid="@{pack.fileset.id}" />
> 
>                 </copy>
> 
>                 
> 
>             </sequential>
> 
>         </for>
> 
>  
> 
> I get the following error:
> 
> D:\Entwicklung\Build\ReleasePaket\buildRelease\ant\dopeCreateP
reparePackDir.xml:94: No directory specified for fileset.
> 
>  
> 
> Both filesets exist in the Antfile (I used inheritrefs=true), 
> but I can not access them using a property. (I can if I use 
> the names e.g. local.fileset1)
> 
> I use ANT 1.7.1.
> 
>  
> 
> Is this, how it should be?
> 
> Is this a bug?
> 
>  
> 
> Regards
> 
>  
> 
> Juergen
> 
> -- 
> 
> Jürgen Knuplesch                    www.icongmbh.de 
> <http://www.icongmbh.de/> 
> 
> icon Systemhaus GmbH                Tel. +49 711 806098-275
> 
> Sophienstraße 40                    juergen.knuple...@icongmbh.de
> 
> D-70178 Stuttgart                   Fax. +49 711 806098-299
> 
>  
> 
> Geschäftsführer: Uwe Seltmann
> 
> HRB Stuttgart 17655
> 
> USt-IdNr.: DE 811944121 
> 
>  
> 
>  
> 
> 
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org


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

Reply via email to