-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-jar.xml
46 lines (42 loc) · 2.68 KB
/
build-jar.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?eclipse.ant.import?>
<!-- This is a hand-crafted build.xml file from autogen-jarbuild.xml. That file in turn is exported using the "Runnable Jar file" export
wizard that Eclipse helpfully has.
The idea is to combine two Eclipse wizard generated build.xml files to minimise the handcrafting needed to get things done
and rely on the Eclipse wizards as much as possible.
I should probably have used the Eclipse import mechanism suggested in the autogen files instead, perhaps something to do later.
-->
<project default="build_and_package" name="Create Runnable Jar for Project OPAS">
<!-- Use the project build from autogenerated build file as dependency here, and add it as a dependency to our
jar building which defined below.
-->
<target name="build_and_package" depends="build, create_run_jar"/>
<!-- Below I've marked hand edited/added lines in case I need to auto-build this thing again (probably not). -->
<property name="version" value="1.0.1"/> <!-- hand add -->
<property name="dir.buildfile" value="."/>
<property name="dir.workspace" value="${dir.buildfile}/.."/>
<property name="dir.jarfile" value="${dir.buildfile}/build/jar"/>
<target name="create_run_jar">
<buildnumber/>
<jar destfile="${dir.jarfile}/OpenPAS-${version}.jar" filesetmanifest="mergewithoutmain"> <!-- hand edit -->
<manifest>
<attribute name="Main-Class" value="pasc.PASC"/>
<attribute name="Class-Path" value="."/>
<attribute name="Implementation-Version" value="${version}.${build.number}"/> <!-- hand add -->
<attribute name="Specification-Version" value="${version}"/> <!-- hand add -->
</manifest>
<fileset file="LICENSE"/> <!-- hand add -->
<fileset dir="${dir.buildfile}/bin"/>
<zipfileset excludes="META-INF/*.SF,LICENSE.txt" src="${dir.buildfile}/lib/org.hamcrest.core_1.3.0.v201303031735.jar"/> <!-- hand edit: exclude potentialy confusing LICENSE.txt file which gets renamed below. -->
<zipfileset excludes="META-INF/*.SF" src="${dir.buildfile}/lib/org.junit_4.12.0.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${dir.buildfile}/lib/guava.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${dir.buildfile}/lib/javabdd-1.0b2.jar"/>
<!-- hand add -->
<mappedresources>
<zipfileset src="${dir.buildfile}/lib/org.hamcrest.core_1.3.0.v201303031735.jar">
<include name="LICENSE.txt"/>
</zipfileset>
<globmapper from="LICENSE.txt" to="LICENSE-hamcrest.txt"/> <!-- Rename LICENSE.txt -> LICENSE-hamcrest.txt to avoid license confusion. -->
</mappedresources>
</jar>
</target>
</project>