-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
124 lines (103 loc) · 4.9 KB
/
build.xml
File metadata and controls
124 lines (103 loc) · 4.9 KB
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<?xml version="1.0" encoding="utf-8"?>
<project name="JFVClient" default="dist" basedir=".">
<description>
Java client to control FlowVisor
</description>
<!-- set global properties for this build. These should probably go into
a properties file. -->
<property name="src" location="src" />
<property name="test.src" location="tests" />
<property name="build" location="build" />
<property name="test.build" location="${build}/tests/" />
<property name="dist" location="dist" />
<property name="doc" location="${dist}/doc" />
<property name="lib" location="lib" />
<property name="jar.file" location="${dist}/jfvclient.jar" />
<property name="test.jar.file" location="${dist}/tests.jar" />
<!-- These should be set to values that make sense for your installation. -->
<property name="trustStore" value="${user.home}/.keystore" />
<property name="trustStorePass" value="blabla" />
<target name="init">
<!-- Create the time stamp -->
<tstamp />
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}" />
</target>
<target name="compile" depends="init" description="compile the source ">
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}" classpath="${lib}/gson-2.1.jar" />
</target>
<target name="dist" depends="compile" description="generate the distribution">
<!-- Create the distribution directory -->
<mkdir dir="${dist}" />
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
<jar jarfile="${jar.file}" basedir="${build}" />
</target>
<target name="make-tests" depends="dist">
<!-- need to build it into a separate directory -->
<mkdir dir="${test.build}" />
<javac srcdir="${test.src}" destdir="${test.build}"
classpath="${jar.file}:${lib}/gson-2.1.jar:${lib}/junit.jar" />
<jar jarfile="${test.jar.file}" basedir="${test.build}" />
</target>
<!-- should probably break the "test" target into two, those that need a
running FlowVisor, and those that work by themselves. -->
<target name="test-all" depends="test-local,test-remote" description="run unit tests">
</target>
<target name="test-local" depends="dist,make-tests"
description="run unit tests that don't need a running FlowVisor.">
<junit printsummary="yes" haltonfailure="no" haltonerror="no"
fork="yes" dir="${basedir}">
<jvmarg value="-Djavax.net.ssl.trustStore=${trustStore}" />
<jvmarg value="-Djavax.net.ssl.trustStorePass=${trustStorePass}" />
<classpath>
<pathelement location="${test.jar.file}" />
<pathelement location="${jar.file}" />
<pathelement location="${lib}/junit.jar" />
<pathelement location="${lib}/gson-2.1.jar" />
</classpath>
<formatter type="plain" usefile="no"/>
<batchtest >
<fileset dir="${test.src}">
<include name="**/data/*.java" />
<include name="**/requests/*.java" />
<include name="**/responses/*.java" />
</fileset>
</batchtest>
</junit>
</target>
<target name="test-remote" depends="dist, make-tests"
description="run unit tests that need a running FlowVisor.">
<junit printsummary="yes" haltonfailure="no" haltonerror="no"
fork="yes" dir="${basedir}">
<jvmarg value="-Djavax.net.ssl.trustStore=${trustStore}" />
<jvmarg value="-Djavax.net.ssl.trustStorePass=${trustStorePass}" />
<classpath>
<pathelement location="${test.jar.file}" />
<pathelement location="${jar.file}" />
<pathelement location="${lib}/junit.jar" />
<pathelement location="${lib}/gson-2.1.jar" />
</classpath>
<formatter type="plain" usefile="no"/>
<test name="org.jfvclient.RequestResponseTests">
</test>
</junit>
</target>
<target name="clean" description="clean up">
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}" verbose="true" />
<delete dir="${dist}" verbose="true"/>
<!-- delete the various test results. -->
<delete verbose="yes">
<fileset dir="." includes="TEST-*" />
</delete>
</target>
<target name="doc" description="make javadoc">
<mkdir dir="doc"/>
<javadoc destdir="doc" sourcepath="${src}" author="true">
<classpath>
<pathelement location="${lib}/gson-2.1.jar" />
</classpath>
</javadoc>
</target>
</project>