forked from AdoptOpenJDK/jitwatch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
70 lines (61 loc) · 2.05 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
<project name="jitwatch" default="all" basedir=".">
<property name="src" value="src/main/java" />
<property name="test" value="src/test/java" />
<property name="target" value="target" />
<property name="resources" value="src/main/resources" />
<property name="classes" value="${target}/classes" />
<property name="lib" value="lib" />
<property environment="env" />
<target name="clean">
<delete quiet="true" dir="${classes}" />
<mkdir dir="${classes}" />
</target>
<path id="classpath">
<fileset dir="${lib}" includes="**/*.jar" />
<filelist>
<file name="${env.JAVA_HOME}/jre/lib/jfxrt.jar" />
<!-- Java 8 stores jfxrt in a different location -->
<file name="${env.JAVA_HOME}/jre/lib/ext/jfxrt.jar" />
<file name="${env.JAVA_HOME}/lib/tools.jar" />
</filelist>
</path>
<target name="compile">
<mkdir dir="${classes}" />
<javac srcdir="${src}" destdir="${classes}" classpathref="classpath" includeantruntime="false" />
<javac srcdir="${test}" destdir="${classes}" classpathref="classpath" includeantruntime="false" />
</target>
<target name="test" depends="compile">
<junit printsummary="yes">
<classpath>
<path refid="classpath" />
<pathelement path="${classes}" />
</classpath>
<formatter type="plain" />
<batchtest fork="yes">
<fileset dir="${test}" includes="**/Test*.java" />
</batchtest>
</junit>
</target>
<target name="jar" depends="test">
<jar destfile="${target}/jitwatch-1.0.0-SNAPSHOT.jar">
<fileset dir="${classes}">
<include name="**/*.class" />
</fileset>
<fileset dir="${resources}">
<include name="images/**" />
<include name="*.xml" />
</fileset>
<manifest>
<attribute name="Main-Class" value="org.adoptopenjdk.jitwatch.launch.LaunchUI" />
</manifest>
</jar>
</target>
<target name="run" depends="jar">
<java classname="org.adoptopenjdk.jitwatch.launch.LaunchUI" classpathref="classpath">
<classpath>
<pathelement location="${target}/jitwatch-1.0.0-SNAPSHOT.jar" />
</classpath>
</java>
</target>
<target name="all" depends="jar" />
</project>