-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
65 lines (54 loc) · 2.29 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
<?xml version="1.0" encoding="utf-8"?>
<project name="TwinCATScope" basedir=".">
<property name="build.title" value="TwinCATScope"/>
<property name="build.author" value="Deiring Andreas"/>
<property name="build.name" value="twinCATScope"/>
<property name="build.version" value="1.0"/>
<property name="build.class" value="twincat.app.ScopeApp"/>
<property name="exclude" value="**/junit/*.java"/>
<property name="src.dir" location="${basedir}/src"/>
<property name="src.dir.res" location="${src.dir}/resources"/>
<property name="build.dir" location="${basedir}/build"/>
<property name="bin.dir" location="${basedir}/build/bin"/>
<property name="bin.dir.res" location="${bin.dir}/resources"/>
<property name="lib.dir" location="${basedir}/lib"/>
<tstamp>
<format property="build.day" pattern="dd.MM.yyyy" locale="de,DE" />
<format property="build.time" pattern="HH:mm:ss" locale="de,DE" />
</tstamp>
<path id="libs">
<fileset dir="${lib.dir}" includes="*.jar"/>
</path>
<target name="mkdir">
<mkdir dir="${bin.dir}"/>
</target>
<target name="copy" depends="mkdir">
<copy todir="${bin.dir.res}">
<fileset dir="${src.dir.res}"/>
</copy>
</target>
<target name="compile" depends="copy">
<javac srcdir="${src.dir}" destdir="${bin.dir}" includeantruntime="false">
<classpath refid="libs"/>
<exclude name="${exclude}"/>
</javac>
</target>
<target name="build" depends="compile">
<manifest file="MANIFEST.MF">
<attribute name="Title" value="${build.title}"/>
<attribute name="Author" value="${build.author}"/>
<attribute name="Version" value="${build.version}"/>
<attribute name="Build" value="${build.number}"/>
<attribute name="Date" value="${build.day}"/>
<attribute name="Time" value="${build.time}"/>
<attribute name="Main-Class" value="${build.class}"/>
</manifest>
<jar destfile="${build.dir}/${build.name}.${build.version}.jar" basedir="${bin.dir}" manifest="MANIFEST.MF">
<zipgroupfileset dir="${lib.dir}" includes="*.jar"/>
<exclude name="${exclude}"/>
</jar>
</target>
<target name="clean" depends="build">
<delete dir="${bin.dir}"/>
</target>
</project>