-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
74 lines (65 loc) · 2.79 KB
/
build.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<project name="CombineExt" default="dist" basedir=".">
<description>
Extensions for COMBINE
</description>
<property name="app.name" value="CombineExt" />
<property name="app.version" value="1.2.3" />
<property name="src" location="src/main/java" />
<property name="build" location="build" />
<property name="dist" location="dist" />
<property name="lib" location="lib" />
<path id="compile.classpath">
<fileset dir="${lib}">
<include name="*.jar" />
</fileset>
</path>
<target name="init" description="initialize workspace">
<assertDirAvailable dir="${lib}" />
<tstamp />
<mkdir dir="${build}" />
<!--copy todir="${build}">
<fileset dir="${src}" includes="**/*.xml,**/*.properties,**/*.txt,**/*.ico" />
</copy-->
<mkdir dir="${dist}" />
</target>
<target name="compile" depends="init" description="compile the source">
<javac srcdir="${src}" destdir="${build}" includeantruntime="false">
<classpath refid="compile.classpath" />
</javac>
</target>
<target name="dist" depends="compile" description="generate the distribution">
<manifest file="build/MANIFEST.MF">
<attribute name="Main-Class" value="de.unirostock.sems.cbarchive.Main" />
</manifest>
<jar jarfile="${dist}/${app.name}-${app.version}.jar" basedir="${build}" manifest="build/MANIFEST.MF" />
<jar jarfile="${dist}/${app.name}-${app.version}-fat.jar" basedir="${build}" manifest="build/MANIFEST.MF">
<zipgroupfileset dir="lib" includes="*.jar" excludes="" />
</jar>
</target>
<target name="sign" depends="dist" description="sign a dist">
<checksum file="${dist}/${app.name}-${app.version}.jar" forceOverwrite="yes" />
<move file="${dist}/${app.name}-${app.version}.jar.MD5" tofile="${dist}/${app.name}-${app.version}.jar.md5" />
<exec executable="gpg">
<arg value="--output" />
<arg value="${dist}/${app.name}-${app.version}.jar.md5.sig" />
<arg value="-abs" />
<arg value="${dist}/${app.name}-${app.version}.jar.md5" />
</exec>
</target>
<target name="clean" description="clean up">
<delete dir="${build}" />
<delete dir="${dist}" />
</target>
<macrodef name="assertDirAvailable">
<attribute name="dir" />
<sequential>
<fail message="Please create dir @{dir} containing the depenencies:${line.separator}${line.separator} >> BFlog (see http://bin.sems.uni-rostock.de/BFLog/)${line.separator} >> sbgn ${line.separator} >> libSBOLj-core ${line.separator} >> jlibSedml ${line.separator} >> jsbml ${line.separator} >> paxtools-console ${line.separator} >> paxtools-core ${line.separator} >> BiVeS-CellML ${line.separator} >> jdom2 ${line.separator}">
<condition>
<not>
<available file="@{dir}" type="dir" />
</not>
</condition>
</fail>
</sequential>
</macrodef>
</project>