-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
90 lines (78 loc) · 3.07 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
78
79
80
81
82
83
84
85
86
87
88
89
90
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE project>
<!-- ======================================================================
24.05.2013 15:11:19
Discrete Conformal Lab
Stefan Sechelmann
====================================================================== -->
<project name="Discrete Conformal Lab" default="default">
<description>
Discrete Conformal Lab
</description>
<tstamp>
<format property="date" pattern="yyyy-MM-dd" />
</tstamp>
<property name="vendor" value="Stefan Sechelmann"/>
<property name="target" value="1.7"/>
<property name="source" value="1.7"/>
<property name="src" value="src"/>
<property name="src-data" value="src-data"/>
<property name="build" value="build"/>
<property name="release" value="release/${date}"/>
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="etc/ant/ant-contrib-1.0b3.jar" />
</classpath>
</taskdef>
<target name="default" depends="release"/>
<path id="classpath">
<fileset dir="lib" includes="**/*.jar"/>
</path>
<target name="assemble manifest classpath">
<manifestclasspath property="manifest.classpath" jarfile="DiscreteConformalLab.jar">
<classpath refid="classpath"/>
</manifestclasspath>
<property name="manifest.classpath" value="
${manifest.classpath}
"/>
</target>
<target name="create build folders">
<mkdir dir="${build}"/>
<mkdir dir="${release}"/>
</target>
<target name="compile" depends="create build folders">
<javac debug="false" destdir="${build}" excludesfile="build.exclude" source="${source}" target="${target}" includeantruntime="false" encoding="UTF-8">
<compilerarg value="-Xlint:deprecation"/>
<compilerarg value="-Xlint:unchecked"/>
<src path="${src}"/>
<src path="${src-data}"/>
<classpath refid="classpath"/>
</javac>
<copy todir="${build}">
<fileset dir="${src}" includes="**/*.png **/*.jpg **/*.properties"/>
<fileset dir="${src-data}" includes="**/*.xsd"/>
</copy>
</target>
<target name="release" depends="compile">
<property name="jarName" value="${release}/DiscreteConformalLab.jar"/>
<property name="main-class" value="de.varylab.discreteconformal.ConformalLab"/>
<antcallback target="assemble manifest classpath" return="manifest.classpath"/>
<jar destfile="${jarName}" update="false">
<fileset dir="${build}" includes="**"/>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Implementation-Vendor" value="${vendor}"/>
<attribute name="Implementation-Title" value="Discrete Conformal Lab"/>
<attribute name="Implementation-Version" value="${date}"/>
<attribute name="Class-Path" value="${manifest.classpath}"/>
<attribute name="Main-Class" value="${main-class}"/>
</manifest>
</jar>
<copy todir="${release}">
<fileset dir="." includes="lib/** native/**"/>
</copy>
</target>
<target name="clean">
<delete dir="${build}"/>
</target>
</project>