You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-commits@hadoop.apache.org by to...@apache.org on 2011/01/11 20:15:25 UTC
svn commit: r1057806 - in /hadoop/mapreduce/trunk: CHANGES.txt build.xml
ivy/libraries.properties
Author: tomwhite
Date: Tue Jan 11 19:15:24 2011
New Revision: 1057806
URL: http://svn.apache.org/viewvc?rev=1057806&view=rev
Log:
MAPREDUCE-1929. Allow artifacts to be published to the staging Apache Nexus Maven Repository.
Modified:
hadoop/mapreduce/trunk/CHANGES.txt
hadoop/mapreduce/trunk/build.xml
hadoop/mapreduce/trunk/ivy/libraries.properties
Modified: hadoop/mapreduce/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/CHANGES.txt?rev=1057806&r1=1057805&r2=1057806&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/CHANGES.txt (original)
+++ hadoop/mapreduce/trunk/CHANGES.txt Tue Jan 11 19:15:24 2011
@@ -505,6 +505,9 @@ Release 0.21.1 - Unreleased
MAPREDUCE-2228. Remove java5 dependencies from build. (cos)
+ MAPREDUCE-1929. Allow artifacts to be published to the staging Apache Nexus
+ Maven Repository. (tomwhite)
+
Release 0.21.0 - 2010-08-13
INCOMPATIBLE CHANGES
Modified: hadoop/mapreduce/trunk/build.xml
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/build.xml?rev=1057806&r1=1057805&r2=1057806&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/build.xml (original)
+++ hadoop/mapreduce/trunk/build.xml Tue Jan 11 19:15:24 2011
@@ -181,8 +181,10 @@
<loadproperties srcfile="${ivy.dir}/libraries.properties"/>
<property name="mvn.repo" value="http://repo2.maven.org/maven2"/>
<property name="ivy.jar" location="${ivy.dir}/ivy-${ivy.version}.jar"/>
- <property name="repo" value="snapshots"/>
- <property name="asfrepo" value="https://repository.apache.org/content/repositories/${repo}"/>
+ <property name="asfrepo" value="https://repository.apache.org"/>
+ <property name="asfsnapshotrepo" value="${asfrepo}/content/repositories/snapshots"/>
+ <property name="asfstagingrepo"
+ value="${asfrepo}/service/local/staging/deploy/maven2"/>
<property name="ant_task.jar" location="${ivy.dir}/maven-ant-tasks-${ant-task.version}.jar"/>
<property name="ant_task_repo_url" value="${mvn.repo}/org/apache/maven/maven-ant-tasks/${ant-task.version}/maven-ant-tasks-${ant-task.version}.jar"/>
<property name="ivy_repo_url" value="${mvn.repo}/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar"/>
@@ -242,6 +244,10 @@
</and>
</condition>
+ <condition property="staging">
+ <equals arg1="${repo}" arg2="staging"/>
+ </condition>
+
<!-- the normal classpath -->
<path id="classpath">
<pathelement location="${build.classes}"/>
@@ -1369,128 +1375,168 @@
<delete dir="${user.home}/.ivy2/cache/org.apache.hadoop/hadoop-hdfs-test"/>
</target>
- <target name="mvn-install-mapred" depends="mvn-taskdef,examples,tools,set-version">
- <artifact:pom file="${hadoop-mapred.pom}" id="hadoop.mapred"/>
- <artifact:pom file="${hadoop-mapred-examples.pom}" id="hadoop.mapred.examples"/>
- <artifact:pom file="${hadoop-mapred-tools.pom}" id="hadoop.mapred.tools"/>
+ <target name="mvn-install" depends="mvn-taskdef,jar,jar-test,set-version,-mvn-system-install"
+ description="To install hadoop mapreduce and test jars to local filesystem's m2 cache">
+ <artifact:pom file="${hadoop-mapred.pom}" id="hadoop.mapred"/>
+ <artifact:pom file="${hadoop-mapred-test.pom}" id="hadoop.mapred.test"/>
+ <artifact:install file="${hadoop-mapred.jar}">
+ <pom refid="hadoop.mapred"/>
+ <attach file="${hadoop-mapred-sources.jar}" classifier="sources" />
+ </artifact:install>
+ <artifact:install file="${hadoop-mapred-test.jar}">
+ <pom refid="hadoop.mapred.test"/>
+ <attach file="${hadoop-mapred-test-sources.jar}" classifier="sources" />
+ </artifact:install>
+ </target>
+
+ <target name="mvn-deploy" depends="mvn-taskdef, jar, jar-test,
+ jar-system, jar-test-system, set-version, signanddeploy, simpledeploy"
+ description="To deploy hadoop mapredice and test jar's to apache
+ snapshot's repository"/>
- <artifact:install file="${hadoop-mapred.jar}">
- <pom refid="hadoop.mapred"/>
- <attach file="${hadoop-mapred-sources.jar}" classifier="sources" />
- </artifact:install>
- <artifact:install file="${hadoop-mapred-examples.jar}">
- <pom refid="hadoop.mapred.examples"/>
- <attach file="${hadoop-mapred-examples-sources.jar}" classifier="sources" />
- </artifact:install>
- <artifact:install file="${hadoop-mapred-tools.jar}">
- <pom refid="hadoop.mapred.tools"/>
- <attach file="${hadoop-mapred-tools-sources.jar}" classifier="sources" />
- </artifact:install>
- </target>
-
- <target name="mvn-install" depends="mvn-taskdef,examples,tools,jar-test,set-version,
- -mvn-system-install">
+ <target name="signanddeploy" if="staging" depends="sign">
<artifact:pom file="${hadoop-mapred.pom}" id="hadoop.mapred"/>
<artifact:pom file="${hadoop-mapred-test.pom}" id="hadoop.mapred.test"/>
- <artifact:pom file="${hadoop-mapred-examples.pom}" id="hadoop.mapred.examples"/>
- <artifact:pom file="${hadoop-mapred-tools.pom}" id="hadoop.mapred.tools"/>
- <artifact:install file="${hadoop-mapred.jar}">
- <pom refid="hadoop.mapred"/>
- <attach file="${hadoop-mapred-sources.jar}" classifier="sources" />
- </artifact:install>
- <artifact:install file="${hadoop-mapred-test.jar}">
- <pom refid="hadoop.mapred.test"/>
- <attach file="${hadoop-mapred-test-sources.jar}" classifier="sources" />
- </artifact:install>
- <artifact:install file="${hadoop-mapred-examples.jar}">
- <pom refid="hadoop.mapred.examples"/>
- <attach file="${hadoop-mapred-examples-sources.jar}" classifier="sources" />
- </artifact:install>
- <artifact:install file="${hadoop-mapred-tools.jar}">
- <pom refid="hadoop.mapred.tools"/>
- <attach file="${hadoop-mapred-tools-sources.jar}" classifier="sources" />
- </artifact:install>
+ <artifact:pom file="${hadoop-mapred-instrumented.pom}"
+ id="hadoop.mapred.${herriot.suffix}"/>
+ <artifact:pom file="${hadoop-mapred-instrumented-test.pom}"
+ id="hadoop.mapred.${herriot.suffix}.test"/>
+ <artifact:install-provider artifactId="wagon-http"
+ version="${wagon-http.version}"/>
+
+ <artifact:deploy file="${hadoop-mapred.jar}">
+ <remoteRepository id="apache.staging.https" url="${asfstagingrepo}"/>
+ <pom refid="hadoop.mapred"/>
+ <attach file="${hadoop-mapred.jar}.asc" type="jar.asc"/>
+ <attach file="${hadoop-mapred.pom}.asc" type="pom.asc"/>
+ <attach file="${hadoop-mapred-sources.jar}.asc" type="jar.asc"
+ classifier="sources" />
+ <attach file="${hadoop-mapred-sources.jar}" classifier="sources"/>
+ </artifact:deploy>
+
+ <artifact:deploy file="${hadoop-mapred-test.jar}">
+ <remoteRepository id="apache.staging.https" url="${asfstagingrepo}"/>
+ <pom refid="hadoop.mapred.test"/>
+ <attach file="${hadoop-mapred-test.jar}.asc" type="jar.asc"/>
+ <attach file="${hadoop-mapred-test.pom}.asc" type="pom.asc"/>
+ <attach file="${hadoop-mapred-test-sources.jar}.asc" type="jar.asc"
+ classifier="sources"/>
+ <attach file="${hadoop-mapred-test-sources.jar}" classifier="sources"/>
+ </artifact:deploy>
+
+ <artifact:deploy file="${hadoop-mapred-instrumented.jar}">
+ <remoteRepository id="apache.staging.https" url="${asfstagingrepo}"/>
+ <pom refid="hadoop.mapred.${herriot.suffix}"/>
+ <attach file="${hadoop-mapred-instrumented.jar}.asc" type="jar.asc"/>
+ <attach file="${hadoop-mapred-instrumented.pom}.asc" type="pom.asc"/>
+ <attach file="${hadoop-mapred-instrumented-sources.jar}.asc"
+ type="jar.asc" classifier="sources"/>
+ <attach file="${hadoop-mapred-instrumented-sources.jar}"
+ classifier="sources"/>
+ </artifact:deploy>
+
+ <artifact:deploy file="${hadoop-mapred-instrumented-test.jar}">
+ <remoteRepository id="apache.staging.https" url="${asfstagingrepo}"/>
+ <pom refid="hadoop.mapred.${herriot.suffix}.test"/>
+ <attach file="${hadoop-mapred-instrumented-test.jar}.asc" type="jar.asc"/>
+ <attach file="${hadoop-mapred-instrumented-test.pom}.asc" type="pom.asc"/>
+ <attach file="${hadoop-mapred-instrumented-test-sources.jar}.asc"
+ type="jar.asc" classifier="sources"/>
+ <attach file="${hadoop-mapred-instrumented-test-sources.jar}"
+ classifier="sources"/>
+ </artifact:deploy>
+ </target>
+
+ <target name="sign" depends="clean-sign" if="staging">
+ <input message="password:>" addproperty="gpg.passphrase">
+ <handler classname="org.apache.tools.ant.input.SecureInputHandler" />
+ </input>
+ <macrodef name="sign-artifact" description="Signs the artifact">
+ <attribute name="input.file"/>
+ <attribute name="output.file" default="@{input.file}.asc"/>
+ <attribute name="gpg.passphrase"/>
+ <sequential>
+ <echo>Signing @{input.file} Sig File: @{output.file}</echo>
+ <exec executable="gpg" >
+ <arg value="--armor"/>
+ <arg value="--output"/>
+ <arg value="@{output.file}"/>
+ <arg value="--passphrase"/>
+ <arg value="@{gpg.passphrase}"/>
+ <arg value="--detach-sig"/>
+ <arg value="@{input.file}"/>
+ </exec>
+ </sequential>
+ </macrodef>
+ <sign-artifact input.file="${hadoop-mapred.jar}"
+ output.file="${hadoop-mapred.jar}.asc" gpg.passphrase="${gpg.passphrase}"/>
+ <sign-artifact input.file="${hadoop-mapred-test.jar}"
+ output.file="${hadoop-mapred-test.jar}.asc" gpg.passphrase="${gpg.passphrase}"/>
+ <sign-artifact input.file="${hadoop-mapred-sources.jar}"
+ output.file="${hadoop-mapred-sources.jar}.asc" gpg.passphrase="${gpg.passphrase}"/>
+ <sign-artifact input.file="${hadoop-mapred-test-sources.jar}"
+ output.file="${hadoop-mapred-test-sources.jar}.asc" gpg.passphrase="${gpg.passphrase}"/>
+ <sign-artifact input.file="${hadoop-mapred.pom}"
+ output.file="${hadoop-mapred.pom}.asc" gpg.passphrase="${gpg.passphrase}"/>
+ <sign-artifact input.file="${hadoop-mapred-test.pom}"
+ output.file="${hadoop-mapred-test.pom}.asc" gpg.passphrase="${gpg.passphrase}"/>
+ <sign-artifact input.file="${hadoop-mapred-instrumented.jar}"
+ output.file="${hadoop-mapred-instrumented.jar}.asc" gpg.passphrase="${gpg.passphrase}"/>
+ <sign-artifact input.file="${hadoop-mapred-instrumented.pom}"
+ output.file="${hadoop-mapred-instrumented.pom}.asc" gpg.passphrase="${gpg.passphrase}"/>
+ <sign-artifact input.file="${hadoop-mapred-instrumented-sources.jar}"
+ output.file="${hadoop-mapred-instrumented-sources.jar}.asc" gpg.passphrase="${gpg.passphrase}"/>
+ <sign-artifact input.file="${hadoop-mapred-instrumented-test.jar}"
+ output.file="${hadoop-mapred-instrumented-test.jar}.asc" gpg.passphrase="${gpg.passphrase}"/>
+ <sign-artifact input.file="${hadoop-mapred-instrumented-test.pom}"
+ output.file="${hadoop-mapred-instrumented-test.pom}.asc" gpg.passphrase="${gpg.passphrase}"/>
+ <sign-artifact input.file="${hadoop-mapred-instrumented-test-sources.jar}"
+ output.file="${hadoop-mapred-instrumented-test-sources.jar}.asc" gpg.passphrase="${gpg.passphrase}"/>
</target>
- <target name="mvn-deploy" depends="mvn-taskdef, examples, tools, jar-test, set-version,
- -mvn-system-deploy">
+ <target name="simpledeploy" unless="staging">
<artifact:pom file="${hadoop-mapred.pom}" id="hadoop.mapred"/>
<artifact:pom file="${hadoop-mapred-test.pom}" id="hadoop.mapred.test"/>
- <artifact:pom file="${hadoop-mapred-examples.pom}" id="hadoop.mapred.examples"/>
- <artifact:pom file="${hadoop-mapred-tools.pom}" id="hadoop.mapred.tools"/>
+ <artifact:pom file="${hadoop-mapred-instrumented.pom}"
+ id="hadoop.mapred.${herriot.suffix}"/>
- <artifact:install-provider artifactId="wagon-http" version="1.0-beta-2"/>
+ <artifact:install-provider artifactId="wagon-http" version="${wagon-http.version}"/>
<artifact:deploy file="${hadoop-mapred.jar}">
- <remoteRepository id="apache.snapshots.https" url="${asfrepo}"/>
+ <remoteRepository id="apache.snapshots.https" url="${asfsnapshotrepo}"/>
<pom refid="hadoop.mapred"/>
- <attach file="${hadoop-mapred-sources.jar}" classifier="sources" />
+ <attach file="${hadoop-mapred-sources.jar}" classifier="sources" />
</artifact:deploy>
+
<artifact:deploy file="${hadoop-mapred-test.jar}">
- <remoteRepository id="apache.snapshots.https" url="${asfrepo}"/>
+ <remoteRepository id="apache.snapshots.https" url="${asfsnapshotrepo}"/>
<pom refid="hadoop.mapred.test"/>
- <attach file="${hadoop-mapred-test-sources.jar}" classifier="sources" />
- </artifact:deploy>
- <artifact:deploy file="${hadoop-mapred-examples.jar}">
- <remoteRepository id="apache.snapshots.https" url="${asfrepo}"/>
- <pom refid="hadoop.mapred.examples"/>
- <attach file="${hadoop-mapred-examples-sources.jar}" classifier="sources" />
- </artifact:deploy>
- <artifact:deploy file="${hadoop-mapred-tools.jar}">
- <remoteRepository id="apache.snapshots.https" url="${asfrepo}"/>
- <pom refid="hadoop.mapred.tools"/>
- <attach file="${hadoop-mapred-tools-sources.jar}" classifier="sources" />
+ <attach file="${hadoop-mapred-test-sources.jar}" classifier="sources" />
+ </artifact:deploy>
+
+ <artifact:deploy file="${hadoop-mapred-instrumented.jar}">
+ <remoteRepository id="apache.snapshots.https" url="${asfsnapshotrepo}"/>
+ <pom refid="hadoop.mapred.${herriot.suffix}"/>
+ <attach file="${hadoop-mapred-instrumented-sources.jar}" classifier="sources" />
</artifact:deploy>
</target>
-
+
<target name="set-version">
<delete file="${basedir}/ivy/hadoop-mapred.xml"/>
<delete file="${basedir}/ivy/hadoop-mapred-test.xml"/>
<delete file="${basedir}/ivy/hadoop-mapred-${herriot.suffix}.xml"/>
<delete file="${basedir}/ivy/hadoop-mapred-${herriot.suffix}-test.xml"/>
- <delete file="${basedir}/ivy/hadoop-mapred-examples.xml"/>
- <delete file="${basedir}/ivy/hadoop-mapred-tools.xml"/>
- <delete file="${hadoop-mapred-instrumented.pom}"/>
<copy file="${basedir}/ivy/hadoop-mapred-template.xml" tofile="${basedir}/ivy/hadoop-mapred.xml"/>
<copy file="${basedir}/ivy/hadoop-mapred-test-template.xml" tofile="${basedir}/ivy/hadoop-mapred-test.xml"/>
<copy file="${basedir}/ivy/hadoop-mapred-${herriot.suffix}-template.xml"
- tofile="${basedir}/ivy/hadoop-mapred-${herriot.suffix}.xml"/>
+ tofile="${basedir}/ivy/hadoop-mapred-${herriot.suffix}.xml"/>
<copy file="${basedir}/ivy/hadoop-mapred-${herriot.suffix}-test-template.xml"
- tofile="${basedir}/ivy/hadoop-mapred-${herriot.suffix}-test.xml"/>
- <copy file="${basedir}/ivy/hadoop-mapred-examples-template.xml" tofile="${basedir}/ivy/hadoop-mapred-examples.xml"/>
- <copy file="${basedir}/ivy/hadoop-mapred-tools-template.xml" tofile="${basedir}/ivy/hadoop-mapred-tools.xml"/>
- <copy file="${basedir}/ivy/hadoop-mapred-${herriot.suffix}-template.xml" tofile="${hadoop-mapred-instrumented.pom}"/>
+ tofile="${basedir}/ivy/hadoop-mapred-${herriot.suffix}-test.xml"/>
<replaceregexp byline="true">
<regexp pattern="@version"/>
<substitution expression="${version}"/>
<fileset dir="${basedir}/ivy">
<include name="hadoop-mapred.xml"/>
- </fileset>
- </replaceregexp>
- <replaceregexp byline="true">
- <regexp pattern="@version"/>
- <substitution expression="${version}"/>
- <fileset dir="${basedir}/ivy">
<include name="hadoop-mapred-test.xml"/>
- </fileset>
- </replaceregexp>
- <replaceregexp byline="true">
- <regexp pattern="@version"/>
- <substitution expression="${version}"/>
- <fileset dir="${basedir}/ivy">
- <include name="hadoop-mapred-examples.xml"/>
- </fileset>
- </replaceregexp>
- <replaceregexp byline="true">
- <regexp pattern="@version"/>
- <substitution expression="${version}"/>
- <fileset dir="${basedir}/ivy">
- <include name="hadoop-mapred-tools.xml"/>
- </fileset>
- </replaceregexp>
- <replaceregexp byline="true">
- <regexp pattern="@version"/>
- <substitution expression="${version}"/>
- <fileset dir="${basedir}/ivy">
<include name="hadoop-mapred-${herriot.suffix}.xml"/>
<include name="hadoop-mapred-${herriot.suffix}-test.xml"/>
</fileset>
@@ -1538,7 +1584,7 @@
<!-- ================================================================== -->
<!-- Clean. Delete the build files, and their directories -->
<!-- ================================================================== -->
- <target name="clean" depends="clean-contrib, clean-fi" description="Clean. Delete the build files, and their directories">
+ <target name="clean" depends="clean-contrib, clean-fi, clean-sign" description="Clean. Delete the build files, and their directories">
<delete dir="${build.dir}"/>
<delete dir="${docs.src}/build"/>
<delete file="${hadoop-mapred.pom}"/>
@@ -1549,6 +1595,12 @@
<delete file="${hadoop-mapred-tools.pom}"/>
</target>
+ <target name="clean-sign" description="Clean. Delete .asc files">
+ <delete>
+ <fileset dir="." includes="**/**/*.asc"/>
+ </delete>
+ </target>
+
<target name="veryclean" depends="clean-cache,clean"
description="veryclean. Delete ivy and ant maven task jar">
<delete file="${ant_task.jar}"/>
Modified: hadoop/mapreduce/trunk/ivy/libraries.properties
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/ivy/libraries.properties?rev=1057806&r1=1057805&r2=1057806&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/ivy/libraries.properties (original)
+++ hadoop/mapreduce/trunk/ivy/libraries.properties Tue Jan 11 19:15:24 2011
@@ -76,6 +76,7 @@ servlet-api.version=2.5
slf4j-api.version=1.5.11
slf4j-log4j12.version=1.5.11
+wagon-http.version=1.0-beta-2
xmlenc.version=0.52
xerces.version=1.4.4