Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 678 lines (580 sloc) 26.996 kB
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
1 <?xml version="1.0"?>
2
3 <!--
4 This file is part of Hadoop-Gpl-Compression.
5
6 Hadoop-Gpl-Compression is free software: you can redistribute it
7 and/or modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation, either version 3 of
9 the License, or (at your option) any later version.
10
11 Hadoop-Gpl-Compression is distributed in the hope that it will be
12 useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with Hadoop-Gpl-Compression. If not, see
18 <http://www.gnu.org/licenses/>.
19 -->
20
5830033 @rangadi ant target "publish-local" publishes maven artifacts to ./build/repo
rangadi authored
21 <project name="hadoop-lzo" default="compile"
25d6f91 Fixed build file so it is possible to publish artifacts to local Mave…
Mark H. Butler authored
22 xmlns:ivy="antlib:org.apache.ivy.ant"
23 xmlns:artifact="urn:maven-artifact-ant">
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
24
25 <!-- Load all the default properties, and any the user wants -->
26 <!-- to contribute (without having to type -D or edit this file -->
27 <property file="${user.home}/build.properties" />
28 <property file="${basedir}/build.properties" />
29
30 <property name="Name" value="Hadoop GPL Compression"/>
a767aa1 @toddlipcon Change name to hadoop-lzo, use it for maven name
toddlipcon authored
31 <property name="name" value="hadoop-lzo"/>
cc0cdbd @traviscrawford Bump version post-release to 0.4.17-SNAPSHOT
traviscrawford authored
32 <property name="version" value="0.4.17-SNAPSHOT"/>
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
33 <property name="final.name" value="${name}-${version}"/>
8aa0605 @toddlipcon Bump version to 0.4.14
toddlipcon authored
34 <property name="year" value="2011"/>
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
35
36 <property name="src.dir" value="${basedir}/src"/>
37 <property name="java.src.dir" value="${src.dir}/java"/>
38 <property name="native.src.dir" value="${basedir}/src/native"/>
39 <property name="lib.dir" value="${basedir}/lib"/>
40 <property name="test.lib.dir" value="${lib.dir}"/>
41
42 <property name="build.dir" value="${basedir}/build"/>
43 <property name="build.classes" value="${build.dir}/classes"/>
44 <property name="build.src" value="${build.dir}/src"/>
45 <!-- convert spaces to _ so that mac os doesn't break things -->
46 <exec executable="sed" inputstring="${os.name}"
47 outputproperty="nonspace.os">
48 <arg value="s/ /_/g"/>
49 </exec>
50 <property name="build.platform"
51 value="${nonspace.os}-${os.arch}-${sun.arch.data.model}"/>
52 <property name="jvm.arch"
53 value="${sun.arch.data.model}"/>
54 <property name="build.native" value="${build.dir}/native/${build.platform}"/>
55 <property name="build.docs" value="${build.dir}/docs"/>
56 <property name="build.javadoc" value="${build.docs}/api"/>
57 <property name="build.javadoc.dev" value="${build.docs}/dev-api"/>
58 <property name="build.encoding" value="ISO-8859-1"/>
59
60 <property name="test.src.dir" value="${basedir}/src/test"/>
61 <property name="test.build.dir" value="${build.dir}/test"/>
63eedfa @kevinweil Add in my patch to issue 17.
kevinweil authored
62 <property name="test.input.data" value="${test.src.dir}/data"/>
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
63 <property name="test.generated.dir" value="${test.build.dir}/src"/>
64 <property name="test.build.data" value="${test.build.dir}/data"/>
65 <property name="test.log.dir" value="${test.build.dir}/logs"/>
66 <property name="test.build.classes" value="${test.build.dir}/classes"/>
67
68 <property name="test.include" value="Test*"/>
69 <property name="test.classpath.id" value="test.classpath"/>
70 <property name="test.output" value="no"/>
71 <property name="test.timeout" value="900000"/>
72 <property name="test.junit.output.format" value="plain"/>
73 <property name="test.junit.fork.mode" value="perTest" />
74 <property name="test.junit.printsummary" value="yes" />
75 <property name="test.junit.haltonfailure" value="no" />
76 <property name="test.junit.maxmemory" value="512m" />
77
78 <property name="javadoc.link.java"
79 value="http://java.sun.com/javase/6/docs/api/"/>
80 <property name="javadoc.packages" value="com.hadoop.compression.*"/>
81
82 <property name="dist.dir" value="${build.dir}/${final.name}"/>
83
84 <property name="javac.debug" value="on"/>
85 <property name="javac.optimize" value="on"/>
86 <property name="javac.deprecation" value="on"/>
87 <property name="javac.version" value="1.6"/>
88 <property name="javac.args" value=""/>
89 <property name="javac.args.warnings" value="-Xlint:unchecked"/>
90
91 <property name="make.cmd" value="make"/>
92
5f0333b @kevinweil Add idea projects to .gitignore, add build properties to jar, and log…
kevinweil authored
93 <!-- IVY properties set here -->
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
94 <property name="ivy.dir" location="ivy" />
95 <loadproperties srcfile="${ivy.dir}/libraries.properties"/>
96 <property name="ivy.jar" location="${ivy.dir}/ivy-${ivy.version}.jar"/>
97 <property name="ivy_repo_url" value="http://repo2.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar"/>
98 <property name="ivysettings.xml" location="${ivy.dir}/ivysettings.xml" />
99 <property name="ivy.org" value="com.hadoop.compression"/>
100 <property name="build.dir" location="build" />
101 <property name="dist.dir" value="${build.dir}/${final.name}"/>
102 <property name="build.ivy.dir" location="${build.dir}/ivy" />
103 <property name="build.ivy.lib.dir" location="${build.ivy.dir}/lib" />
104 <property name="common.ivy.lib.dir" location="${build.ivy.lib.dir}/${ant.project.name}/common"/>
105 <property name="build.ivy.report.dir" location="${build.ivy.dir}/report" />
106 <property name="build.ivy.maven.dir" location="${build.ivy.dir}/maven" />
a767aa1 @toddlipcon Change name to hadoop-lzo, use it for maven name
toddlipcon authored
107 <property name="build.ivy.maven.pom" location="${build.ivy.maven.dir}/${name}-${version}.pom" />
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
108 <property name="build.ivy.maven.jar" location="${build.ivy.maven.dir}/${version}.jar" />
109
110 <!--this is the naming policy for artifacts we want pulled down-->
111 <property name="ivy.artifact.retrieve.pattern" value="${ant.project.name}/[conf]/[artifact]-[revision].[ext]"/>
112
113 <!--this is how artifacts that get built are named-->
25d6f91 Fixed build file so it is possible to publish artifacts to local Mave…
Mark H. Butler authored
114 <property name="ivy.publish.pattern" value="${name}-[revision].[ext]"/>
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
115 <property name="jar.name" location="${build.dir}/${final.name}.jar" />
25d6f91 Fixed build file so it is possible to publish artifacts to local Mave…
Mark H. Butler authored
116 <property name="tsk.org" value="/org/apache/maven/maven-ant-tasks/"/>
117 <property name="ant_task.jar"
118 location="${ivy.dir}/maven-ant-tasks-${ant-task.version}.jar"/>
119 <property name="mvnrepo" value="http://repo2.maven.org/maven2"/>
120 <property name="ant_task_repo_url"
121 value="${mvnrepo}${tsk.org}${ant-task.version}/maven-ant-tasks-${ant-task.version}.jar"/>
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
122
eecf59a @rangadi fix LDFLAGS for Mac. --no-as-need is not supported on Mac
rangadi authored
123 <!-- set -no-as-needed for gnu ld -->
124 <condition property="native.ldflags" value="" else="-Wl,--no-as-needed">
125 <os family="mac"/>
126 </condition>
127
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
128 <!-- the normal classpath -->
129 <path id="classpath">
130 <pathelement location="${build.classes}"/>
131 <fileset dir="${lib.dir}">
132 <include name="**/*.jar" />
133 <exclude name="**/excluded/" />
134 </fileset>
135 <pathelement location="${conf.dir}"/>
136 <path refid="ivy-common.classpath"/>
137 </path>
138
139 <!-- the unit test classpath: uses test.src.dir for configuration -->
140 <path id="test.classpath">
141 <pathelement location="${test.build.extraconf}"/>
142 <pathelement location="${test.build.classes}" />
143 <pathelement location="${test.src.dir}"/>
144 <pathelement location="${build.dir}"/>
145 <pathelement location="${build.examples}"/>
146 <pathelement location="${build.tools}"/>
147 <fileset dir="${test.lib.dir}">
148 <include name="**/*.jar" />
149 <exclude name="**/excluded/" />
150 </fileset>
151 <path refid="classpath"/>
152 </path>
153
154 <!-- the cluster test classpath: uses conf.dir for configuration -->
155 <path id="test.cluster.classpath">
156 <path refid="classpath"/>
157 <pathelement location="${test.build.classes}" />
158 <pathelement location="${test.src.dir}"/>
159 <pathelement location="${build.dir}"/>
160 </path>
161
25d6f91 Fixed build file so it is possible to publish artifacts to local Mave…
Mark H. Butler authored
162 <!-- ivy settings -->
163
164 <!-- <ivy:settings file="ivysettings.xml" /> -->
165
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
166 <!-- properties dependent on the items defined above. -->
167 <!--<available classname="${rat.reporting.classname}" classpathref="classpath" property="rat.present" value="true"/> -->
168
169 <!-- ====================================================== -->
170 <!-- Macro definitions -->
171 <!-- ====================================================== -->
172 <macrodef name="macro_tar" description="Worker Macro for tar">
173 <attribute name="param.destfile"/>
174 <element name="param.listofitems"/>
175 <sequential>
176 <tar compression="gzip" longfile="gnu"
177 destfile="@{param.destfile}">
178 <param.listofitems/>
179 </tar>
180 </sequential>
181 </macrodef>
182
25d6f91 Fixed build file so it is possible to publish artifacts to local Mave…
Mark H. Butler authored
183 <target name="ant-task-download" description="To download mvn-ant-task">
184 <get src="${ant_task_repo_url}" dest="${ant_task.jar}" usetimestamp="true"/>
185 </target>
186
187 <target name="mvn-taskdef" depends="ant-task-download">
188 <path id="mvn-ant-task.classpath" path="${ant_task.jar}"/>
189 <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
190 uri="urn:maven-artifact-ant"
191 classpathref="mvn-ant-task.classpath"/>
192 </target>
193
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
194 <!-- ====================================================== -->
195 <!-- Stuff needed by all targets -->
196 <!-- ====================================================== -->
197 <target name="init" depends="ivy-retrieve-common">
198 <mkdir dir="${build.dir}"/>
199 <mkdir dir="${build.classes}"/>
200 <mkdir dir="${build.src}"/>
201
202 <mkdir dir="${test.build.dir}"/>
203 <mkdir dir="${test.build.classes}"/>
204 </target>
205
206 <!-- ====================================================== -->
5f0333b @kevinweil Add idea projects to .gitignore, add build properties to jar, and log…
kevinweil authored
207 <!-- Build properties file -->
208 <!-- ====================================================== -->
209 <target name="buildinfo">
210 <tstamp>
211 <format property="build_time" pattern="MM/dd/yyyy hh:mm aa" timezone="GMT"/>
212 </tstamp>
c782f5d @toddlipcon Refactor calling of git into a script so we can override with an env var
toddlipcon authored
213 <exec executable="${src.dir}/get_build_revision.sh" outputproperty="build_revision" />
5f0333b @kevinweil Add idea projects to .gitignore, add build properties to jar, and log…
kevinweil authored
214 <exec executable="whoami" outputproperty="build_author"/>
215 <exec executable="uname" outputproperty="build_os">
216 <arg value="-a"/>
217 </exec>
218
219 <propertyfile file="${build.classes}/build.properties"
220 comment="This file is automatically generated - DO NOT EDIT">
221 <entry key="build_time" value="${build_time}"/>
222 <entry key="build_revision" value="${build_revision}"/>
223 <entry key="build_author" value="${build_author}"/>
224 <entry key="build_version" value="${version}"/>
225 <entry key="build_os" value="${build_os}"/>
226 </propertyfile>
227 </target>
228
229
230 <!-- ====================================================== -->
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
231 <!-- Compile the Java files -->
232 <!-- ====================================================== -->
233 <target name="compile-java" depends="init">
234 <javac
235 encoding="${build.encoding}"
236 srcdir="${java.src.dir}"
237 includes="**/*.java"
238 destdir="${build.classes}"
239 debug="${javac.debug}"
240 optimize="${javac.optimize}"
241 target="${javac.version}"
242 source="${javac.version}"
243 deprecation="${javac.deprecation}">
244 <compilerarg line="${javac.args} ${javac.args.warnings}" />
245 <classpath refid="classpath"/>
246 </javac>
247
248 <copy todir="${build.classes}">
249 <fileset dir="${java.src.dir}" includes="**/*.properties"/>
250 </copy>
251
252 </target>
04e65b8 @toddlipcon Fix build dependencies in build.xml so native doesn't rebuild unneces…
toddlipcon authored
253 <target name="check-native-uptodate">
254 <uptodate
255 property="native.uptodate"
256 targetfile="${build.native}/lib/libgplcompression.so">
257 <srcfiles dir="${native.src.dir}" includes="**/*" />
258 </uptodate>
259 </target>
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
260
04e65b8 @toddlipcon Fix build dependencies in build.xml so native doesn't rebuild unneces…
toddlipcon authored
261 <target name="compile-native" depends="compile-java,check-native-uptodate" unless="native.uptodate">
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
262
263 <mkdir dir="${build.native}/lib"/>
264 <mkdir dir="${build.native}/src/com/hadoop/compression/lzo"/>
265
266 <javah classpath="${build.classes}"
267 destdir="${build.native}/src/com/hadoop/compression/lzo"
268 force="yes"
269 verbose="yes">
270 <class name="com.hadoop.compression.lzo.LzoCompressor" />
271 <class name="com.hadoop.compression.lzo.LzoDecompressor" />
272 </javah>
273
274 <exec dir="${build.native}" executable="sh" failonerror="true">
275 <env key="OS_NAME" value="${os.name}"/>
276 <env key="OS_ARCH" value="${os.arch}"/>
eecf59a @rangadi fix LDFLAGS for Mac. --no-as-need is not supported on Mac
rangadi authored
277 <env key="LDFLAGS" value="${native.ldflags}"/>
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
278 <env key="JVM_DATA_MODEL" value="${sun.arch.data.model}"/>
279 <env key="NATIVE_SRCDIR" value="${native.src.dir}"/>
280 <arg line="${native.src.dir}/configure"/>
281 </exec>
282
283 <exec dir="${build.native}" executable="${make.cmd}" failonerror="true">
284 <env key="OS_NAME" value="${os.name}"/>
285 <env key="OS_ARCH" value="${os.arch}"/>
286 <env key="JVM_DATA_MODEL" value="${sun.arch.data.model}"/>
287 <env key="HADOOP_NATIVE_SRCDIR" value="${native.src.dir}"/>
288 </exec>
289
290 <exec dir="${build.native}" executable="sh" failonerror="true">
291 <arg line="${build.native}/libtool --mode=install cp ${build.native}/libgplcompression.la ${build.native}/lib"/>
292 </exec>
293
294 </target>
295
04e65b8 @toddlipcon Fix build dependencies in build.xml so native doesn't rebuild unneces…
toddlipcon authored
296 <target name="compile" depends="compile-java,compile-native,buildinfo"
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
297 description="Compile all">
298 </target>
299
300 <!-- ================================================================== -->
301 <!-- Make jar -->
302 <!-- ================================================================== -->
303 <!-- -->
304 <!-- ================================================================== -->
5f0333b @kevinweil Add idea projects to .gitignore, add build properties to jar, and log…
kevinweil authored
305 <target name="jar" depends="compile-java, buildinfo" description="Make jar">
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
306 <jar jarfile="${build.dir}/${final.name}.jar"
307 basedir="${build.classes}">
308 <manifest>
309 <section name="com/hadoop/compression">
310 <attribute name="Implementation-Title"
311 value="Hadoop GPL Compression"/>
312 <attribute name="Implementation-Version" value="${version}"/>
313 <attribute name="Implementation-Vendor" value="GPL3"/>
314 </section>
315 </manifest>
316 </jar>
317 </target>
318
319 <!-- ================================================================== -->
320 <!-- Compile test code -->
321 <!-- ================================================================== -->
15e8395 @toddlipcon Fix up dependencies so ant test works without ant jar first
toddlipcon authored
322 <target name="compile-java-test" depends="compile">
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
323 <javac
324 encoding="${build.encoding}"
325 srcdir="${test.src.dir}"
326 includes="com/hadoop/**/*.java"
327 destdir="${test.build.classes}"
328 debug="${javac.debug}"
329 optimize="${javac.optimize}"
330 target="${javac.version}"
331 source="${javac.version}"
332 deprecation="${javac.deprecation}">
333 <compilerarg line="${javac.args} ${javac.args.warnings}" />
334 <classpath refid="test.classpath"/>
335 </javac>
336 </target>
337
338 <!-- ================================================================== -->
339 <!-- Run unit tests -->
340 <!-- ================================================================== -->
341 <target name="test" depends="compile-java-test"
342 description="Run unit tests">
343
344 <delete dir="${test.build.data}"/>
345 <mkdir dir="${test.build.data}"/>
63eedfa @kevinweil Add in my patch to issue 17.
kevinweil authored
346 <copy todir="${test.build.data}">
347 <fileset dir="${test.input.data}"/>
348 </copy>
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
349 <delete dir="${test.log.dir}"/>
350 <mkdir dir="${test.log.dir}"/>
351 <junit showoutput="${test.output}"
352 printsummary="${test.junit.printsummary}"
353 haltonfailure="${test.junit.haltonfailure}"
354 fork="yes"
355 forkmode="${test.junit.fork.mode}"
356 maxmemory="${test.junit.maxmemory}"
357 dir="${basedir}" timeout="${test.timeout}"
358 errorProperty="tests.failed" failureProperty="tests.failed">
359 <sysproperty key="test.build.data" value="${test.build.data}"/>
360 <sysproperty key="test.cache.data" value="${test.cache.data}"/>
361 <sysproperty key="test.debug.data" value="${test.debug.data}"/>
362 <sysproperty key="hadoop.log.dir" value="${test.log.dir}"/>
363 <sysproperty key="test.src.dir" value="${test.src.dir}"/>
364 <sysproperty key="test.build.extraconf" value="${test.build.extraconf}" />
365 <sysproperty key="hadoop.policy.file" value="hadoop-policy.xml"/>
366 <sysproperty key="java.library.path"
367 value="${build.native}/lib:${lib.dir}/native/${build.platform}"/>
368 <sysproperty key="install.c++.examples" value="${install.c++.examples}"/>
369 <!-- set compile.c++ in the child jvm only if it is set -->
370 <syspropertyset dynamic="no">
371 <propertyref name="compile.c++"/>
372 </syspropertyset>
373 <classpath refid="${test.classpath.id}"/>
374 <formatter type="${test.junit.output.format}" />
375 <batchtest todir="${test.build.dir}" unless="testcase">
376 <fileset dir="${test.src.dir}"
377 includes="**/${test.include}.java"
378 excludes="**/${test.exclude}.java" />
379 </batchtest>
380 <batchtest todir="${test.build.dir}" if="testcase">
381 <fileset dir="${test.src.dir}" includes="**/${testcase}.java"/>
382 </batchtest>
383 </junit>
384 <fail if="tests.failed">Tests failed!</fail>
385 </target>
386
387 <!-- ================================================================== -->
388 <!-- Documentation -->
389 <!-- ================================================================== -->
390
391 <target name="docs" depends="javadoc"/>
392
393 <target name="javadoc-dev" description="Generate javadoc for hadoop developers">
394 <mkdir dir="${build.javadoc.dev}"/>
395 <javadoc
396 overview="${java.src.dir}/overview.html"
397 packagenames="com.hadoop.compression.*"
398 destdir="${build.javadoc.dev}"
399 author="true"
400 version="true"
401 use="true"
402 windowtitle="${Name} ${version} API"
403 doctitle="${Name} ${version} Developer API"
404 >
405 <packageset dir="${java.src.dir}"/>
406
407 <link href="${javadoc.link.java}"/>
408
409 <classpath >
410 <path refid="classpath" />
411 <fileset dir="src/contrib/">
412 <include name="*/lib/*.jar" />
413 </fileset>
414 <pathelement path="${java.class.path}"/>
415 </classpath>
416
417 <group title="Java" packages="com.hadoop.compression.*"/>
418 </javadoc>
419 </target>
420
421 <target name="javadoc" depends="compile, ivy-retrieve-javadoc"
422 description="Generate javadoc">
423 <mkdir dir="${build.javadoc}"/>
424 <javadoc
425 overview="${java.src.dir}/overview.html"
426 packagenames="com.hadoop.compression.*"
427 destdir="${build.javadoc}"
428 author="true"
429 version="true"
430 use="true"
431 windowtitle="${Name} ${version} API"
432 doctitle="${Name} ${version} API"
433 >
434 <packageset dir="${java.src.dir}"/>
435
436 <link href="${javadoc.link.java}"/>
437
438 <classpath >
439 <path refid="classpath" />
440 <path refid="javadoc-classpath"/>
441 <pathelement path="${java.class.path}"/>
442 <pathelement location="${build.tools}"/>
443 </classpath>
444
445 <group title="Java" packages="com.hadoop.compression.*"/>
446 </javadoc>
447 </target>
448
449 <!-- ================================================================== -->
450 <!-- D I S T R I B U T I O N -->
451 <!-- ================================================================== -->
452 <!-- -->
453 <!-- ================================================================== -->
454 <target name="package" depends="compile, jar, javadoc"
455 description="Build distribution">
456 <mkdir dir="${dist.dir}"/>
457 <mkdir dir="${dist.dir}/lib"/>
458 <mkdir dir="${dist.dir}/docs"/>
459
460 <copy todir="${dist.dir}/lib" includeEmptyDirs="false" flatten="true">
461 <fileset dir="${common.ivy.lib.dir}"/>
462 </copy>
463
464 <copy todir="${dist.dir}/lib" includeEmptyDirs="false">
465 <fileset dir="lib">
466 <exclude name="**/native/**"/>
467 <exclude name="*hadoop*.jar"/>
468 </fileset>
469 </copy>
470
471 <copy todir="${dist.dir}">
472 <fileset file="${build.dir}/${final.name}*.jar"/>
473 </copy>
474
475 <exec dir="${dist.dir}" executable="sh" failonerror="true">
476 <env key="BASE_NATIVE_LIB_DIR" value="${lib.dir}/native"/>
477 <env key="BUILD_NATIVE_DIR" value="${build.dir}/native"/>
478 <env key="DIST_LIB_DIR" value="${dist.dir}/lib/native"/>
479 <arg line="${native.src.dir}/packageNativeHadoop.sh"/>
480 </exec>
481
482 <copy todir="${dist.dir}/docs">
483 <fileset dir="${build.docs}"/>
484 </copy>
485
486 <copy file="ivy.xml" tofile="${dist.dir}/ivy.xml"/>
487
488 <copy todir="${dist.dir}/ivy">
489 <fileset dir="ivy"/>
490 </copy>
491
492 <copy todir="${dist.dir}">
493 <fileset dir=".">
494 <include name="*.txt" />
495 </fileset>
496 </copy>
497
498 <copy todir="${dist.dir}/src" includeEmptyDirs="true">
499 <fileset dir="src" excludes="**/*.template **/docs/build/**/*"/>
500 </copy>
501
502 <copy todir="${dist.dir}/" file="build.xml"/>
503 </target>
504
505 <!-- ================================================================== -->
506 <!-- Make release tarball -->
507 <!-- ================================================================== -->
508 <target name="tar" depends="package" description="Make release tarball">
509 <macro_tar param.destfile="${build.dir}/${final.name}.tar.gz">
510 <param.listofitems>
511 <tarfileset dir="${build.dir}" mode="664">
512 <exclude name="${final.name}/bin/*" />
513 <include name="${final.name}/**" />
514 </tarfileset>
515 <tarfileset dir="${build.dir}" mode="755">
516 <include name="${final.name}/bin/*" />
517 </tarfileset>
518 </param.listofitems>
519 </macro_tar>
520 </target>
521
522 <!-- ================================================================== -->
523 <!-- Clean. Delete the build files, and their directories -->
524 <!-- ================================================================== -->
525 <target name="clean"
526 description="Clean. Delete the build files, and their directories">
527 <delete dir="${build.dir}"/>
528 </target>
529
530 <target name="ivy-init-dirs">
531 <mkdir dir="${build.ivy.dir}" />
532 <mkdir dir="${build.ivy.lib.dir}" />
533 <mkdir dir="${build.ivy.report.dir}" />
534 <mkdir dir="${build.ivy.maven.dir}" />
535 </target>
536
537 <target name="ivy-probe-antlib" >
538 <condition property="ivy.found">
539 <typefound uri="antlib:org.apache.ivy.ant" name="cleancache"/>
540 </condition>
541 </target>
542
543 <target name="ivy-download" description="To download ivy" unless="offline">
544 <get src="${ivy_repo_url}" dest="${ivy.jar}" usetimestamp="true"/>
545 </target>
546
547 <!--
548 To avoid Ivy leaking things across big projects, always load Ivy in the same
549 classloader. Also note how we skip loading Ivy if it is already there, just
550 to make sure all is well.
551 -->
552 <target name="ivy-init-antlib" depends="ivy-download,ivy-init-dirs,ivy-probe-antlib" unless="ivy.found">
553 <typedef uri="antlib:org.apache.ivy.ant" onerror="fail"
554 loaderRef="ivyLoader">
555 <classpath>
556 <pathelement location="${ivy.jar}"/>
557 </classpath>
558 </typedef>
559 <fail >
560 <condition >
561 <not>
562 <typefound uri="antlib:org.apache.ivy.ant" name="cleancache"/>
563 </not>
564 </condition>
565 You need Apache Ivy 2.0 or later from http://ant.apache.org/
566 It could not be loaded from ${ivy_repo_url}
567 </fail>
568 </target>
569
570
571 <target name="ivy-init" depends="ivy-init-antlib" >
572
573 <!--Configure Ivy by reading in the settings file
574 If anyone has already read in a settings file into this settings ID, it gets priority
575 -->
576 <ivy:configure settingsid="${ant.project.name}.ivy.settings" file="${ivysettings.xml}" override='false'/>
577 </target>
578
579 <target name="ivy-resolve" depends="ivy-init">
580 <ivy:resolve settingsRef="${ant.project.name}.ivy.settings"/>
5830033 @rangadi ant target "publish-local" publishes maven artifacts to ./build/repo
rangadi authored
581 <ivy:makepom ivyfile="${basedir}/ivy.xml"
582 pomfile="${build.dir}/${final.name}.pom"/>
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
583 </target>
584
585 <target name="ivy-resolve-common" depends="ivy-init">
586 <ivy:resolve settingsRef="${ant.project.name}.ivy.settings" conf="common" />
587 </target>
588
589 <target name="ivy-resolve-javadoc" depends="ivy-init">
590 <ivy:resolve settingsRef="${ant.project.name}.ivy.settings" conf="javadoc"/>
591 </target>
592
593 <target name="ivy-retrieve" depends="ivy-resolve"
594 description="Retrieve Ivy-managed artifacts">
595 <ivy:retrieve settingsRef="${ant.project.name}.ivy.settings"
596 pattern="${build.ivy.lib.dir}/${ivy.artifact.retrieve.pattern}"/>
597 </target>
598
599 <target name="ivy-retrieve-common" depends="ivy-resolve-common"
600 description="Retrieve Ivy-managed artifacts for the compile configurations">
601 <ivy:retrieve settingsRef="${ant.project.name}.ivy.settings"
602 pattern="${build.ivy.lib.dir}/${ivy.artifact.retrieve.pattern}"/>
603 <ivy:cachepath pathid="ivy-common.classpath" conf="common"/>
604 </target>
605
606 <target name="ivy-retrieve-javadoc" depends="ivy-resolve-javadoc"
607 description="Retrieve Ivy-managed artifacts for the javadoc configurations">
608 <ivy:retrieve settingsRef="${ant.project.name}.ivy.settings"
609 pattern="${build.ivy.lib.dir}/${ivy.artifact.retrieve.pattern}"/>
610 <ivy:cachepath pathid="javadoc-classpath" conf="javadoc"/>
611 </target>
612
613 <target name="ready-to-publish" depends="jar,ivy-resolve"/>
614
615 <target name="ivy-publish-local" depends="ready-to-publish,ivy-resolve">
616 <ivy:publish
617 settingsRef="${ant.project.name}.ivy.settings"
618 resolver="local"
25d6f91 Fixed build file so it is possible to publish artifacts to local Mave…
Mark H. Butler authored
619 pubrevision="${version}"
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
620 overwrite="true"
621 artifactspattern="${build.dir}/${ivy.publish.pattern}" />
622 </target>
623
624
625 <!-- this is here for curiosity, to see how well the makepom task works
626 Answer: it depends whether you want transitive dependencies excluded or not
627 -->
628 <target name="makepom" depends="ivy-resolve">
629 <ivy:makepom settingsRef="${ant.project.name}.ivy.settings"
630 ivyfile="ivy.xml"
25d6f91 Fixed build file so it is possible to publish artifacts to local Mave…
Mark H. Butler authored
631 pomfile="${build.ivy.maven.dir}/${final.name}.pom">
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
632 <ivy:mapping conf="default" scope="default"/>
633 <ivy:mapping conf="master" scope="master"/>
634 <ivy:mapping conf="runtime" scope="runtime"/>
635 </ivy:makepom>
636 </target>
637
638
639 <target name="copy-jar-to-maven" depends="ready-to-publish">
25d6f91 Fixed build file so it is possible to publish artifacts to local Mave…
Mark H. Butler authored
640 <copy file="${jar.name}"
641 tofile="${build.ivy.maven.dir}/${final.name}.jar"/>
642 <checksum file="${build.ivy.maven.dir}/${final.name}.jar" algorithm="md5"/>
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
643 </target>
644
25d6f91 Fixed build file so it is possible to publish artifacts to local Mave…
Mark H. Butler authored
645 <target name="copypom" depends="ivy-init-dirs,makepom">
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
646
647 <presetdef name="expandingcopy" >
648 <copy overwrite="true">
649 <filterchain>
650 <expandproperties/>
651 </filterchain>
652 </copy>
653 </presetdef>
654
25d6f91 Fixed build file so it is possible to publish artifacts to local Mave…
Mark H. Butler authored
655 <expandingcopy file="${build.ivy.maven.dir}/${final.name}.pom"
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
656 tofile="${build.ivy.maven.pom}"/>
657 <checksum file="${build.ivy.maven.pom}" algorithm="md5"/>
658 </target>
659
660 <target name="maven-artifacts" depends="copy-jar-to-maven,copypom" />
661
25d6f91 Fixed build file so it is possible to publish artifacts to local Mave…
Mark H. Butler authored
662 <target name="published" depends="mvn-taskdef,ivy-publish-local,maven-artifacts">
663 <artifact:pom file="${build.ivy.maven.pom}" id="hadoop.lzo.mvn.install"/>
664 <artifact:install file="${build.ivy.maven.dir}/${final.name}.jar">
665 <pom refid="hadoop.lzo.mvn.install"/>
666 </artifact:install>
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
667 </target>
668
5830033 @rangadi ant target "publish-local" publishes maven artifacts to ./build/repo
rangadi authored
669 <target name="publish-local" depends="ivy-resolve, jar, mvn-taskdef"
670 description="publish maven artifact to build/repo/">
671 <artifact:deploy file="${build.dir}/${final.name}.jar">
672 <artifact:remoteRepository url="file://${build.dir}/repo"/>
673 <artifact:pom file="${build.dir}/${final.name}.pom"/>
674 </artifact:deploy>
675 </target>
676
9a623ed @kevinweil First, commit up to r41 of the mainline code.google.com/hadoop-gpl-co…
kevinweil authored
677 </project>
Something went wrong with that request. Please try again.