-
Notifications
You must be signed in to change notification settings - Fork 50
/
build.xml
130 lines (101 loc) · 3.02 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
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'?>
<project name="MongoJDBC" default="compile" basedir=".">
<property name="version" value="0.1"/>
<path id="classpath">
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
<pathelement path="conf" />
<pathelement path="build/main" />
<pathelement path="build/test" />
<pathelement path="build/examples" />
</path>
<target name="init">
<mkdir dir="build" />
<mkdir dir="build/main" />
<mkdir dir="build/test" />
<mkdir dir="build/examples" />
</target>
<target name="clean">
<delete dir="build"/>
</target>
<target name="compile" depends="init">
<javac srcdir="src/main"
destdir="build/main"
optimize="off"
deprecation="off"
source="1.5"
target="1.5"
encoding="ISO-8859-1"
memoryMaximumSize="256M"
fork="true"
debug="on" >
<classpath refid="classpath"/>
</javac>
<javac srcdir="src/test"
destdir="build/test"
optimize="off"
deprecation="off"
source="1.5"
encoding="ISO-8859-1"
debug="on" >
<classpath refid="classpath"/>
</javac>
</target>
<target name="jar" depends="compile" description="Create jdbc jar">
<exec executable="git" output="build/main/git-hash">
<arg value="log" />
<arg value="--pretty=format:%H" />
<arg value="-1" />
</exec>
<jar jarfile="mongojdbc.jar" >
<fileset dir="build/main" />
</jar>
</target>
<target name="zip" description="create zip">
<tstamp>
<format property="timenow" pattern="yyyyMMdd" />
</tstamp>
<exec executable="git">
<arg value="archive" />
<arg value="--format" />
<arg value="zip" />
<arg value="--output" />
<arg value="mongo-jdbc-${timenow}.zip" />
<arg value="--prefix" />
<arg value="mongo-jdbc-${timenow}/" />
<arg value="master" />
</exec>
</target>
<!-- - - - - - - - - - - - - - - - - - - - - - -->
<!-- test stuff -->
<!-- - - - - - - - - - - - - - - - - - - - - - -->
<taskdef name="testng"
classpathref="classpath"
classname="org.testng.TestNGAntTask"
>
</taskdef>
<target name="test" depends="compile">
<testng classpathref="classpath" outputdir="testoutput" listeners="com.mongodb.util.TestNGListener" haltonfailure="true" >
<jvmarg value="-Xmx512M" />
<xmlfileset dir="." includes="testng.xml"/>
</testng>
</target>
<target name="examples" depends="compile">
<javac srcdir="examples"
destdir="build/examples"
optimize="off"
deprecation="off"
source="1.5"
encoding="ISO-8859-1"
debug="on" >
<classpath refid="classpath"/>
</javac>
<java classname="first">
<classpath refid="classpath"/>
</java>
<java classname="blog">
<classpath refid="classpath"/>
</java>
</target>
</project>