You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by da...@apache.org on 2009/10/16 20:19:08 UTC
svn commit: r826022 - /hadoop/pig/trunk/build.xml
Author: daijy
Date: Fri Oct 16 18:19:07 2009
New Revision: 826022
URL: http://svn.apache.org/viewvc?rev=826022&view=rev
Log:
PIG-1020: Include an ant target to build pig.jar without hadoop libraries
Modified:
hadoop/pig/trunk/build.xml
Modified: hadoop/pig/trunk/build.xml
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/build.xml?rev=826022&r1=826021&r2=826022&view=diff
==============================================================================
--- hadoop/pig/trunk/build.xml (original)
+++ hadoop/pig/trunk/build.xml Fri Oct 16 18:19:07 2009
@@ -64,9 +64,11 @@
<!-- jar names. TODO we might want to use the svn reversion name in the name in case it is a dev version -->
<property name="output.jarfile" value="${build.dir}/${final.name}.jar" />
+ <property name="output.jarfile.withouthadoop" value="${build.dir}/${final.name}-withouthadoop.jar" />
<property name="output.jarfile.core" value="${build.dir}/${final.name}-core.jar" />
<property name="output.jarfile.sources" value="${build.dir}/${final.name}-sources.jar" />
<!-- Maintain old pig.jar in top level directory. -->
+ <property name="output.jarfile.backcompat.withouthadoop" value="${basedir}/${name}-withouthadoop.jar" />
<property name="output.jarfile.backcompat" value="${basedir}/${name}.jar" />
<!-- test properties -->
@@ -375,15 +377,6 @@
<antcall target="jarWithOutSvn" inheritRefs="true" inheritall="true"/>
</target>
- <target name="jar-withouthadoop" depends="compile" description="Create pig jar">
- <antcall target="jarWithSvn" inheritRefs="true" inheritall="true">
- <param name="nohadooplib" value="yes" />
- </antcall>
- <antcall target="jarWithOutSvn" inheritRefs="true" inheritall="true">
- <param name="nohadooplib" value="yes" />
- </antcall>
- </target>
-
<target name="jarWithSvn" if="svn.revision">
<antcall target="buildJar" inheritRefs="true" inheritall="true">
<param name="svnString" value="${svn.revision}" />
@@ -422,9 +415,7 @@
<attribute name="Svn-Revision" value="${svnString}" />
</section>
</manifest>
- <zipfileset src="${lib.dir}/${hadoop.jarfile}">
- <exclude name="**" if="nohadooplib"/>
- </zipfileset>
+ <zipfileset src="${lib.dir}/${hadoop.jarfile}" />
<zipfileset src="${ivy.lib.dir}/junit-${junit.version}.jar" />
<zipfileset src="${ivy.lib.dir}/jsch-${jsch.version}.jar" />
<zipfileset src="${ivy.lib.dir}/jline-${jline.version}.jar" />
@@ -433,6 +424,59 @@
</target>
<!-- ================================================================== -->
+ <!-- Make pig-withouthadoop.jar -->
+ <!-- ================================================================== -->
+ <target name="jar-withouthadoop" depends="compile" description="Create pig jar withouthadoop">
+ <antcall target="jar-withouthadoopWithSvn" inheritRefs="true" inheritall="true"/>
+ <antcall target="jar-withouthadoopWithOutSvn" inheritRefs="true" inheritall="true"/>
+ </target>
+
+ <target name="jar-withouthadoopWithSvn" if="svn.revision">
+ <antcall target="buildJar-withouthadoop" inheritRefs="true" inheritall="true">
+ <param name="svnString" value="${svn.revision}" />
+ </antcall>
+ </target>
+
+ <target name="jar-withouthadoopWithOutSvn" unless="svn.revision">
+ <antcall target="buildJar-withouthadoop" inheritRefs="true" inheritall="true">
+ <param name="svnString" value=": unknown" />
+ </antcall>
+ </target>
+
+ <target name="buildJar-withouthadoop" depends="ivy-buildJar">
+ <echo>svnString ${svnString}</echo>
+ <jar jarfile="${output.jarfile.core}" basedir="${build.classes}">
+ <manifest>
+ <attribute name="Main-Class" value="org.apache.pig.Main" />
+ <section name="org/apache/pig">
+ <attribute name="Implementation-Vendor" value="Apache" />
+ <attribute name="Implementation-Title" value="Pig" />
+ <attribute name="Implementation-Version" value="${version}" />
+ <attribute name="Build-TimeStamp" value="${timestamp}" />
+ <attribute name="Svn-Revision" value="${svnString}" />
+ </section>
+ </manifest>
+ </jar>
+ <!-- @depricated -->
+ <jar jarfile="${output.jarfile.withouthadoop}" basedir="${build.classes}">
+ <manifest>
+ <attribute name="Main-Class" value="org.apache.pig.Main" />
+ <section name="org/apache/pig">
+ <attribute name="Implementation-Vendor" value="Apache" />
+ <attribute name="Implementation-Title" value="Pig" />
+ <attribute name="Implementation-Version" value="${version}" />
+ <attribute name="Build-TimeStamp" value="${timestamp}" />
+ <attribute name="Svn-Revision" value="${svnString}" />
+ </section>
+ </manifest>
+ <zipfileset src="${ivy.lib.dir}/junit-${junit.version}.jar" />
+ <zipfileset src="${ivy.lib.dir}/jsch-${jsch.version}.jar" />
+ <zipfileset src="${ivy.lib.dir}/jline-${jline.version}.jar" />
+ </jar>
+ <copy file="${output.jarfile.withouthadoop}" tofile="${output.jarfile.backcompat.withouthadoop}"/>
+ </target>
+
+ <!-- ================================================================== -->
<!-- Run unit tests -->
<!-- ================================================================== -->
<target name="test-core" depends="compile-test,jar-withouthadoop" description="Run full set of unit tests">
@@ -455,7 +499,7 @@
<sysproperty key="hod.param" value="${hod.param}"/> -->
<sysproperty key="hadoop.log.dir" value="${test.log.dir}"/>
<classpath>
- <pathelement location="${output.jarfile}" />
+ <pathelement location="${output.jarfile.withouthadoop}" />
<pathelement location="${test.build.classes}" />
<pathelement location="${junit.hadoop.conf}" />
<pathelement path="${clover.jar}"/>