-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathbuild.xml
More file actions
67 lines (66 loc) · 2.54 KB
/
build.xml
File metadata and controls
67 lines (66 loc) · 2.54 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build" name="rtb-example">
<property environment="env"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.6"/>
<property name="source" value="1.6"/>
<path id="rtb-example.classpath">
<pathelement location="bin"/>
<pathelement location="lib/jetty-all-7.6.1.v20120215.jar"/>
<pathelement location="lib/servlet-api-2.5.jar"/>
</path>
<target name="init">
<mkdir dir="bin"/>
<copy includeemptydirs="false" todir="bin">
<fileset dir="src">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="bin"/>
<delete dir="build"/>
<delete dir="dist"/>
</target>
<target depends="clean" name="cleanall"/>
<target depends="build-project" name="build"/>
<target depends="init" name="build-project">
<echo message="${ant.project.name}: ${ant.file}"/>
<javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}">
<src path="src"/>
<classpath refid="rtb-example.classpath"/>
</javac>
</target>
<target name="jar" depends="build-project">
<mkdir dir="build"/>
<jar destfile="build/rtb-example.jar" filesetmanifest="mergewithoutmain">
<manifest>
<attribute name="Main-Class" value="com.adbrite.rtb.example.RTBServer"/>
<attribute name="Class-Path" value="."/>
</manifest>
<fileset dir="bin"/>
<zipfileset excludes="META-INF/*.SF" src="lib/jetty-all-7.6.1.v20120215.jar"/>
<zipfileset excludes="META-INF/*.SF" src="lib/servlet-api-2.5.jar"/>
</jar>
<copy todir="build">
<!-- Copy scripts in the same directory there rtb-example.jar is created. Makes testing easier. -->
<fileset dir="scripts"/>
</copy>
<chmod perm="a+x">
<fileset dir="build">
<include name="**/*.sh"/>
</fileset>
</chmod>
</target>
<target name="dist" depends="jar">
<mkdir dir="dist"/>
<zip destfile="dist/rtb-example-source.zip">
<fileset dir="." excludes="bin/**,build/**,dist/**,scripts/**,build.xml"/>
</zip>
<zip destfile="dist/rtb-example.zip">
<fileset file="build/rtb-example.jar"/>
<fileset file="scripts/rtb-example.sh"/>
<fileset file="scripts/request.json"/>
</zip>
</target>
</project>