forked from jlavallee/JMeter-Rabbit-AMQP
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
90 lines (72 loc) · 3.24 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
<?xml version="1.0"?>
<project name="JMeter-AMQP" default="package" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
To build JMeter-AMQP from source:
ant
To rebuild:
ant clean package
For more info:
ant -projecthelp
</description>
<!-- Check the Ant version -->
<available property="Ant-1.8.0-or-later" classname="org.apache.tools.ant.taskdefs.Local"/>
<fail message="This build requires Ant 1.8.0 or later" unless="Ant-1.8.0-or-later"/>
<property name="src.dir" value="src/main"/>
<property name="build.dir" value="target/classes"/>
<property name="dest.dir" value="target/dist"/>
<property name="lib.dir" value="lib"/>
<!-- Compilation parameters -->
<property name="optimize" value="on"/>
<property name="deprecation" value="off"/>
<property name="target.java.version" value="1.5"/>
<property name="src.java.version" value="1.5"/>
<property name="encoding" value="UTF-8"/>
<property name="includeAntRuntime" value="false"/>
<property name="ivy.install.version" value="2.3.0"/>
<property name="ivy.jar.dir" value="${basedir}/ivy"/>
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar"/>
<target name="compile" depends="resolve-dependencies" description="Compile.">
<echo>Compiling</echo>
<mkdir dir="${build.dir}"/>
<javac classpathref="lib.path.id" srcdir="${src.dir}" destdir="${build.dir}" optimize="${optimize}" source="${src.java.version}" debug="on" target="${target.java.version}" includeAntRuntime="${includeAntRuntime}" deprecation="${deprecation}" encoding="${encoding}">
<include name="**/*.java"/>
<include name="**/*.properties"/>
<classpath>
<pathelement location="classes"/>
<dirset dir="${build.dir}">
<include name="**/classes"/>
</dirset>
</classpath>
</javac>
</target>
<target name="resolve-dependencies" depends="install-ivy" description="Resolving Dependencies.">
<echo>Resolving properties</echo>
<ivy:resolve/>
<ivy:cachepath pathid="lib.path.id" conf="build"/>
</target>
<target name="install-ivy" depends="download-ivy" description="Installing Ivy">
<path id="ivy.lib.path">
<fileset dir="${ivy.jar.dir}" includes="*.jar"/>
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
</target>
<target name="download-ivy" unless="skip.ivy.download" description="Download Ivy">
<mkdir dir="${ivy.jar.dir}"/>
<get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar" dest="${ivy.jar.file}" usetimestamp="true"/>
</target>
<target name="package" depends="compile"
description="Compile everything and create the jars">
<mkdir dir="${dest.dir}"/>
<jar jarfile="${dest.dir}/JMeterAMQP.jar"
basedir="${build.dir}">
<fileset dir="${build.dir}" includes="**/*.class" />
<fileset dir="${src.dir}" includes="**/*.properties" />
</jar>
</target>
<target name="clean" description="Clean up to force a build from source.">
<delete quiet="true">
<fileset dir="${dest.dir}" includes="*.jar"/>
<fileset dir="${build.dir}"/>
</delete>
</target>
</project>