I got some problems while trying to create a zip file within previously created zipfilesets.
I have a loop where the filesets are created.
<target name="createZipFileSets">
<for list="${zip.filesets}" param="zipfileset">
<sequential>
<propertycopy name="zip.fileset.id" from="zip.fileset.id.${zipfile}.@{zipfileset}" />
<propertycopy name="zip.fileset.dir" from="zip.fileset.dir.${zipfile}.@{zipfileset}" />
<propertycopy name="zip.fileset.include" from="zip.fileset.include.${zipfile}.@{zipfileset}" />
<propertycopy name="zip.fileset.exclude" from="zip.fileset.exclude.${zipfile}.@{zipfileset}" />
<propertycopy name="zip.fileset.prefix" from="zip.fileset.prefix.${zipfile}.@{zipfileset}" />
<zipfileset
id="${zip.fileset.id}"
dir="${zip.fileset.dir}"
includes="${zip.fileset.include}"
excludes="${zip.fileset.exclude}"
prefix="${zip.fileset.prefix}"
/>
</sequential>
</for>
</target>
The question here is: Can i use the zipfileset's id to create a zip file somewhere else in my xml file (ex. another target)?
For example:
<zip bla bla>
<zipfileset id="{zip.fileset.id}"> - ** Here is the problem, it can't find it
</zip>
for ex: - ${zip.fileset.id}=blabla
The error is: Reference blabla () not found, See **
Thanks in advance.
Best regards,
Joro