forked from binfalse/BiVeS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
77 lines (68 loc) · 2.74 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
75
76
77
<project name="BiVeS" default="dist" basedir=".">
<description>
A toolkit useful for working with XML documents
</description>
<property name="app.name" value="BiVeS" />
<property name="app.version" value="1.11.1" />
<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.bives.Main" />
</manifest>
<jar jarfile="${dist}/${app.name}-${app.version}.jar" basedir="${build}" manifest="build/MANIFEST.MF">
<zipfileset dir="res" includes="*xsl" prefix="res" />
</jar>
<jar jarfile="${dist}/${app.name}-${app.version}-fat.jar" basedir="${build}" manifest="build/MANIFEST.MF">
<zipgroupfileset dir="lib" includes="*.jar" excludes="" />
<zipfileset dir="res" includes="*xsl" prefix="res" />
</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} >> BiVeS-Core${line.separator} >> BiVeS-CellML${line.separator} >> BiVeS-SBML${line.separator}${line.separator}(download latest binaries from http://bin.sems.uni-rostock.de/)">
<condition>
<not>
<available file="@{dir}" type="dir" />
</not>
</condition>
</fail>
</sequential>
</macrodef>
</project>