-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
91 lines (85 loc) · 3.02 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
<project name="tunnelingproxy" default="build">
<!-- Use ivy to manage our external library dependencies and to set
up our classpaths -->
<import file="build-ivy.xml"/>
<target name="classpaths" depends="ivy"
description="Set up classpaths, including external libraries retrieved by ivy">
<path id="compile.classpath">
<path refid="ivy.compile.classpath"/>
<pathelement location="build/tunnelingproxy"/>
</path>
<path id="test.compile.classpath">
<path refid="ivy.compile.classpath"/>
<path refid="ivy.test.classpath"/>
<pathelement location="build/tunnelingproxy"/>
</path>
<path id="runtime.classpath">
<path refid="ivy.runtime.classpath"/>
<pathelement location="build/tunnelingproxy"/>
</path>
<path id="test.classpath">
<path refid="ivy.test.classpath"/>
<pathelement location="build/tunnelingproxy"/>
<pathelement location="build/tests"/>
</path>
</target>
<target name="clean" description="Clean the target directory">
<delete dir="build"/>
</target>
<target name="clean-ivycache" description="Clean the ivycache directory (where external ivy-managed libraries are kept so that "ant clean" doesn't force a re-download of all external libraries)">
<delete dir=".ivycache"/>
</target>
<target name="clean-all" depends="clean,clean-ivycache"/>
<target name="build" depends="build-java">
</target>
<target name="build-java" description="Build the java sources"
depends="classpaths">
<mkdir dir="build/tunnelingproxy"/>
<javac destdir="build/tunnelingproxy"
debug="true"
classpathref="compile.classpath"
includeAntRuntime="false"
source="1.8"
>
<compilerarg value="-Xlint:unchecked"/>
<src path="src/java"/>
<include name="**/*.java"/>
</javac>
<copy todir="build/tunnelingproxy">
<fileset dir="src/java" excludes="**/*.java"/>
</copy>
</target>
<target name="javadoc" description="Generate the javadoc for the project">
<javadoc destdir="build/javadoc">
<sourcepath>
<pathelement location="src/java"/>
</sourcepath>
</javadoc>
</target>
<target name="runproxy" depends="build">
<java classpathref="runtime.classpath"
classname="com.noteflight.tunnelingproxy.TunnelingProxy"
fork="true">
<arg value="-httpPort"/>
<arg value="8181"/>
<arg value="-agentPort"/>
<arg value="8182"/>
</java>
</target>
<target name="runagent" depends="build">
<java classpathref="runtime.classpath"
classname="com.noteflight.tunnelingproxy.TunnelingAgent"
fork="true">
<arg value="-proxyHost"/>
<arg value="localhost"/>
<arg value="-proxyPort"/>
<arg value="8182"/>
<arg value="-proxiedHostname"/>
<arg value="public.localtest.com:8181"/>
<arg value="-originHost"/>
<arg value="localhost"/>
<arg value="-originPort"/>
<arg value="3000"/>
</java>
</target>
</project>