-
Notifications
You must be signed in to change notification settings - Fork 9
/
build-1.6.xml
124 lines (101 loc) · 3.77 KB
/
build-1.6.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<?xml version="1.0"?>
<project name="svntask-1.6" default="dist" basedir=".">
<!--***************** Generic properties *****************-->
<property name="ant.build.javac.target" value="1.5" />
<property name="ant.build.javac.source" value="1.5" />
<property name="build.debug" value="true" />
<property name="build.deprecation" value="true" />
<!--********************************************************-->
<property name="version" value="1.1.1"/>
<property name="dist.name" value="${ant.project.name}-${version}"/>
<property name="src.dir" location="src" />
<property name="build.dir" location="target/1.6" />
<property name="build.classes.dir" location="${build.dir}/classes" />
<property name="build.javadoc.dir" location="${build.dir}/doc" />
<property name="build.dist.dir" location="${build.dir}/${dist.name}"/>
<property name="build.dist.zip" location="${build.dir}/${dist.name}.zip"/>
<!--********************************************************-->
<path id="svntask.classpath">
<fileset dir="lib">
<include name="ant*.jar"/>
</fileset>
<fileset dir="lib/svn1.6">
<include name="*.jar"/>
</fileset>
</path>
<!-- ******************************************************** -->
<target name="javac" depends="init">
<mkdir dir="${build.classes.dir}"/>
<javac
srcdir="${src.dir}"
destdir="${build.classes.dir}"
includeAntRuntime="false"
debug="${build.debug}"
source="${ant.build.javac.source}"
target="${ant.build.javac.target}"
deprecation="${build.deprecation}">
<classpath refid="svntask.classpath"/>
</javac>
<!--TODO: This should be in the right place in a resources dir in the first place-->
<copy file="${src.dir}/svntask.xml" todir="${build.classes.dir}/com/googlecode/svntask/" />
</target>
<target name="jar" depends="javac">
<jar jarfile="${build.dir}/svntask-${version}.jar">
<fileset dir="${build.classes.dir}" />
<manifest>
<attribute name="Specification-Version" value="${version}" />
<attribute name="Implementation-Version" value="${TODAY}" />
<attribute name="Main-Class" value="com.googlecode.svntask.Version" />
</manifest>
</jar>
</target>
<target name="javadoc" depends="init">
<property name="javadoc.dir" location="${build.dir}/javadoc" />
<mkdir dir="${javadoc.dir}"/>
<javadoc
destdir="${javadoc.dir}"
packagenames="*"
author="true"
version="true"
Windowtitle="svntask Javadoc"
>
<classpath refid="svntask.classpath" />
<fileset dir="${src.dir}">
<exclude name="**/*.xml" />
</fileset>
<group title="svntask" packages="com.googlecode.svntask*"/>
<doctitle><![CDATA[<h1>svntask</h1>]]></doctitle>
<bottom><![CDATA[<i>Copyright © ${YEAR} Jon Scott Stevens, Christoph Polcin, opticyclic. All Rights Reserved. Build version: ${version}</i>]]></bottom>
</javadoc>
</target>
<target name="init">
<tstamp>
<format property="YEAR" pattern="yyyy" />
</tstamp>
</target>
<target name="clean">
<!--Prevent a delete failure if the build dir doesn't exist-->
<mkdir dir="${build.dir}"/>
<!--Do the actual delete-->
<delete includeemptydirs="true">
<fileset dir="${build.dir}" includes="**/*"/>
</delete>
</target>
<target name="dist" depends="clean, init, jar, javadoc">
<copy todir="${build.dist.dir}">
<fileset dir="${build.dir}">
<include name="*.jar" />
</fileset>
</copy>
<copy todir="${build.dist.dir}">
<fileset dir="lib/svn1.6">
<include name="*.jar" />
</fileset>
</copy>
<dirname property="build.dist.dir.dirname" file="${build.dist.dir}" />
<basename property="build.dist.dir.basename" file="${build.dist.dir}" />
<zip zipfile="${build.dist.zip}" basedir="${build.dist.dir.dirname}">
<include name="${build.dist.dir.basename}/**" />
</zip>
</target>
</project>