forked from ESAPI/esapi-java-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
130 lines (122 loc) · 4.62 KB
/
Copy pathbuild.xml
File metadata and controls
130 lines (122 loc) · 4.62 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
125
126
127
128
129
130
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="dist" name="owasp-esapi-java">
<target name="init">
<property file="local.properties"/>
<buildnumber/>
<property name="project.name" value="${ant.project.name}"/>
<property name="project.version" value="1.2.1"/>
<property name="build.dir" location="${basedir}/build"/>
<property name="jar" location="${build.dir}/${project.name}-classes.jar"/>
<property name="src.dir" location="${basedir}/src"/>
<property name="test.dir" location="${basedir}/test"/>
<property name="dist.dir" location="${basedir}/dist"/>
<property name="javadoc.dir" location="${basedir}/doc/api"/>
</target>
<target depends="init" description="clean up the build area" name="clean">
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${build.dir}" includes="**/*"/>
<fileset dir="${dist.dir}" includes="**/*"/>
</delete>
<mkdir dir="${build.dir}"/>
<mkdir dir="${dist.dir}"/>
</target>
<target depends="init" description="Compile the sources" name="compile">
<javac
deprecation="yes"
destdir="${build.dir}"
listfiles="no"
optimize="on"
srcdir="${src.dir}"
debug="on"
source="1.4"
target="1.4"
>
<classpath>
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</classpath>
</javac>
</target>
<target depends="compile" description="Build a jar file" name="build">
<jar basedir="${build.dir}" jarfile="${jar}">
</jar>
</target>
<target
depends="init,clean"
description="packages up the source files"
name="source"
>
<zip destfile="${dist.dir}/${project.name}-src-${project.version}.zip">
<zipfileset
dir="${basedir}"
includes="build.xml"
prefix="${project.name}-${project.version}"
/>
<zipfileset
dir="${src.dir}"
excludes="**/.*"
prefix="${project.name}-${project.version}/src"
/>
<zipfileset
dir="${test.dir}"
excludes="**/.*"
prefix="${project.name}-${project.version}/test"
/>
</zip>
</target>
<target depends="clean,build"
description="Build a standalone self-contained jar"
name="proguard" >
<taskdef
classpath="${proguard.location}/lib/proguard.jar"
resource="proguard/ant/task.properties"
/>
<!-- ProGuard is used simply to aggregate the various libraries into -->
<!-- a single distributable. No shrinking, optimization or obfuscation -->
<!-- is performed. We ignore warnings about certain missing classes -->
<!-- since they are not used/required -->
<!-- rt.jar is different on MacOS X: it's split into two -->
<condition property="jre.runtime"
value="/System/Library/Frameworks/JavaVM.framework/Classes/classes.jar"
else="${java.home}/lib/rt.jar" >
<and>
<os family="mac"/>
<os family="unix"/>
</and>
</condition>
<!-- jsse.jar is simply located in a different director on MacOS X -->
<condition property="jsse.location"
value="/System/Library/Frameworks/JavaVM.framework/Classes/jsse.jar"
else="${java.home}/lib/jsse.jar" >
<and>
<os family="mac"/>
<os family="unix"/>
</and>
</condition>
<proguard
ignorewarnings="false"
obfuscate="false"
optimize="false"
shrink="false"
verbose="false"
printusage="false"
>
<injar name="${jar}"/>
<injar name="lib/antisamy-bin.1.2.jar" filter="!META-INF/*"/>
<injar name="lib/commons-fileupload-1.2.jar" filter="!META-INF/*"/>
<injar name="lib/commons-io-1.3.2.jar" filter="!META-INF/*"/>
<libraryjar name="${jre.runtime}"/>
<libraryjar name="${jsse.location}"/>
<libraryjar name="lib/servlet-api.jar"/>
<libraryjar name="lib/jsp-api.jar"/>
<libraryjar name="lib/xml-apis-ext.jar"/>
<outjar name="${dist.dir}/${project.name}-${project.version}.jar"/>
</proguard>
</target>
<target
depends="clean,source,build,proguard"
description="Build all distributables"
name="dist"
/>
</project>