Reply – Fat-jar deployment method - ant recipe
Your Name
Subject
Message
or Cancel
In Reply To
Fat-jar deployment method - ant recipe
— by hharrison hharrison
Just a snapshot of what I've been playing with to deploy a simgle jar...suggestions/improvements very welcome:

  <target name="jar" depends="compile">
    <jar jarfile="${build.dir}/jars/JaamSim.jar" manifest="Manifest.MF"
         compress="true" update="yes">
      <fileset dir="${class.dir}"/>
      <fileset dir="${res.dir}"/>

      <zipfileset src="jar/gluegen-rt.jar"     includes="jogamp/**/*"/>
      <zipfileset src="jar/gluegen-rt.jar"     includes="com/**/*"/>
      <zipfileset src="jar/gluegen-rt-natives-windows-i586.jar"     includes="*.dll"    prefix="natives/windows-i586"/>
      <zipfileset src="jar/gluegen-rt-natives-windows-amd64.jar"    includes="*.dll"    prefix="natives/windows-amd64"/>
      <zipfileset src="jar/gluegen-rt-natives-linux-i586.jar"       includes="*.so"     prefix="natives/linux-i586"/>
      <zipfileset src="jar/gluegen-rt-natives-linux-amd64.jar"      includes="*.so"     prefix="natives/linux-amd64"/>
      <zipfileset src="jar/gluegen-rt-natives-macosx-universal.jar" includes="*.jnilib" prefix="natives/macosx-universal"/>
      <zipfileset src="jar/jogl-all.jar"       includes="jogamp/**/*"/>
      <zipfileset src="jar/jogl-all.jar"       includes="javax/**/*"/>
      <zipfileset src="jar/jogl-all.jar"       includes="com/**/*"/>
      <zipfileset src="jar/jogl-all-natives-windows-i586.jar"     includes="*.dll"    prefix="natives/windows-i586"/>
      <zipfileset src="jar/jogl-all-natives-windows-amd64.jar"    includes="*.dll"    prefix="natives/windows-amd64"/>
      <zipfileset src="jar/jogl-all-natives-linux-i586.jar"       includes="*.so"     prefix="natives/linux-i586"/>
      <zipfileset src="jar/jogl-all-natives-linux-amd64.jar"      includes="*.so"     prefix="natives/linux-amd64"/>
      <zipfileset src="jar/jogl-all-natives-macosx-universal.jar" includes="*.jnilib" prefix="natives/macosx-universal"/>
    </jar>
  </target>