forked from binfalse/BiVeS-CellML
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
69 lines (60 loc) · 2.58 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
<project name="BiVeS-CellML" default="dist" basedir=".">
<description>
BiVeS - BioModel Version Control System
This package provides CellML integration for BiVeS
</description>
<property name="app.name" value="BiVeS-CellML" />
<property name="app.version" value="1.6.6" />
<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}" />
<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">
<jar jarfile="${dist}/${app.name}-${app.version}.jar" basedir="${build}" />
<jar jarfile="${dist}/${app.name}-${app.version}-fat.jar" basedir="${build}">
<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} >> BiVeS-Core (download latest fat from http://bin.sems.uni-rostock.de/)">
<condition>
<not>
<available file="@{dir}" type="dir" />
</not>
</condition>
</fail>
</sequential>
</macrodef>
</project>