-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.xml
98 lines (97 loc) · 4.54 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
92
93
94
95
96
97
98
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="pack" name="cacert-gigi"
xmlns:jacoco="antlib:org.jacoco.ant">
<path id="cacert-ssltest.classpath">
<pathelement location="bin" />
<fileset dir="libs">
<include name="**/*.jar" />
</fileset>
</path>
<property name="debuglevel" value="source,lines,vars" />
<property name="target" value="1.8" />
<property name="source" value="1.8" />
<target name="dependencies">
<mkdir dir="build-files/" />
<mkdir dir="libs/" />
<get skipexisting="true"
src="https://jdbc.postgresql.org/download/postgresql-9.4.1207.jar"
dest="libs/" />
<get skipexisting="true"
src="https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-distribution/9.2.9.v20150224/jetty-distribution-9.2.9.v20150224.zip"
dest="build-files/jetty.zip" />
<get skipexisting="true"
src="https://repo1.maven.org/maven2/org/bouncycastle/bcprov-jdk15on/1.51/bcprov-jdk15on-1.51.jar"
dest="build-files/bcprov-jdk15on-151.jar" />
<get skipexisting="true"
src="https://github.com/d3/d3/releases/download/v3.5.17/d3.zip"
dest="build-files/d3.zip" /><!-- static/js -->
<unzip src="build-files/d3.zip" dest="static/js">
<patternset>
<include name="d3.min.js" />
</patternset>
</unzip>
<move file="static/js/d3.min.js" tofile="static/js/d3.v3.min.js"/>
<jar destfile="libs/bcprov-jdk15on-151.jar">
<zipfileset src="build-files/bcprov-jdk15on-151.jar"
excludes="META-INF/BCKEY.*" />
</jar>
<unzip src="build-files/jetty.zip" dest="libs">
<flattenmapper />
<patternset>
<include name="**/jetty-server*.jar" />
<include name="**/jetty-security*.jar" />
<include name="**/jetty-servlet*.jar" />
<include name="**/jetty-io*.jar" />
<include name="**/jetty-util*.jar" />
<include name="**/jetty-http*.jar" />
<include name="**/servlet-api-*.jar" />
</patternset>
</unzip>
</target>
<target name="validate-cond" depends="dependencies">
<condition property="validateSuccess">
<and>
<checksum file="libs/postgresql-9.4.1207.jar" algorithm="SHA-512" property="2161b1b2cd32110ee86687d946dbeae0693e198a7ae2db7037c2a9334d43319ac88110b493a104973ecea5c3eed279ef228b62897a9d841fa666a052925cfe44"/>
<checksum file="build-files/jetty.zip" algorithm="SHA-512" property="95f30383899493d00ad5586f0a12e11ba2a3fd8b01be0953190ffa2f77d1dd248533c3d740d1d1d75f1b5c6184d14d9c8ca3faa1cf1d7639d23779345e856ea4"/>
<checksum file="build-files/bcprov-jdk15on-151.jar" algorithm="SHA-512" property="1d377e5e7567dd1d2565c4e5cc6610e5b059089819a361d0fe2eba5f58b1667eb390a17201ef48c2d43ad7df5b56f8f13bdadc74dc309a9ea581564a0eedc309"/>
<checksum file="build-files/d3.zip" algorithm="SHA-512" property="dc2edea2e59d6d91ba06f811217879499482d73b8b260999a3a06dadc7637806174fce60fcd9e11a938ccc2d25d7aaaaf9f87c481c59de086afd76b00895681f"/>
</and>
</condition>
</target>
<target name="validated-dependencies" depends="validate-cond" unless="${validateSuccess}">
<fail message="build dependencies are wrong."/>
</target>
<target name="init">
<mkdir dir="bin" />
<copy includeemptydirs="false" todir="bin">
<fileset dir="src">
<exclude name="**/*.launch" />
<exclude name="**/*.java" />
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="bin" />
</target>
<target name="full-clean" depends="clean">
<delete dir="build-files" />
<delete dir="libs" />
<delete file="ssltest.jar" />
</target>
<target depends="init,validated-dependencies" name="build">
<javac debug="true" debuglevel="${debuglevel}" destdir="bin"
includeantruntime="false" source="${source}" target="${target}">
<compilerarg value="-XDignore.symbol.file" />
<src path="src" />
<classpath refid="cacert-ssltest.classpath" />
</javac>
</target>
<target depends="build" name="pack">
<jar destfile="ssltest.jar" basedir="bin" />
</target>
<target depends="pack" name="run">
<java classname="de.dogcraft.ssltest.Standalone" fork="true" maxmemory="4G">
<classpath refid="cacert-ssltest.classpath" />
</java>
</target>
</project>