-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.xml
More file actions
115 lines (100 loc) · 4.33 KB
/
Copy pathbuild.xml
File metadata and controls
115 lines (100 loc) · 4.33 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
<project name="flowvisor" default="dist" basedir=".">
<description>
simple example build file
</description>
<!-- set global properties for this build -->
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="docs" location="javadoc"/>
<property name="of_jar" location="lib/openflow.jar"/>
<property name="xml-ver" value="3.1.3"/>
<property name="jetty-jar" value="-7.0.2.v20100331.jar"/>
<property name="fv_classpath" location="${of_jar}:lib/xmlrpc-client-${xml-ver}.jar:lib/xmlrpc-server-${xml-ver}.jar:lib/xmlrpc-common-${xml-ver}.jar:lib/jsse.jar:lib/jetty-continuation${jetty-jar}:lib/jetty-http${jetty-jar}:lib/jetty-io${jetty-jar}:lib/jetty-server${jetty-jar}:lib/jetty-servlet${jetty-jar}:lib/servlet-api-2.5.jar:lib/jetty-security${jetty-jar}:lib/jetty-util${jetty-jar}:lib/commons-codec-1.4.jar:lib/cglib-2.2.jar:lib/junit-4.8.1.jar:lib/gson-1.7.1.jar:lib/asm-3.0.jar"/>
<property name="fv_src" location="src"/>
<property name="fv_tests" location="src.tests"/>
<property name="fv_build" location="build/"/>
<property name="fv_test_build" location="build.tests/"/>
<property name="fv_main" location="org.flowvisor.VeRTIGO"/>
<property name="fv_jar" location="${dist}/vertigo.jar"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${fv_build}"/>
<mkdir dir="${fv_test_build}"/>
</target>
<target name="compile" depends="init"
description="compile the source " >
<!-- Compile the java code from ${src} into ${build} -->
<javac debug="true" srcdir="${fv_src}" classpath="${fv_classpath}" destdir="${fv_build}"/>
</target>
<target name="compile-tests" depends="compile"
description="compile the tests " >
<!-- Compile the java code from ${tv_tests} into ${test_build} -->
<javac debug="true" srcdir="${fv_tests}" classpath="${fv_build}:${fv_classpath}" destdir="${fv_test_build}"/>
</target>
<target name="dist" depends="compile"
description="generate the distribution" >
<!-- Create the distribution directory -->
<mkdir dir="${dist}"/>
<!-- Put everything in ${fv_build} into the ${fv_jar} file -->
<jar destfile="${fv_jar}" filesetmanifest="mergewithoutmain">
<manifest>
<attribute name="Main-Class" value="org.flowvisor.VeRTIGO"/>
<attribute name="Class-Path" value="${fv_classpath}"/>
</manifest>
<fileset dir="${fv_build}"/>
</jar>
</target>
<target name="clean"
description="clean up" >
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${fv_build}"/>
<delete dir="${fv_test_build}"/>
<delete dir="${fv_dist}"/>
<delete dir="${build}"/>
<delete dir="${dist}"/>
<delete dir="${docs}"/>
</target>
<target name="run" depends="dist">
<java fork="true" jar="${fv_jar}">
<jvmarg value="-server"/>
<jvmarg value="-Xms512M"/>
<jvmarg value="-Xmx512M"/>
<arg line="${args}"/>
<classpath>
<pathelement location="${fv_jar}"/>
<pathelement location="${fv_classpath}"/>
</classpath>
</java>
</target>
<target name="javadoc">
<javadoc access="protected"
author="true"
classpath="${fv_jar}:${fv_classpath}"
destdir="${docs}"
doctitle="FlowVisor"
nodeprecated="false"
nodeprecatedlist="false"
noindex="false"
nonavbar="false"
notree="false"
source="1.6"
sourcepath="${fv_src}"
splitindex="true"
use="true"
version="true"/>
</target>
<target name="tests" depends="test">
</target>
<target name="test" depends="compile-tests">
<junit failureproperty="junit.failure">
<classpath path="${fv_build}:${fv_classpath}:${fv_test_build}"/>
<formatter type="brief" usefile="false" />
<batchtest>
<fileset dir="${fv_tests}"/>
</batchtest>
</junit>
<fail if="junit.failure" message="Unit test(s) failed. See reports!"/>
</target>
</project>