-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
executable file
·72 lines (58 loc) · 2.33 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
<?xml version="1.0"?>
<project name="TimeSheet" default="info" basedir=".">
<!-- set global properties for this build -->
<property name="src" location="src" />
<property name="build" location="out/production/TimeSheet" />
<property name="dist" location="build" />
<property name="lib" location="lib" />
<property name="version" value="1.0" />
<property name="mainclass" value="com.cligest.Main"/>
<target name="info">
<echo>Ant Script for build, dist and running TimeSheet.</echo>
</target>
<target name="distribution" depends="">
<buildnumber />
<delete file="${lib}/${ant.project.name}.jar"/>
<mkdir dir="${build}/META-INF" />
<manifest file="${build}/META-INF/MANIFEST.MF">
<attribute name="Main-Class" value="${mainclass}"/>
</manifest>
<!-- Put everything in ${build} into the MyApplication-${version}.${build.number}.jar -->
<property name="build.jar.filename" value="${dist}/TimeSheet_${version}.${build.number}.jar"/>
<jar manifest="${build}/META-INF/MANIFEST.MF" destfile="${build.jar.filename}" basedir="${build}" />
<copy file="${build.jar.filename}" tofile="${lib}/${ant.project.name}.jar"/>
</target>
<target name="clean">
<delete dir="${build}" />
<delete file="${lib}/${ant.project.name}.jar"/>
</target>
<target name="setup">
<path id="nfctools">
<fileset dir="${lib}">
<include name="**/*.jar"/>
</fileset>
</path>
<pathconvert property="nfctoolspath" refid="nfctools"/>
</target>
<target name="build" depends="clean,setup" >
<mkdir dir="${build}"/>
<javac srcdir="${src}"
destdir="${build}"
classpathref="nfctools"
/>
</target>
<target name="run" depends="setup">
<echo>classpath: ${nfctoolspath}</echo>
<echo>classname with main(): ${mainclass}</echo>
<java classpathref="nfctools"
classname="${mainclass}">
<arg value="timesheet_device.properties"/>
</java>
</target>
<target name="demo" depends="setup">
<java classpathref="nfctools"
classname="com.cligest.TestDialog">
</java>
</target>
<target name="all" depends="build,distribution"/>
</project>