You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hcatalog-commits@incubator.apache.org by tr...@apache.org on 2012/09/25 02:17:38 UTC
svn commit: r1389686 - in /incubator/hcatalog/trunk: CHANGES.txt
ant/dependencies.xml ant/deploy.xml build-common.xml build.properties
build.xml
Author: travis
Date: Tue Sep 25 02:17:37 2012
New Revision: 1389686
URL: http://svn.apache.org/viewvc?rev=1389686&view=rev
Log:
HCATALOG-132 Add HCatalog to Maven Repository
Modified:
incubator/hcatalog/trunk/CHANGES.txt
incubator/hcatalog/trunk/ant/dependencies.xml
incubator/hcatalog/trunk/ant/deploy.xml
incubator/hcatalog/trunk/build-common.xml
incubator/hcatalog/trunk/build.properties
incubator/hcatalog/trunk/build.xml
Modified: incubator/hcatalog/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/CHANGES.txt?rev=1389686&r1=1389685&r2=1389686&view=diff
==============================================================================
--- incubator/hcatalog/trunk/CHANGES.txt (original)
+++ incubator/hcatalog/trunk/CHANGES.txt Tue Sep 25 02:17:37 2012
@@ -23,6 +23,8 @@ Trunk (unreleased changes)
INCOMPATIBLE CHANGES
NEW FEATURES
+ HCAT-132 Add HCatalog to Maven Repository (traviscrawford)
+
HCAT-375 Make HCat work for Hadoop 0.23 (cdrome via toffer)
HCAT-469 HiveClientCache may return a closed client (amalakar via toffer)
Modified: incubator/hcatalog/trunk/ant/dependencies.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/ant/dependencies.xml?rev=1389686&r1=1389685&r2=1389686&view=diff
==============================================================================
--- incubator/hcatalog/trunk/ant/dependencies.xml (original)
+++ incubator/hcatalog/trunk/ant/dependencies.xml Tue Sep 25 02:17:37 2012
@@ -26,6 +26,7 @@
<mkdir dir="${build.dir}/ivy/report"/>
<ivy:configure file="${ivysettings.xml}"/>
+ <echo message="Generating ${pom.file}"/>
<ivy:makepom ivyfile="${ivy.xml}" pomfile="${pom.file}">
<mapping conf="default" scope="compile"/>
</ivy:makepom>
Modified: incubator/hcatalog/trunk/ant/deploy.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/ant/deploy.xml?rev=1389686&r1=1389685&r2=1389686&view=diff
==============================================================================
--- incubator/hcatalog/trunk/ant/deploy.xml (original)
+++ incubator/hcatalog/trunk/ant/deploy.xml Tue Sep 25 02:17:37 2012
@@ -20,6 +20,23 @@
<project xmlns:ivy="antlib:org.apache.ivy.ant"
xmlns:artifact="artifact:org.apache.maven.artifact.ant">
+ <macrodef name="_sign">
+ <attribute name="inputFile"/>
+ <sequential>
+ <echo>Signing @{inputFile}</echo>
+ <delete file="@{inputFile}.asc"/>
+ <exec executable="gpg">
+ <arg value="--armor"/>
+ <arg value="--output"/>
+ <arg value="@{inputFile}.asc"/>
+ <arg value="--passphrase"/>
+ <arg value="${gpg.passphrase}"/>
+ <arg value="--detach-sig"/>
+ <arg value="@{inputFile}"/>
+ </exec>
+ </sequential>
+ </macrodef>
+
<target name="mvn-init" unless="mvn-init.complete">
<echo message="${ant.project.name}"/>
<get src="${mvnrepo}/org/apache/maven/maven-ant-tasks/${maven-ant-tasks.version}/maven-ant-tasks-${maven-ant-tasks.version}.jar"
@@ -66,4 +83,25 @@
<touch file="${build.dir}/lib/.mvn-dependencies.complete"/>
</target>
+ <target name="mvn-deploy" depends="mvn-init" description="Deploy artifacts to a Maven repository.">
+ <echo message="${ant.project.name}"/>
+ <artifact:deploy file="${build.dir}/${ant.project.name}-${hcatalog.version}.jar">
+ <artifact:pom file="${pom.file}"/>
+ <remoteRepository id="${mvn.deploy.repo.id}" url="${mvn.deploy.repo.url}"/>
+ </artifact:deploy>
+ </target>
+
+ <target name="mvn-deploy-signed" depends="mvn-init"
+ description="Sign and deploy artifacts to a Maven repository.">
+ <echo message="${ant.project.name}"/>
+ <_sign inputFile="${build.dir}/${ant.project.name}-${hcatalog.version}.jar"/>
+ <_sign inputFile="${pom.file}"/>
+ <artifact:deploy file="${build.dir}/${ant.project.name}-${hcatalog.version}.jar">
+ <artifact:pom file="${pom.file}"/>
+ <attach file="${build.dir}/${ant.project.name}-${hcatalog.version}.jar.asc" type="jar.asc"/>
+ <attach file="${pom.file}.asc" type="pom.asc"/>
+ <remoteRepository id="${mvn.deploy.repo.id}" url="${mvn.deploy.repo.url}"/>
+ </artifact:deploy>
+ </target>
+
</project>
Modified: incubator/hcatalog/trunk/build-common.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/build-common.xml?rev=1389686&r1=1389685&r2=1389686&view=diff
==============================================================================
--- incubator/hcatalog/trunk/build-common.xml (original)
+++ incubator/hcatalog/trunk/build-common.xml Tue Sep 25 02:17:37 2012
@@ -75,7 +75,9 @@
<target name="jar" depends="compile,mvn-init">
<echo message="${ant.project.name}"/>
- <jar jarfile="${build.dir}/${jar.name}" basedir="${build.classes}"/>
+ <jar jarfile="${build.dir}/${jar.name}" basedir="${build.classes}">
+ <metainf dir="${path.to.basedir}" includes="**/LICENSE.txt,**/NOTICE.txt"/>
+ </jar>
<artifact:install file="${build.dir}/${ant.project.name}-${hcatalog.version}.jar">
<artifact:pom file="${pom.file}"/>
</artifact:install>
Modified: incubator/hcatalog/trunk/build.properties
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/build.properties?rev=1389686&r1=1389685&r2=1389686&view=diff
==============================================================================
--- incubator/hcatalog/trunk/build.properties (original)
+++ incubator/hcatalog/trunk/build.properties Tue Sep 25 02:17:37 2012
@@ -60,3 +60,23 @@ shims.20S.hive.shims.include=0.20,0.20S
shims.20S.hadoop.version=${hive.hadoop-0.20S.version}
shims.23.hive.shims.include=0.23
shims.23.hadoop.version=${hive.hadoop-0.23.version}
+
+###############################################################################
+# deploy properties
+#
+# "Maven Ant Tasks" are used to publish artifacts to maven repositories. This
+# means your ~/.m2/settings.xml file must contain the appropriate credentials
+# matching the mvn.deploy.repo.id you choose to publish to.
+#
+# <settings>
+# <servers>
+# <server>
+# <id>apache.snapshots.https</id>
+# <username>travis</username>
+# <password>mypassword</password>
+# </server>
+# </servers>
+# </settings>
+
+mvn.deploy.repo.id=apache.snapshots.https
+mvn.deploy.repo.url=https://repository.apache.org/content/repositories/snapshots
Modified: incubator/hcatalog/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/build.xml?rev=1389686&r1=1389685&r2=1389686&view=diff
==============================================================================
--- incubator/hcatalog/trunk/build.xml (original)
+++ incubator/hcatalog/trunk/build.xml Tue Sep 25 02:17:37 2012
@@ -340,6 +340,71 @@
<!--
===============================================================================
+ Deploy Section
+ ===============================================================================
+ -->
+
+ <target name="mvn-deploy" depends="mvn-init"
+ description="Deploy artifacts to a Maven repository.">
+
+ <artifact:deploy file="${build.dir}/hcatalog/hcatalog-${hcatalog.version}.jar">
+ <artifact:pom file="${build.dir}/ivy/hcatalog-${hcatalog.version}.pom"/>
+ <remoteRepository id="${mvn.deploy.repo.id}" url="${mvn.deploy.repo.url}"/>
+ </artifact:deploy>
+
+ <artifact:deploy file="${build.dir}/hcatalog/hcatalog-core-${hcatalog.version}.jar">
+ <artifact:pom file="${build.dir}/ivy/hcatalog-core-${hcatalog.version}.pom"/>
+ <remoteRepository id="${mvn.deploy.repo.id}" url="${mvn.deploy.repo.url}"/>
+ </artifact:deploy>
+
+ <ant target="mvn-deploy" dir="hcatalog-pig-adapter" inheritAll="false" useNativeBasedir="true"/>
+ <ant target="mvn-deploy" dir="server-extensions" inheritAll="false" useNativeBasedir="true"/>
+ <ant target="mvn-deploy" dir="webhcat/java-client" inheritAll="false" useNativeBasedir="true"/>
+ <ant target="mvn-deploy" dir="webhcat/svr" inheritAll="false" useNativeBasedir="true"/>
+ </target>
+
+ <target name="mvn-deploy-signed" depends="mvn-init"
+ description="Sign and deploy artifacts to a Maven repository.">
+
+ <input message="Enter your gpg password (or just press return if using an agent): "
+ addproperty="gpg.passphrase">
+ <handler classname="org.apache.tools.ant.input.SecureInputHandler"/>
+ </input>
+
+ <_sign inputFile="${build.dir}/hcatalog/hcatalog-${hcatalog.version}.jar"/>
+ <_sign inputFile="${build.dir}/ivy/hcatalog-${hcatalog.version}.pom"/>
+ <artifact:deploy file="${build.dir}/hcatalog/hcatalog-${hcatalog.version}.jar">
+ <artifact:pom file="${build.dir}/ivy/hcatalog-${hcatalog.version}.pom"/>
+ <attach file="${build.dir}/hcatalog/hcatalog-${hcatalog.version}.jar.asc" type="jar.asc"/>
+ <attach file="${build.dir}/ivy/hcatalog-${hcatalog.version}.pom" type="pom.asc"/>
+ <remoteRepository id="${mvn.deploy.repo.id}" url="${mvn.deploy.repo.url}"/>
+ </artifact:deploy>
+
+ <_sign inputFile="${build.dir}/hcatalog/hcatalog-core-${hcatalog.version}.jar"/>
+ <_sign inputFile="${build.dir}/ivy/hcatalog-core-${hcatalog.version}.pom"/>
+ <artifact:deploy file="${build.dir}/hcatalog/hcatalog-core-${hcatalog.version}.jar">
+ <artifact:pom file="${build.dir}/ivy/hcatalog-core-${hcatalog.version}.pom"/>
+ <attach file="${build.dir}/hcatalog/hcatalog-core-${hcatalog.version}.jar.asc" type="jar.asc"/>
+ <attach file="${build.dir}/ivy/hcatalog-core-${hcatalog.version}.pom.asc" type="pom.asc"/>
+ <remoteRepository id="${mvn.deploy.repo.id}" url="${mvn.deploy.repo.url}"/>
+ </artifact:deploy>
+
+ <ant target="mvn-deploy-signed" dir="hcatalog-pig-adapter" inheritAll="false" useNativeBasedir="true">
+ <property name="gpg.passphrase" value="${gpg.passphrase}"/>
+ </ant>
+ <ant target="mvn-deploy-signed" dir="server-extensions" inheritAll="false" useNativeBasedir="true">
+ <property name="gpg.passphrase" value="${gpg.passphrase}"/>
+ </ant>
+ <ant target="mvn-deploy-signed" dir="webhcat/java-client" inheritAll="false" useNativeBasedir="true">
+ <property name="gpg.passphrase" value="${gpg.passphrase}"/>
+ </ant>
+ <ant target="mvn-deploy-signed" dir="webhcat/svr" inheritAll="false" useNativeBasedir="true">
+ <property name="gpg.passphrase" value="${gpg.passphrase}"/>
+ </ant>
+ </target>
+
+ <!--
+ ===============================================================================
Distribution Section
===============================================================================
-->