forked from nmonvisualizer/nmonvisualizer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
104 lines (88 loc) · 4.01 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
<?xml version="1.1" encoding="UTF-8"?>
<project name="NMON Parser" default="jar">
<property name="dir.build" value="${basedir}/build" />
<property name="dir.src" value="${basedir}/src" />
<property name="dir.lib" value="${basedir}/lib" />
<target name="jar" depends="clean-jar,compile,-get-version">
<manifest file="${basedir}/MANIFEST.MF">
<attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader" />
<attribute name="Class-Path" value="." />
<attribute name="Rsrc-Class-Path" value="./ jcommon-1.0.22.jar jfreechart-1.0.18.jar slf4j-api-1.7.7.jar slf4j-jdk14-1.7.7.jar jackson-annotations-2.4.1.jar jackson-core-2.4.1.jar jackson-databind-2.4.1.1.jar" />
<attribute name="Rsrc-Main-Class" value="com.ibm.nmon.DelegatingMain" />
</manifest>
<property name="file.jar" value="${basedir}/NMONVisualizer_${version}.jar" />
<jar destfile="${file.jar}" basedir="${dir.build}" manifest="${basedir}/MANIFEST.MF">
<!-- include the jar-in-jar-loader files _unpacked_ in the WAR file so they can be read as the Main-Class -->
<zipfileset src="${dir.lib}/jar-in-jar-loader.zip" />
<!-- do not include the jar-in-jar-loader; the loader is included unpacked -->
<fileset dir="${dir.lib}">
<exclude name="*.zip" />
</fileset>
<fileset dir="${basedir}">
<include name="LICENSE" />
<include name="NOTICE" />
</fileset>
</jar>
</target>
<target name="apijar" depends="compile,-get-version">
<property name="file.api.jar" value="${basedir}/NMONVisualizerAPI_${version}.jar" />
<jar destfile="${file.api.jar}" >
<!-- exclude most gui classes -->
<fileset dir="${dir.build}">
<exclude name="com/ibm/nmon/gui/*" />
<exclude name="com/ibm/nmon/gui/analysis/*" />
<exclude name="com/ibm/nmon/gui/chart/summary/*" />
<exclude name="com/ibm/nmon/gui/data/*" />
<exclude name="com/ibm/nmon/gui/dnd/*" />
<exclude name="com/ibm/nmon/gui/file/*" />
<exclude name="com/ibm/nmon/gui/icons/*" />
<exclude name="com/ibm/nmon/gui/info/*" />
<exclude name="com/ibm/nmon/gui/interval/*" />
<exclude name="com/ibm/nmon/gui/main/*" />
<exclude name="com/ibm/nmon/gui/parse/*" />
<exclude name="com/ibm/nmon/gui/report/*" />
<exclude name="com/ibm/nmon/gui/table/*" />
<exclude name="com/ibm/nmon/gui/time/*" />
<exclude name="com/ibm/nmon/gui/tree/*" />
<exclude name="com/ibm/nmon/gui/util/*" />
</fileset>
<!-- include Styles -->
<fileset dir="${dir.build}" includes="com/ibm/nmon/gui/Styles*" />
<fileset dir="${basedir}">
<include name="LICENSE" />
<include name="NOTICE" />
</fileset>
</jar>
</target>
<target name="compile" depends="-get-version">
<mkdir dir="${dir.build}" />
<javac srcdir="${dir.src}" destdir="${dir.build}" debug="on" target="6" source="6" includeantruntime="false">
<classpath>
<fileset dir="${dir.lib}">
<include name="**/*.jar" />
</fileset>
</classpath>
</javac>
<copy todir="${dir.build}">
<fileset dir="${dir.src}" excludes="**/*.java" />
</copy>
<!-- version file needs to be in the classpath so it can be read by the program -->
<propertyfile file="${dir.build}/com/ibm/nmon/version.properties">
<entry key="version" value="${version}" />
</propertyfile>
</target>
<target name="clean" depends="clean-jar" description="deletes the build directory">
<delete dir="${dir.build}" />
</target>
<target name="clean-jar" description="deletes the deployed jar file and manifest">
<delete dir="${basedir}">
<include name="MANIFEST.MF" />
<include name="*.jar" />
</delete>
</target>
<target name="-get-version">
<tstamp>
<format property="version" pattern="yyyy-MM-dd" />
</tstamp>
</target>
</project>