forked from WebEngage/responseheaderfilter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml.old
79 lines (67 loc) · 3.17 KB
/
build.xml.old
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
<?xml version="1.0"?>
<!--
Copyright 2009 Avlesh Singh
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="responseheaderfilter" basedir="." default="help">
<property name="java-src.dir" value="src/main/java" />
<property name="lib.dir" value="lib" />
<property name="build.dir" value="build" />
<property name="dist.dir" value="dist" />
<property name="project.name" value="response-header-filter" />
<property name="project.version" value="1.0" />
<property name="archive.name" value="${project.name}-${project.version}" />
<path id="classpath">
<fileset dir="${lib.dir}" includes="*.jar" />
<pathelement path="${build.dir}" />
</path>
<target name="help">
<echo message="" />
<echo message="${project.name} build file" />
<echo message="-----------------------------------" />
<echo message="" />
<echo message="Available targets are:" />
<echo message="" />
<echo message="clean --> Deletes compiled classes and JAR" />
<echo message="" />
<echo message="compile --> Compile all Java files" />
<echo message="jar --> Package as JAR file" />
<echo message="sourceZip --> Creates a source zip archive" />
</target>
<target name="compile" description="Compile main source tree java files">
<mkdir dir="${build.dir}/classes" />
<javac destdir="${build.dir}/classes" debug="true" optimize="false" deprecation="false" failonerror="true">
<src path="${java-src.dir}" />
<classpath refid="classpath" />
</javac>
</target>
<target name="jar" depends="compile" description="packages up the class files into jar files">
<jar destfile="${build.dir}/${archive.name}.jar" basedir="${build.dir}/classes" includes="**"/>
<move file="${build.dir}/${archive.name}.jar" todir="${dist.dir}" overwrite="true"/>
</target>
<target name="sourceZip" depends="compile" description="packages up the class files into jar files">
<delete dir="${dist.dir}/source/${archive.name}-src" failonerror="false"/>
<delete file="${dist.dir}/${archive.name}-src.zip" failonerror="false"/>
<mkdir dir="${dist.dir}/source/${archive.name}-src"/>
<copy todir="${dist.dir}/source/${archive.name}-src" overwrite="true">
<fileset dir="." excludes="dist/**, build/**, *.iml, *.ipr, *.iws, **/.svn/**"/>
</copy>
<zip basedir="${dist.dir}/source" destfile="${dist.dir}/${archive.name}-src.zip"/>
<delete dir="${dist.dir}/source" failonerror="false"/>
</target>
<target name="dist" depends="clean">
<antcall target="jar"/>
<antcall target="sourceZip"/>
</target>
<target name="clean" description="Clean output directories">
<delete dir="${build.dir}"/>
</target>
</project>