-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.xml
104 lines (94 loc) · 3.74 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
99
100
101
102
103
104
<?xml version='1.0' encoding='UTF-8'?>
<project default='all' basedir='.' xmlns:artifact="urn:maven-artifact-ant">
<!-- PROPERTIES -->
<property file='build-custom.properties' />
<property name='version' value='20190610.7'/>
<property name='name' value='owasp-java-html-sanitizer'/>
<property name='fullname' value='${name}-${version}'/>
<property name='Title' value='OWASP Java HTML Sanitizer'/>
<property name='FullTitle' value='OWASP Java HTML Sanitizer'/>
<property name='Name' value='${Title} ${version}'/>
<property name='author' value='msamuel'/>
<property name='copyright' value='(C) Copyright 2019, ${author}. All rights reserved.'/>
<property name='URL' value='https://github.com/OWASP/java-html-sanitizer'/>
<property name='compile.source' value='1.8' />
<property name='compile.target' value='1.8' />
<property name='src.dir' value='src' />
<property name='src.test.dir' value='test/java' />
<property name='doc.dir' value='doc' />
<property name='data.dir' value='data' />
<property name='lib.dir' value='lib' />
<property name='build.dir' value='build' />
<property name='build.classes.dir' value='${build.dir}/classes' />
<property name='build.test-classes.dir' value='${build.dir}/test-classes' />
<property name='build.src.dir' value='${build.dir}/src' />
<property name='build.doc.dir' value='${build.dir}/doc/javadoc' />
<property name='build.data.dir' value='${build.dir}/data/output' />
<property name='build.lib.dir' value='${build.dir}/lib' />
<property name='jar.file' value='${build.lib.dir}/${name}-${version}z.jar'/>
<target name='compile'
description="compiles the source"
unless="compile.skip">
<mkdir dir="${build.classes.dir}"/>
<echo message="Compiling the source"/>
<delete>
<fileset dir='${build.classes.dir}'>
<include name="**/*"/>
</fileset>
</delete>
<path id="master-classpath">
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
<pathelement path="${build.dir}"/>
</path>
<javac destdir='${build.classes.dir}' debug='true' encoding="ISO-8859-1"
source='${compile.source}' target='${compile.target}'
includeAntRuntime='true'>
<classpath refid="master-classpath"/>
<src path='${src.dir}' />
</javac>
<copy todir="${build.classes.dir}">
<fileset dir='${src.dir}' includes='**' excludes='META-INF/**, **/*.java*' />
</copy>
</target>
<target name='jar' depends='compile'>
<mkdir dir='${build.lib.dir}' />
<jar jarfile='${jar.file}'>
<manifest>
<attribute name="Built-By" value="${author}"/>
</manifest>
<fileset dir='${build.classes.dir}' includes='org/**/*' />
</jar>
</target>
<target name='minimal' depends='minimal-init,compile'>
<java classname='org.apache.tools.ant.Main'>
<classpath>
<pathelement path='${java.class.path}' />
<pathelement location='${lib.dir}/bcel-5.2.jar' />
</classpath>
<arg value='x-minimal' />
</java>
</target>
<target name='clean'>
<delete dir='${build.dir}' />
</target>
<target name='compile.test' depends="compile" description="compiles the test classes">
<mkdir dir="${build.test-classes.dir}"/>
<javac destdir='${build.test-classes.dir}' debug='true' encoding="ISO-8859-1"
source='${compile.source}' target='${compile.target}'
includeAntRuntime='true'>
<classpath>
<fileset dir='${lib.dir}' includes='xml-apis.jar,xerces*.jar, junit*.jar' />
<pathelement location='${build.classes.dir}' />
</classpath>
<src path='${src.test.dir}' />
</javac>
</target>
<target name='minimal-init' unless='bcel.available'>
<fail>
!!! REQUIRED FILES MISSING !!!
Please install the BCEL jars into the lib/ directory.
</fail>
</target>
</project>