-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.xml
97 lines (83 loc) · 3.36 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
91
92
93
94
95
96
97
<!-- ant build.xml file for k5nCal -->
<project name="k5nCal" default="dist" basedir=".">
<description>Top-level build file for k5nCal</description>
<!-- set global properties for this build -->
<property name="src" location="src" />
<property name="imagedir" location="us/k5n/k5ncal" />
<property name="build" location="build" />
<property name="dist" location="dist" />
<property name="test" location="test" />
<property name="testbuild" location="testbuild" />
<property name="version" value="0.9.9-SNAPSHOT" />
<property name="k5n-ical-lib" value="lib/k5n-ical-0.4.7.jar" />
<property name="k5n-calendarpanel-lib" value="lib/k5n-calendarpanel-0.4.7.jar" />
<property name="k5n-accordionpane-lib" value="lib/k5nAccordion-1.0.1.jar" />
<property name="jcalendar-lib" value="lib/jcalendar-1.3.2.jar" />
<target name="init">
<!-- Create the time stamp -->
<tstamp />
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}" />
</target>
<target name="copy-static" depends="" description="Copy static files">
<mkdir dir="${build}" />
<copy todir="${build}" >
<fileset dir="src">
<exclude name="**/*.java"/>
</fileset>
</copy>
<copy todir="${build}" file="ChangeLog" />
<copy todir="${build}" file="License.html" />
</target>
<target name="compile" depends="init" description="compile the source ">
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}">
<classpath>
<pathelement path="${k5n-ical-lib}" />
<pathelement path="${k5n-calendarpanel-lib}" />
<pathelement path="${k5n-accordionpane-lib}" />
<pathelement path="${jcalendar-lib}" />
<pathelement path="${macstuff-lib}" />
</classpath>
</javac>
</target>
<target name="dist" depends="compile,copy-static" description="generate the distribution">
<!-- Create the distribution directory -->
<mkdir dir="${dist}" />
<!-- Put all the k5nCal files into a single jar
and designate the main class -->
<jar jarfile="${dist}/k5nCal-${version}.jar" basedir="${build}">
<zipfileset src="${k5n-ical-lib}" />
<zipfileset src="${k5n-calendarpanel-lib}" />
<zipfileset src="${k5n-accordionpane-lib}" />
<zipfileset src="${jcalendar-lib}" />
<manifest>
<attribute name="Main-Class" value="us.k5n.k5ncal.Main" />
</manifest>
</jar>
</target>
<!-- This target can be useful inside Eclipse when you are having
problems loading the images. Just use ant to build a separate
jar file for the images. -->
<target name="static-files-jar" depends="copy-static">
<jar jarfile="dist/k5nCal-static-files.jar" basedir="${build}" includes="**.gif,**.png,ChangeLog,License.html">
</jar>
</target>
<!-- for use in making source code releases -->
<target name="source-zip">
<mkdir dir="${dist}/src" />
<zip destfile="${dist}/src/k5nCal-src-${version}.zip">
<zipfileset dir="." prefix="k5nCal-src-${version}" includes="build.xml,README.txt,ChangeLog,License.html" />
<zipfileset dir="${src}" prefix="k5nCal-src-${version}/src" />
<!--
<zipfileset dir="images" prefix="k5nCal-src-${version}/images" />
-->
<zipfileset dir="lib" prefix="k5nCal-src-${version}/lib" />
</zip>
</target>
<target name="clean" description="clean up">
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}" />
<delete dir="${dist}" />
</target>
</project>