-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
67 lines (56 loc) · 2.14 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
<project name="SerialThread" default="dist" basedir=".">
<property name="version" value="0.0.1"/>
<property name="src" value="${basedir}/src/main/java"/>
<property name="resources" value="${basedir}/src/main/resources"/>
<property name="lib" value="${basedir}/lib"/>
<property name="target" value="${basedir}/target"/>
<property name="classes" value="${target}/classes"/>
<property name="project.jar" value="${target}/serialthreads.jar"/>
<property name="project-src.zip" value="${target}/serialthreads-src.zip"/>
<path id="classpath">
<pathelement location="${classes}"/>
<fileset dir="${lib}">
<include name="*.jar"/>
<exclude name="asm-all-*.jar"/>
</fileset>
</path>
<target name="init">
<tstamp>
<format property="TODAY" pattern="dd.MM.yyyy" locale="de"/>
</tstamp>
<mkdir dir="${target}"/>
</target>
<target name="clean">
<delete dir="${target}"/>
</target>
<target name="copyResources">
<copy todir="${target}/classes">
<fileset dir="${resources}"/>
</copy>
</target>
<target name="compile" depends="init">
<mkdir dir="${classes}"/>
<javac srcdir="${src}" classpathref="classpath" destdir="${target}/classes" debug="true"/>
</target>
<target name="jar" depends="compile, copyResources">
<jar basedir="${classes}" destfile="${project.jar}" update="false">
<zipfileset src="${lib}/asm-debug-all-4.0.jar"/>
<manifest>
<attribute name="Implementation-Title" value="SerialThreads"/>
<attribute name="Implementation-Version" value="${version} ${TODAY}"/>
<attribute name="Premain-Class" value="org.serialthreads.agent.Agent"/>
<attribute name="Agent-Class" value="org.serialthreads.agent.Agent"/>
<attribute name="Can-Redefine-Classes" value="true"/>
<attribute name="Can-Retransform-Classes" value="false"/>
</manifest>
</jar>
</target>
<target name="src">
<zip destfile="${project-src.zip}" update="false">
<fileset dir="${src}"/>
<fileset dir="${resources}"/>
</zip>
</target>
<target name="all" depends="jar, src"/>
<target name="dist" depends="clean, all"/>
</project>