-
Notifications
You must be signed in to change notification settings - Fork 86
/
Copy pathbuild.xml
63 lines (54 loc) · 2.37 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
<project name="orchid" default="all">
<property name="orchid.version" value="0.9.0" />
<property name="orchid.jarfile" value="orchid-${orchid.version}.jar" />
<path id="compile.classpath">
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
</path>
<condition property="xmlrpc.present">
<and>
<available classname="org.apache.xmlrpc.client.XmlRpcTransportFactory" classpathref="compile.classpath"/>
<available classname="org.apache.xmlrpc.XmlRpcException" classpathref="compile.classpath"/>
</and>
</condition>
<target name="embed" depends="compile,compile-xmlrpc,package-embed-bc"/>
<target name="all" depends="compile,compile-xmlrpc,package"/>
<target name="init">
<mkdir dir="${basedir}/bin" />
</target>
<target name="compile" depends="init">
<javac destdir="${basedir}/bin" includeantruntime="false">
<src path="${basedir}/src" />
<classpath refid="compile.classpath"/>
</javac>
</target>
<target name="compile-xmlrpc" depends="init" if="xmlrpc.present">
<echo message="compiling optional xmlrpc classes"/>
<javac srcdir="opt/xmlrpc" destdir="bin" classpathref="compile.classpath" includeantruntime="false"/>
</target>
<target name="package-embed-bc">
<jar destfile="${orchid.jarfile}">
<manifest>
<attribute name="Main-Class" value="org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader"/>
<attribute name="Rsrc-Main-Class" value="com.subgraph.orchid.TorClient"/>
<attribute name="Class-Path" value="." />
<attribute name="Rsrc-Class-Path" value="./ bcprov-jdk15on-148.jar bcpkix-jdk15on-148.jar"/>
</manifest>
<zipfileset src="${basedir}/lib/jar-in-jar-loader.zip"/>
<fileset dir="${basedir}/bin" />
<zipfileset dir="${basedir}/lib" includes="bcprov-jdk15on-148.jar"/>
<zipfileset dir="${basedir}/lib" includes="bcpkix-jdk15on-148.jar"/>
<zipfileset dir="${basedir}/data" includes="GeoIP.dat" fullpath="data/GeoIP.dat" />
</jar>
</target>
<target name="package">
<jar destfile="${orchid.jarfile}">
<manifest>
<attribute name="Main-Class" value="com.subgraph.orchid.TorClient"/>
</manifest>
<fileset dir="${basedir}/bin" />
<zipfileset dir="${basedir}/data" includes="GeoIP.dat" fullpath="data/GeoIP.dat" />
</jar>
</target>
</project>