|
1 | 1 | <?xml version='1.0'?> |
| 2 | + |
| 3 | +<!-- |
| 4 | +Copyright 2011, 10gen |
| 5 | +
|
| 6 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | +you may not use this file except in compliance with the License. |
| 8 | +You may obtain a copy of the License at: |
| 9 | +
|
| 10 | +http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +
|
| 12 | +Unless required by applicable law or agreed to in writing, software |
| 13 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | +See the License for the specific language governing permissions and |
| 16 | +limitations under the License. |
| 17 | +--> |
| 18 | + |
2 | 19 | <project name="MongoDB Java Driver" default="compile" basedir="."> |
3 | 20 |
|
4 | 21 | <property name="version" value="2.7.0-pre"/> |
| 22 | + <property file="build.properties" prefix="build.conf"/> |
| 23 | + |
5 | 24 | <property name="targetdir" location="target"/> |
6 | 25 | <property name="testdir" location="${targetdir}/test"/> |
7 | 26 | <dirname property="javabase" file="${java.home}"/> |
|
38 | 57 | destdir="build/main" |
39 | 58 | optimize="off" |
40 | 59 | deprecation="off" |
41 | | - source="1.5" |
42 | | - target="1.5" |
| 60 | + source="${build.conf.javac.source}" |
| 61 | + target="${build.conf.javac.source}" |
43 | 62 | encoding="ISO-8859-1" |
44 | 63 | memoryMaximumSize="256M" |
45 | 64 | fork="true" |
|
54 | 73 | destdir="build/test" |
55 | 74 | optimize="off" |
56 | 75 | deprecation="off" |
57 | | - source="1.5" |
| 76 | + source="${build.conf.javac.source}" |
58 | 77 | encoding="ISO-8859-1" |
59 | 78 | fork="true" |
60 | 79 | debug="on" |
|
71 | 90 | destdir="build/util" |
72 | 91 | optimize="off" |
73 | 92 | deprecation="off" |
74 | | - source="1.5" |
75 | | - target="1.5" |
| 93 | + source="${build.conf.javac.source}" |
| 94 | + target="${build.conf.javac.source}" |
76 | 95 | encoding="ISO-8859-1" |
77 | 96 | memoryMaximumSize="256M" |
78 | 97 | fork="true" |
|
83 | 102 | </javac> |
84 | 103 | </target> |
85 | 104 |
|
86 | | - |
87 | 105 | <target name="jar" depends="compile" description="Create driver jar"> |
88 | 106 |
|
| 107 | + <copy file="src/main/META-INF/MANIFEST.MF" tofile="build/MANIFEST.MF" filtering="true"> |
| 108 | + <filterset><filter token="VERSION" value="${build.conf.lib.version}"/></filterset> |
| 109 | + </copy> |
| 110 | + |
89 | 111 | <exec executable="git" output="build/main/git-hash"> |
90 | 112 | <arg value="log" /> |
91 | 113 | <arg value="--pretty=format:%H" /> |
92 | 114 | <arg value="-1" /> |
93 | 115 | </exec> |
94 | 116 |
|
95 | | - <jar jarfile="mongo.jar" manifest="src/main/META-INF/MANIFEST.MF" > |
| 117 | + <jar jarfile="mongo.jar" manifest="build/MANIFEST.MF"> |
96 | 118 | <fileset dir="build/main" /> |
97 | 119 | </jar> |
98 | 120 |
|
99 | | - <jar jarfile="bson.jar" > |
100 | | - <fileset dir="build/main" > |
| 121 | + <jar jarfile="bson.jar"> |
| 122 | + <fileset dir="build/main"> |
101 | 123 | <not> |
102 | 124 | <filename name="com/"/> |
103 | 125 | </not> |
104 | 126 | </fileset> |
105 | 127 | </jar> |
106 | 128 |
|
107 | | - |
108 | 129 | </target> |
109 | 130 |
|
110 | 131 | <target name="javadocs" depends="compile,utilcompile" description="Generate API docs"> |
|
113 | 134 | <javadoc packagenames="com.mongodb,com.mongodb.gridfs,com.mongodb.util,org.bson,org.bson.types,org.bson.io,org.bson.util" |
114 | 135 | sourcepath="src/main/" |
115 | 136 | defaultexcludes="yes" |
116 | | - destdir="docs/${version}" |
| 137 | + destdir="docs/${build.conf.lib.version}" |
117 | 138 | author="true" |
118 | 139 | version="true" |
119 | | - source="1.5" |
| 140 | + source="${build.conf.javac.source}" |
120 | 141 | use="true" |
121 | 142 | access="protected" |
122 | 143 | > |
|
134 | 155 | </jar> |
135 | 156 |
|
136 | 157 | <jar jarfile="mongo-javadoc.jar" > |
137 | | - <fileset dir="docs/${version}" /> |
| 158 | + <fileset dir="docs/${build.conf.lib.version}" /> |
138 | 159 | </jar> |
139 | 160 |
|
140 | 161 | <jar jarfile="bson-sources.jar" > |
141 | 162 | <fileset dir="src/main" /> |
142 | 163 | </jar> |
143 | 164 |
|
144 | 165 | <jar jarfile="bson-javadoc.jar" > |
145 | | - <fileset dir="docs/${version}" /> |
| 166 | + <fileset dir="docs/${build.conf.lib.version}" /> |
146 | 167 | </jar> |
147 | 168 |
|
148 | 169 | </target> |
|
192 | 213 | destdir="build/test" |
193 | 214 | optimize="off" |
194 | 215 | deprecation="off" |
195 | | - source="1.5" |
| 216 | + source="${build.conf.javac.source}" |
196 | 217 | encoding="ISO-8859-1" |
197 | 218 | debug="on" |
198 | 219 | includeantruntime="false"> |
|
215 | 236 | destdir="build/test" |
216 | 237 | optimize="off" |
217 | 238 | deprecation="off" |
218 | | - source="1.5" |
| 239 | + source="${build.conf.javac.source}" |
219 | 240 | encoding="ISO-8859-1" |
220 | 241 | debug="on" |
221 | 242 | includeantruntime="false"> |
|
249 | 270 | <target name="publish"> |
250 | 271 | <exec dir="." executable="python"> |
251 | 272 | <arg value="mavenPush.py"/> |
252 | | - <arg value="${version}"/> |
| 273 | + <arg value="${build.conf.lib.version}"/> |
253 | 274 | <arg value="/ebs/maven/"/> |
254 | 275 | </exec> |
255 | 276 | </target> |
256 | 277 |
|
257 | 278 | <target name="publish-local"> |
258 | 279 | <exec dir="." executable="python"> |
259 | 280 | <arg value="mavenPush.py"/> |
260 | | - <arg value="${version}"/> |
| 281 | + <arg value="${build.conf.lib.version}"/> |
261 | 282 | <arg value="~/.m2/repository/"/> |
262 | 283 | </exec> |
263 | 284 | </target> |
|
0 commit comments