-
Notifications
You must be signed in to change notification settings - Fork 30
/
build.xml
103 lines (72 loc) · 2.7 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
<project
name="Splunk Java Agent"
basedir=".."
default="build_release" >
<description>
Splunk Java Agent Build Script
</description>
<property file="build/build.properties" />
<path id="project.class.path" >
<fileset dir="${lib}" >
<include name="**/*.jar" />
</fileset>
</path>
<target name="init" >
<delete dir="${temp_build}" />
<mkdir dir="${temp_build}" />
</target>
<target
name="compile"
depends="init"
description="compile the source " >
<!-- Compile the java code from ${src} into ${build} -->
<mkdir dir="${temp_build}/${classes}" />
<javac
destdir="${temp_build}/${classes}"
srcdir="${src}"
target="${javaClassTarget}" >
<classpath refid="project.class.path" />
</javac>
</target>
<target
name="build_release"
depends="compile"
description="generate a distribution" >
<!-- Create the distribution directory -->
<copy todir="${temp_build}" >
<fileset file="${license_file}" />
<fileset file="${readme_file}" />
</copy>
<unzip src="${lib}/asm-4.1.jar" dest="${temp_build}/${classes}"/>
<unzip src="${lib}/asm-commons-4.1.jar" dest="${temp_build}/${classes}"/>
<unzip src="${lib}/castor-1.3-core.jar" dest="${temp_build}/${classes}"/>
<unzip src="${lib}/castor-1.3-xml.jar" dest="${temp_build}/${classes}"/>
<unzip src="${lib}/xercesImpl.jar" dest="${temp_build}/${classes}"/>
<unzip src="${lib}/commons-logging-1.1.1.jar" dest="${temp_build}/${classes}"/>
<jar jarfile="${temp_build}/${main_jar}" >
<fileset
dir="${temp_build}/${classes}"
excludes="com/splunk/javaagent/test/**" />
<fileset
dir="${config}"
includes="${props_file},${jmx_file}" />
<fileset
dir="${src}"
includes="com/splunk/javaagent/jmx/mapping.xml,com/splunk/javaagent/jmx/config.xsd " />
<manifest>
<attribute
name="Premain-Class"
value="${manifest-premain-class}" />
</manifest>
</jar>
<delete dir="${temp_build}/${classes}" />
<tar
compression="${compressionType}"
destfile="${release}/${product_name}${suffix}" >
<zipfileset
dir="${temp_build}"
prefix="${product_name}" />
</tar>
<delete dir="${temp_build}" />
</target>
</project>