-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.xml
221 lines (180 loc) · 8.11 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="jTracert" default="all">
<!--
Distributed under GNU GENERAL PUBLIC LICENSE Version 3
Author: [email protected]
-->
<property file="build.properties"/>
<property name="compile.debug" value="true" />
<property name="src.dir" value="src"/>
<property name="src.test.dir" value="test"/>
<property name="config.dir" value="config"/>
<property name="classes.dir" value="classes"/>
<property name="classes.project.dir" value="${classes.dir}/project"/>
<property name="classes.test.dir" value="${classes.dir}/test"/>
<property name="deploy.dir" value="deploy"/>
<property name="release.dir" value="release"/>
<property name="release.version" value="0.1.3"/>
<property name="lib.dir" value="lib"/>
<property name="lib.build.dir" value="lib/build"/>
<property name="lib.runtime.dir" value="lib/runtime"/>
<property name="lib.gui.dir" value="lib/gui"/>
<path id="build.classpath">
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="clean">
<delete dir="${classes.dir}"/>
<delete dir="${deploy.dir}"/>
<delete dir="${release.dir}"/>
<delete dir="junit"/>
</target>
<target name="init">
<mkdir dir="${classes.dir}"/>
<mkdir dir="${classes.project.dir}"/>
<mkdir dir="${classes.test.dir}"/>
<mkdir dir="${deploy.dir}"/>
<mkdir dir="${release.dir}"/>
</target>
<target name="compile.test" depends="compile">
<javac destdir="${classes.test.dir}" debug="${compile.debug}">
<src path="${src.test.dir}"/>
<classpath refid="build.classpath"/>
<classpath path="${classes.project.dir}"/>
</javac>
</target>
<target name="asm" depends="compile.test">
<java classname="org.objectweb.asm.util.ASMifierClassVisitor" fork="true">
<!--<arg value="com.google.code.jtracert.instrument.impl.asm.InstrumentedClassLoader"/>-->
<!--<arg value="com.google.code.jtracert.instrument.impl.asm.HandleObjectConstructor"/>-->
<arg value="com.google.code.jtracert.instrument.impl.asm.SystemMethodAdapter"/>
<classpath location="lib/runtime/asm-3.1.jar"/>
<classpath location="lib/runtime/asm-util-3.1.jar"/>
<classpath path="${classes.test.dir}"/>
</java>
</target>
<target name="test" depends="compile.test">
<mkdir dir="junit"/>
<junit printsummary="yes" haltonerror="yes" showoutput="yes">
<classpath path="${classes.project.dir}"/>
<classpath path="${classes.test.dir}"/>
<classpath refid="build.classpath"/>
<batchtest todir="junit">
<fileset dir="${src.test.dir}">
<include name="**/*Test.java"/>
</fileset>
</batchtest>
<formatter type="plain" />
</junit>
</target>
<target name="compile" depends="init">
<javac destdir="${classes.project.dir}" debug="${compile.debug}" target="1.5" deprecation="on">
<src path="${src.dir}"/>
<classpath refid="build.classpath"/>
</javac>
</target>
<target name="jar" depends="compile">
<taskdef
name="jarjar"
classname="com.tonicsystems.jarjar.JarJarTask"
classpath="${lib.build.dir}/jarjar-1.0rc7.jar"/>
<jarjar destfile="${deploy.dir}/jTracert.jar">
<manifest>
<attribute name="Premain-Class" value="com.google.code.jtracert.agent.JTracertAgent"/>
<attribute name="Boot-Class-Path" value="jTracert.jar"/>
<attribute name="Can-Set-Native-Method-Prefix" value="true"/>
<attribute name="Can-Retransform-Classes" value="true"/>
<attribute name="Can-Redefine-Classes" value="true"/>
<attribute name="Implementation-Vendor" value="Dmitry Bedrin"/>
<attribute name="Implementation-Title" value="jTracert"/>
<attribute name="Implementation-Version" value="${release.version}"/>
</manifest>
<fileset dir="${classes.project.dir}" includes="com/google/code/jtracert/**">
<exclude name="com/google/code/jtracert/gui/**"/>
</fileset>
<zipfileset src="${lib.runtime.dir}/asm-3.1.jar"/>
<zipfileset src="${lib.runtime.dir}/asm-commons-3.1.jar"/>
<zipfileset src="${lib.runtime.dir}/asm-tree-3.1.jar"/>
<zipfileset src="${lib.runtime.dir}/asm-util-3.1.jar"/>
<zipfileset src="${lib.runtime.dir}/asm-analysis-3.1.jar"/>
<rule pattern="org.objectweb.asm.**" result="com.google.code.jtracert.org.objectweb.asm.@1"/>
</jarjar>
</target>
<target name="gui.jar" depends="jar">
<jar destfile="${deploy.dir}/jTracert-gui.jar">
<fileset dir="${classes.project.dir}" includes="com/google/code/jtracert/gui/**"/>
<manifest>
<attribute name="Main-Class" value="com.google.code.jtracert.gui.MainApp"/>
<attribute name="Implementation-Vendor" value="Dmitry Bedrin"/>
<attribute name="Implementation-Title" value="jTracert"/>
<attribute name="Implementation-Version" value="${release.version}"/>
<attribute name="Class-Path" value="sdedit-3.0.5.jar jTracert.jar"/>
</manifest>
</jar>
<copy todir="deploy">
<fileset dir="bin" includes="*.cmd,*.sh"/>
<fileset file="readme.txt"/>
<fileset file="license.txt"/>
<fileset dir="." includes="3ppLicense/*.txt"/>
<fileset dir="${lib.gui.dir}" includes="sdedit-3.0.5.jar"/>
</copy>
<chmod file="bin/jtracert.sh" perm="+x"/>
<chmod file="deploy/jtracert.sh" perm="+x"/>
<taskdef
name="jsmoothgen"
classname="net.charabia.jsmoothgen.ant.JSmoothGen"
classpath="lib/izpack/jsmoothgen-ant.jar"/>
<jsmoothgen
project="wrapper.jsmooth"
skeletonroot="lib/izpack/skeletons"/>
</target>
<target name="integration.test" depends="jar">
<ant dir="samples/jTracertTestCase"/>
<ant dir="samples/simpleApp1"/>
<ant dir="samples/simpleApp2"/>
<ant dir="samples/jaxbApplication"/>
<ant dir="samples/issue8"/>
<ant dir="samples/xerces"/>
<ant dir="samples/issue9"/>
<ant dir="samples/constructor"/>
<ant dir="samples/bootStrapClassConstructor"/>
<ant dir="samples/issue13"/>
<ant dir="samples/issue15"/>
<ant dir="samples/equinox"/>
<ant dir="samples/log4j"/>
<ant dir="samples/heap"/>
<ant dir="samples/callTraceSize"/>
<ant dir="samples/xalan"/>
</target>
<target name="all" depends="jar,gui.jar"/>
<target name="izpack" depends="all">
<taskdef
name="izpack"
classpath="lib/izpack/standalone-compiler.jar"
classname="com.izforge.izpack.ant.IzPackTask"/>
<izpack
input="install.xml"
output="${release.dir}/jTracert-${release.version}-setup.jar"
basedir="."
installerType="standard"
inheritAll="true"
/>
<jsmoothgen
project="exe.jsmooth"
skeletonroot="lib/izpack/skeletons"/>
</target>
<target name="release" depends="all,test,integration.test,izpack">
<zip
destfile="${release.dir}/jTracert-${release.version}-src.zip"
basedir="."
excludes="samples/**, classes/**, deploy/**, release/**, *.iml, *.ipr, *.iws"/>
<zip
destfile="${release.dir}/jTracert-${release.version}-samples-src.zip"
basedir="."
excludes="classes/**, deploy/**, release/**, *.iml, *.ipr, *.iws"/>
<zip
destfile="${release.dir}/jTracert-${release.version}.zip"
basedir="${deploy.dir}"/>
</target>
</project>