Steps to pack multiple jars
- Download ant from here.
- Set %ANT_HOME% as path variable and add ant/bin to path.
- Create a file and name it build.xml. (If you don't know any thing about build.xml, just copy following code and save it as build.xml).
<property name="dir.jar" value="Source_Folder"/>
<apply executable="pack200" parallel="false" dest="Destination_Folder">
<arg value="--modification-time=latest"/>
<arg value="--deflate-hint=true"/>
<arg value="--segment-limit=-1"/>
<targetfile/>
<srcfile/>
<fileset dir="${dir.jar}/" includes="**/*.jar" />
<mapper type="glob" from="*" to="*.pack.gz" />
</apply>
</project>
In the preceding code snippet, Source_Folder and Destination_Folder are user defined folders. Make sure that your jar files are in source_folder and these two folders should be in the same folder as build.xml .
- Final step is, type ant.
No comments:
Post a Comment