i have a problem. I'm use antrun plugin for maven and do next: i have folder and subfolders(I do not know what are called sub-folders and their number) and i'm do archive for this subfolders with their name(subfolder name - "1", archive name - "1.acp").
<tasks>
<taskdef resource="net/sf/antcontrib/antlib.xml" classpath="${settings.localRepository}/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3.jar" />
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${settings.localRepository}/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3.jar" />
<for param="file">
<path>
<dirset dir="src/main/bootstrap" includes="/*" />
</path>
<sequential>
<basename property="dir" file="@{file}" />
<zip destfile="${project.build.outputDirectory}/alfresco/extension/agilent/${dir}.acp" basedir="@{file}" />
</sequential>
</for>
</tasks>
But property dir is immutable!!! And all archive has name "1.acp". How to make this property mutable or do this another way?
You can use the var task from ant contrib.
The property
unset
, lets you reset values(example from above link):So you will have to fix it to:
You may use a 1.8 Ant's Local task
In your case: