forked from cglib/cglib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
267 lines (214 loc) · 9.08 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
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="test" name="simplestore">
<!-- "cglib" was "simplestore" component of the Jakarta Commons Subproject $Id: build.xml,v 1.57 2013/12/07 16:08:19 sameb Exp $ -->
<!-- ========== Executable Targets ======================================== -->
<target description="Initialize and evaluate conditionals" name="init">
<!-- read properties from the build.properties, if any -->
<property file="${basedir}/build.properties" />
<property name="component-propfile" value="${basedir}/build.properties"/>
<property name="component.name" value="cglib"/>
<property name="component.package" value="net.sf.cglib"/>
<property name="component.title" value="cglib"/>
<property name="component.version" value="3.2"/>
<property name="build.home" value="build/proxy"/>
<property name="build.transform" value="build/transform"/>
<property name="samples.build.home" value="build/samples"/>
<property name="test.build.home" value="build/test"/>
<property name="dist.home" value="dist"/>
<property name="source.home" value="src/proxy"/>
<property name="samples.source.home" value="src/proxy/samples"/>
<property name="source.test" value="src/test"/>
<property name="source.asm" value="../asm-src"/>
<property name="compile.target" value="1.2"/>
<property name="compile.source" value="1.2"/>
<property name="compile.bootclasspath" value=""/>
<property name="compile.extdirs" value=""/>
<property name="compile.debug" value="true"/>
<property name="compile.deprecation" value="true"/>
<property name="compile.optimize" value="true"/>
<path id="compile.classpath">
<pathelement location="${build.home}/classes"/>
<fileset dir="./lib">
<include name="*.jar"/>
</fileset>
</path>
<path id="javadoc.path">
<pathelement path="${source.home}"/>
<!-- pathelement path="${source.asm}"/ -->
</path>
<!-- ========== Test Execution Defaults =================================== -->
<property name="cp" value=""/>
<property name="classpath" value="${cp}:lib/junit.jar" />
<property name="test.entry" value="net.sf.cglib.TestAll" />
<property name="test.failonerror" value="true" />
<property name="test.runner" value="junit.textui.TestRunner" />
<echo message="-------- ${component.name} ${component.version} --------"/>
</target>
<target depends="init" description="Prepare build directory" name="prepare">
<mkdir dir="${build.home}"/>
<mkdir dir="${build.home}/classes"/>
<mkdir dir="${samples.build.home}/classes"/>
<mkdir dir="${build.home}/conf"/>
<mkdir dir="${test.build.home}/classes"/>
</target>
<target depends="prepare" description="Compile shareable components"
name="compile">
<javac debug="${compile.debug}" deprecation="${compile.deprecation}" destdir="${build.home}/classes" optimize="${compile.optimize}" srcdir="${source.home}"
target="${compile.target}" bootclasspath="${compile.bootclasspath}" extdirs="${compile.extdirs}" source="${compile.source}">
<classpath refid="compile.classpath"/>
<compilerarg compiler="jikes" value="-nowarn"/>
</javac>
</target>
<target depends="init" description="Clean build and distribution directories"
name="clean">
<delete dir="${build.home}"/>
<delete dir="${test.build.home}"/>
<delete dir="${dist.home}"/>
<delete dir="${build.transform}"/>
</target>
<target depends="clean,compile"
description="Clean and compile all components"
name="all"/>
<target depends="compile"
description="Create component Javadoc documentation"
name="javadoc">
<mkdir dir="docs/api"/>
<javadoc author="true"
bottom="Copyright (c) 2001 - Apache Software Foundation"
destdir="docs"
doctitle="${component.title}"
packagenames="net.sf.cglib.*"
access="public"
classpathref="compile.classpath"
sourcepathref="javadoc.path" version="true"
windowtitle="${component.title} (Version ${component.version})"/>
</target>
<target depends="jar" name="proxy"/>
<target depends="compile" description="Create binary distribution" name="jar">
<mkdir dir="${dist.home}"/>
<mkdir dir="${build.home}/src"/>
<copy file="LICENSE" todir="${build.home}/classes"/>
<copy file="NOTICE" todir="${build.home}/classes"/>
<jar basedir="${build.home}/classes" jarfile="${dist.home}/${component.name}-${component.version}.jar" >
<include name="**/*"/>
<exclude name="samples/**" />
</jar>
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpathref="compile.classpath"/>
<jarjar basedir="${build.home}/classes" jarfile="${dist.home}/${component.name}-nodep-${component.version}.jar" >
<zipfileset dir="lib" includes="asm*.txt"/>
<zipfileset src="lib/asm-5.0.3.jar" excludes="META-INF"/>
<rule pattern="org.objectweb.asm.**" result="net.sf.cglib.asm.@1"/>
<include name="**/*"/>
<exclude name="samples/**"/>
</jarjar>
</target>
<target depends="compile,javadoc" description="Create docs and source distribution" name="srcjar">
<jar basedir="docs" jarfile="${dist.home}/${component.name}-docs-${component.version}.jar" >
<include name="**/*.html"/>
<include name="**/*.css"/>
<include name="**/*.php"/>
<include name="**/*.js"/>
<include name="**/*.pdf"/>
<include name="**/*.gif"/>
</jar>
<jar basedir="./" jarfile="${dist.home}/${component.name}-src-${component.version}.jar" >
<include name="build.xml"/>
<include name="LICENSE*"/>
<include name="NOTICE*"/>
<include name="README*"/>
<include name="src/**/*.txt"/>
<include name="src/**/*.java"/>
<include name="src/**/*.properties"/>
<include name="src/**/*.xml"/>
<include name="lib/**"/>
</jar>
</target>
<target depends="clean,jar,srcjar" description="Create binary, docs and source distributions" name="dist"/>
<target depends="compile" name="compile-samples">
<javac debug="${compile.debug}"
deprecation="${compile.deprecation}"
destdir="${samples.build.home}/classes"
optimize="${compile.optimize}"
srcdir="${samples.source.home}">
<classpath refid="compile.classpath"/>
<compilerarg compiler="jikes" value="-nowarn"/>
</javac>
</target>
<target depends="compile-samples"
description="runs samples"
name="samples-beans">
<java classname="Beans"
failonerror="${test.failonerror}"
fork="yes"
>
<classpath>
<pathelement path="${samples.build.home}/classes"/>
<pathelement path="${build.home}/classes"/>
<fileset dir="./lib">
<include name="*.*"/>
</fileset>
</classpath>
</java>
</target>
<target depends="compile-samples"
description="runs samples"
name="samples-trace">
<java classname="Trace"
failonerror="${test.failonerror}"
fork="yes"
>
<classpath>
<pathelement path="${samples.build.home}/classes"/>
<pathelement path="${build.home}/classes"/>
<fileset dir="./lib">
<include name="*.*"/>
</fileset>
</classpath>
</java>
</target>
<target depends="compile,compile-samples"
name="build-test">
<javac debug="${compile.debug}"
deprecation="${compile.deprecation}"
destdir="${test.build.home}/classes"
optimize="${compile.optimize}"
srcdir="${source.test}"
>
<classpath refid="compile.classpath"/>
<classpath>
<pathelement path="${build.home}/classes"/>
<pathelement path="${samples.build.home}/classes" />
</classpath>
<compilerarg compiler="jikes" value="-nowarn"/>
</javac>
</target>
<target depends="init,build-test"
description="runs (junit) unit tests"
name="test">
<java classname="net.sf.cglib.TestAll"
failonerror="${test.failonerror}"
fork="yes"
>
<!-- jvmarg value="-Xrunhprof:heap=all,file=debug.txt"/ -->
<!-- <jvmarg value="-verbose:gc"/> -->
<!-- <jvmarg value="-verbose:class"/> -->
<!-- <jvmarg value="-Xprof"/> -->
<!-- <jvmarg value="-server"/> -->
<!-- <sysproperty key="cglib.debugLocation" value="debug"/> -->
<!-- <jvmarg value="-Djava.security.policy==java.policy" /> -->
<!-- <jvmarg value="-Djava.security.manager" /> -->
<arg value="${test.entry}"/>
<classpath>
<pathelement path="${build.home}/classes"/>
<pathelement path="${test.build.home}/classes"/>
<pathelement path="${classpath}"/>
<pathelement path="${java.class.path}"/>
<pathelement path="${source.test}"/>
<pathelement path="${samples.build.home}/classes" />
<fileset dir="./lib">
<include name="*.jar"/>
</fileset>
</classpath>
</java>
</target>
</project>