0
votes

I have several external jar files in /lib directory like

/lib

/lib/A.jar

/lib/B.jar

/lib/C.jar

and each JAR file has same named file in their jar file. the path is META-INF/license.txt

so if I use zipgroupfileset task with dir attibute like dir="/lib/" include *.jar in jar task META-INF/license.txt file is duplicated XML code is below

<jar jarfile="${dest}/merged_jar.jar">
<zipgroupfileset dir="${basedir}/lib" />
<include name="**/*.jar"/>
</zipgroupfileset>
</jar>

after this works, merged_jar.jar is created but in this file, /META-INF/license.txt is duplicated

I don't want to exclude license.txt file but want to move each file's license.txt file to another folder to gather and add suffix or prefix(eg. /license/license_A.txt) during merging task

thanks to your help.

1
Wait until you can use a computer, and make your question much better, because I can't understand anything about it.JB Nizet
thanks a lot, I downloaded stackexchange apps. and add some XML codesburning web fuel

1 Answers

0
votes

Use the prefix attribute to put some prefix path on the destination directory.

 <zipfileset dir="license" includes="*.txt" prefix="license/licence"/>

This will copy all text files inside license directory to the license/licence directory