My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<project name="gagawa" default="build" basedir=".">

<property file="build-custom.properties" />
<property file="build.properties" />

<property name="debug" value="off" />
<property name="source" value="1.6" />

<!-- absolute directories -->
<property name="maindir" value=".." />
<property name="distdir" value="dist" />
<property name="destdir" value="classes" />
<property name="testsdir" value="tests" />

<!-- computed paths -->
<property name="libdir" value="${maindir}/lib" />
<property name="docdir" value="${maindir}/doc" />
<property name="authors" value="${maindir}/AUTHORS" />
<property name="license" value="${maindir}/LICENSE" />

<!-- included libraries -->
<property name="junitjar" value="${libdir}/junit-4.1.jar" />
<property name="xercesjar" value="${libdir}/xerces.jar" />

<!-- =================================
target: init
================================= -->
<target name="init" description="creates the necessary directories">
<mkdir dir="${distdir}"/>
<mkdir dir="${distdir}/${destdir}"/>
<mkdir dir="${testsdir}"/>
</target>

<!-- =================================
target: clean
================================= -->
<target name="clean" description="removes all build directories and files">
<delete dir="${distdir}" />
<delete dir="${distdir}/${destdir}" />
<delete dir="${testsdir}"/>
<delete dir="${docdir}/javadoc"/>
</target>


<!-- =================================
target: build
================================= -->
<target name="build" description="performs a clean test and then a clean build">
<antcall target="clean" />
<antcall target="test" />
<antcall target="clean" />
<antcall target="package" />
</target>

<!-- =================================
target: all
================================= -->
<target name="all" description="builds and runs everything, probably more than most people want">
<antcall target="build" />
<antcall target="test" />
<antcall target="tests.report" />
<antcall target="javadoc" />
</target>

<!-- =================================
target: build
================================= -->
<target name="compile" description="compiles the Gagawa HTML generator" depends="init">
<javac encoding="${source.encoding}" srcdir="${maindir}/src"
destdir="${distdir}/${destdir}" debug="${debug}"
source="${source}">
<compilerarg value="-Xlint" />
</javac>
<fileset>
<exclude name="**/*.php" />
</fileset>
</target>

<!-- =================================
target: package
================================= -->
<target name="package" description="packages the Gagawa HTML generator jar" depends="compile">
<jar destfile="${distdir}/gagawa-${gagawa.version}.jar">
<fileset file="${authors}" />
<fileset file="${license}" />
<fileset dir="${distdir}/${destdir}">
<include name="**/*.class" />
<exclude name="**/examples/*.class" />
</fileset>
</jar>
</target>

<!-- =================================
target: compile.test
================================= -->
<target name="compile.test" depends="compile">
<javac encoding="${source.encoding}" srcdir="${maindir}/test"
destdir="${distdir}/${destdir}"
debug="${debug}" includeAntRuntime="no"
source="${source}" classpath="${junitjar}">
<compilerarg value="-Xlint" />
</javac>
</target>

<!-- =================================
target: test
================================= -->
<target name="test" description="runs all junit tests in the test package" depends="compile.test">
<junit fork="yes" haltonfailure="true">
<classpath>
<pathelement location="${junitjar}" />
<pathelement location="${distdir}/${destdir}" />
</classpath>
<formatter type="xml" />
<batchtest todir="${testsdir}">
<fileset dir="${maindir}/test">
<include name="**/*Test.java" />
</fileset>
</batchtest>
</junit>
</target>

<!-- =================================
target: test.report
================================= -->
<target name="tests.report" description="generates test report">
<mkdir dir="${testsdir}/report" />
<junitreport todir="${testsdir}">
<fileset dir="${testsdir}">
<include name="TEST-*.xml" />
</fileset>
<report todir="${testsdir}\report" />
</junitreport>
<echo message="Report available at build/${testsdir}/report/index.html" />
</target>

<!-- =================================
target: compile.examples
================================= -->
<target name="compile.examples" depends="compile">
<javac encoding="${source.encoding}" srcdir="${maindir}/examples"
destdir="${distdir}/${destdir}"
debug="${debug}" includeAntRuntime="no"
source="${source}" classpath="${junitjar}">
<compilerarg value="-Xlint" />
</javac>
</target>

<!-- =================================
target: javadoc
================================= -->
<target name="javadoc" description="builds the Gagawa javadoc">
<mkdir dir="${docdir}/javadoc" />
<javadoc destdir="${docdir}/javadoc"
access="package" version="true" use="true"
author="true" encoding="${source.encoding}">
<fileset dir="${maindir}/src" includes="**/*.java" />
<classpath>
<pathelement location="${xercesjar}"/>
</classpath>
</javadoc>
</target>

</project>

Change log

r47 by html-gen...@hp.com on Apr 3, 2009   Diff
Found a bug in the build.xml javadoc
target, fixing it
Go to: 
Project members, sign in to write a code review

Older revisions

r41 by html-gen...@hp.com on Jan 17, 2009   Diff
Added <compilerarg value="-Xlint" />
to each of the javac tasks to catch
and lazy compiler warnings.
r27 by html-gen...@hp.com on Dec 22, 2008   Diff
Added inital Gagawa PHP Port to
com.hp.gagawa.php.  Moved Java port to
com.hp.gagawa.java.
r15 by linedotstar on Dec 20, 2008   Diff
moved builder files to their own
source folder
All revisions of this file

File info

Size: 5604 bytes, 164 lines
Powered by Google Project Hosting