Skip to content

Instantly share code, notes, and snippets.

@rotty3000
Created July 5, 2013 14:02
Show Gist options
  • Save rotty3000/5934742 to your computer and use it in GitHub Desktop.
Save rotty3000/5934742 to your computer and use it in GitHub Desktop.
bnd ant
<target name="jar" depends="compile">
<if>
<not>
<uptodate targetfile="${jar.file}.jar">
<srcfiles dir="classes" includes="**/*.*"/>
</uptodate>
</not>
<then>
<if>
<available file="bnd.bnd" />
<then>
<manifest-helper />
<bndexpand propertyfile="${project.dir}/common.bnd" />
<bnd
eclipse="false"
exceptions="true"
failok="false"
inherit="true"
output="${jar.file}.jar"
sourcepath="."
>
<bndfiles path="bnd.bnd" />
<classpath>
<pathelement location="classes" />
</classpath>
</bnd>
</then>
<else>
<antcall target="manifest" />
<jar
basedir="classes"
jarfile="${jar.file}.jar"
manifest="classes/META-INF/MANIFEST.MF"
/>
</else>
</if>
</then>
</if>
</target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment