/
build.xml
111 lines (98 loc) · 4.15 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<!--
/*
* junitflood - An automatic junit test generator
* Copyright 2011 MeBigFatGuy.com
* Copyright 2011 Dave Brosius
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations
* under the License.
*/
-->
<project name="junitflood" default="release">
<property file="build.properties"/>
<property name="src.dir" value="${basedir}/src"/>
<property name="classes.dir" value="${basedir}/classes"/>
<property name="lib.dir" value="${basedir}/lib"/>
<property name="javadoc.dir" value="${basedir}/javadoc"/>
<property name="htdocs.dir" value="${basedir}/htdocs"/>
<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="junitflood.version" value="0.1.0"/>
<path id="junitflood.classpath">
<pathelement location="${classes.dir}"/>
<pathelement location="${lib.dir}/asm-3.3.1.jar"/>
<pathelement location="${lib.dir}/commons-cli-1.2.jar"/>
<pathelement location="${lib.dir}/slf4j-api-1.6.1.jar"/>
<pathelement location="${lib.dir}/slf4j-simple-1.6.1.jar"/>
</path>
<target name="clean" description="removes all generated collateral">
<delete dir="${classes.dir}"/>
<delete dir="${javadoc.dir}"/>
<delete file="${basedir}/junitflood-${junitflood.version}.jar"/>
<delete file="${basedir}/junitflood-src-${junitflood.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 srcdir="${src.dir}"
destdir="${classes.dir}"
source="${javac.source}"
target="${javac.target}"
deprecation="${javac.deprecation}"
debug="${javac.debug}"
includeantruntime="false">
<classpath refid="junitflood.classpath"/>
</javac>
</target>
<target name="jar" depends="compile" description="produces the junitflood jar file">
<jar destfile="${basedir}/junitflood-${junitflood.version}.jar">
<fileset dir="${classes.dir}">
<include name="**/*.class"/>
</fileset>
<manifest>
<attribute name="junitflood-version" value="${junitflood.version}"/>
<attribute name="Main-Class" value="com.mebigfatguy.junitflood.JUnitFlood"/>
<attribute name="Bundle-ManifestVersion" value="2"/>
<attribute name="Bundle-Name" value="JUnitFlood"/>
<attribute name="Bundle-SymbolicName" value="junitflood; singleton:=true"/>
<attribute name="Bundle-Version" value="${junitflood.version}"/>
<attribute name="Bundle-ClassPath" value="."/>
<attribute name="Bundle-Vendor" value="JUnitFlood Project"/>
<attribute name="Bundle-ActivationPolicy" value="lazy"/>
</manifest>
</jar>
</target>
<target name="srczip" description="builds the source distribution zip file">
<zip destfile="${basedir}/junitflood-src-${junitflood.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.mebigfatguy.*"
sourcepath="${src.dir}"
classpathref="junitflood.classpath"
destdir="${javadoc.dir}"
windowtitle="JUnitFlood api">
<doctitle><![CDATA[<h1>JUnitFlood Javadoc</h1>]]></doctitle>
<bottom><![CDATA[<i>Copyright © 2011 MeBigFatGuy.com. All Rights Reserved.</i>]]></bottom>
</javadoc>
</target>
<target name="build" depends="clean, -init, compile, jar" description="builds the plugin jar">
</target>
<target name="release" depends="build, srczip, javadoc" description="prepares everything for a release"/>
</project>