-
Notifications
You must be signed in to change notification settings - Fork 22
/
build.xml
78 lines (66 loc) · 3.06 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
<project name="towel" default="build">
<property file="build.properties" />
<property name="src.dir" value="${basedir}/src" />
<property name="classes.dir" value="${basedir}/classes" />
<property name="sampleslib.dir" value="${samples.dir}/lib" />
<property name="javadoc.dir" value="${basedir}/javadoc" />
<property name="javac.source" value="1.5" />
<property name="javac.target" value="1.5" />
<property name="javac.deprecation" value="on" />
<property name="javac.debug" value="on" />
<property name="towel.version" value="0.1.0" />
<path id="towel.classpath">
<pathelement location="${classes.dir}" />
</path>
<target name="clean" description="removes all generated collateral">
<delete dir="${classes.dir}" />
<delete dir="${javadoc.dir}" />
<delete file="${htdocs.dir}/bugdescriptions.html" />
<delete file="${basedir}/towel-${towel.version}.jar" />
<delete file="${basedir}/towel-src-${towel.version}.zip" />
</target>
<target name="-init" description="prepares repository for a build">
<mkdir dir="${classes.dir}" />
<mkdir dir="${javadoc.dir}" />
</target>
<target name="compile" depends="-init" description="compiles java files">
<javac excludes="${src.dir}/test/*" srcdir="${src.dir}" destdir="${classes.dir}" source="${javac.source}" target="${javac.target}" deprecation="${javac.deprecation}" debug="${javac.debug}" includeantruntime="false">
<classpath refid="towel.classpath" />
</javac>
</target>
<target name="jar" depends="compile" description="produces the towel jar file">
<jar destfile="${basedir}/towel-${towel.version}.jar">
<fileset dir="${classes.dir}">
<include name="**/*.class" />
</fileset>
<manifest>
<attribute name="towel-version" value="${towel.version}" />
<attribute name="Bundle-ManifestVersion" value="2" />
<attribute name="Bundle-Name" value="towel plugin" />
<attribute name="Bundle-SymbolicName" value="towel; singleton:=true" />
<attribute name="Bundle-Version" value="${towel.version}" />
<attribute name="Bundle-ClassPath" value="." />
<attribute name="Bundle-Vendor" value="Towel Project" />
<attribute name="Bundle-ActivationPolicy" value="lazy" />
</manifest>
</jar>
</target>
<target name="srczip" description="builds the source distribution zip file">
<zip destfile="${basedir}/towel-src-${towel.version}.zip" basedir="${basedir}">
<fileset dir="${src.dir}">
<include name="**/*.java" />
</fileset>
</zip>
</target>
<target name="javadoc" depends="-init" description="build the javadoc for the project">
<javadoc packagenames="com.towel.*" sourcepath="${src.dir}" classpathref="towel.classpath" destdir="${javadoc.dir}" windowtitle="Towel api">
<doctitle>
<![CDATA[<h1>Towel Javadoc</h1>]]></doctitle>
<bottom>
<![CDATA[<i>Copyright © 2010-2011 Marky Vasconcelos. All Rights Reserved.</i>]]></bottom>
</javadoc>
</target>
<target name="build" depends="clean, -init, compile, jar" description="builds the jar">
</target>
<target name="release" depends="build, srczip, javadoc" description="prepares everything for a release" />
</project>