1.

How To Rearrange My Directory Structure In My Jar/war/ear/zip File? Do I Need To Unarchive Them First?

Answer»

No, you don't need to unarchive them first.

* You don't need to UNZIP the files from archive to PUT into your destination jar/ear/war files.
* You can use zipfileset in your jar/war/ear task to extract files from old archive to different directory in your new archive.
* You also can use zipfileset in your jar/war/ear task to SEND files from local directory to different directory in your new archive. 

See the follow example:

<jar destfile="${dest}/my.jar">
<zipfileset src="old_archive.zip" includes="**/*.properties" prefix="dir_in_new_archive/prop"/>
<zipfileset dir="curr_dir/abc" prefix="new_dir_in_archive/xyz"/>
</jar>

No, you don't need to unarchive them first.

* You don't need to unzip the files from archive to put into your destination jar/ear/war files.
* You can use zipfileset in your jar/war/ear task to extract files from old archive to different directory in your new archive.
* You also can use zipfileset in your jar/war/ear task to send files from local directory to different directory in your new archive. 

See the follow example:

<jar destfile="${dest}/my.jar">
<zipfileset src="old_archive.zip" includes="**/*.properties" prefix="dir_in_new_archive/prop"/>
<zipfileset dir="curr_dir/abc" prefix="new_dir_in_archive/xyz"/>
</jar>



Discussion

No Comment Found