You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by cu...@apache.org on 2010/01/14 00:26:57 UTC

svn commit: r898997 - in /hadoop/avro/trunk: .gitignore CHANGES.txt lang/java/.gitignore lang/java/build.xml lang/java/ivy.xml lang/java/lib/.gitignore

Author: cutting
Date: Wed Jan 13 23:26:56 2010
New Revision: 898997

URL: http://svn.apache.org/viewvc?rev=898997&view=rev
Log:
AVRO-314.  Add mvn-install ant task to publish jar to local Maven repository.  Contributed by Aaron Kimball.

Added:
    hadoop/avro/trunk/lang/java/.gitignore
    hadoop/avro/trunk/lang/java/lib/.gitignore
Modified:
    hadoop/avro/trunk/.gitignore
    hadoop/avro/trunk/CHANGES.txt
    hadoop/avro/trunk/lang/java/build.xml
    hadoop/avro/trunk/lang/java/ivy.xml

Modified: hadoop/avro/trunk/.gitignore
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/.gitignore?rev=898997&r1=898996&r2=898997&view=diff
==============================================================================
--- hadoop/avro/trunk/.gitignore (original)
+++ hadoop/avro/trunk/.gitignore Wed Jan 13 23:26:56 2010
@@ -5,3 +5,4 @@
 /.project
 /build
 test-output
+/dist

Modified: hadoop/avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=898997&r1=898996&r2=898997&view=diff
==============================================================================
--- hadoop/avro/trunk/CHANGES.txt (original)
+++ hadoop/avro/trunk/CHANGES.txt Wed Jan 13 23:26:56 2010
@@ -212,6 +212,9 @@
     NOTICE.txt to it, print the NOTICE.txt and version in help, and
     include the tools jar in distributions.  (cutting)
 
+    AVRO-314. Add mvn-install ant task to publish jar to local Maven
+    repository.  (Aaron Kimball via cutting)
+
   OPTIMIZATIONS
 
     AVRO-172. More efficient schema processing (massie)

Added: hadoop/avro/trunk/lang/java/.gitignore
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/java/.gitignore?rev=898997&view=auto
==============================================================================
--- hadoop/avro/trunk/lang/java/.gitignore (added)
+++ hadoop/avro/trunk/lang/java/.gitignore Wed Jan 13 23:26:56 2010
@@ -0,0 +1,16 @@
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the "License"); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+/build

Modified: hadoop/avro/trunk/lang/java/build.xml
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/java/build.xml?rev=898997&r1=898996&r2=898997&view=diff
==============================================================================
--- hadoop/avro/trunk/lang/java/build.xml (original)
+++ hadoop/avro/trunk/lang/java/build.xml Wed Jan 13 23:26:56 2010
@@ -16,8 +16,9 @@
 -->
 
 <project name="Avro" default="compile"
-	 xmlns:ivy="antlib:org.apache.ivy.ant">
- 
+    xmlns:ivy="antlib:org.apache.ivy.ant"
+    xmlns:mvn="urn:maven-artifact-ant">
+
   <!-- Load user's default properties. -->
   <property file="${user.home}/build.properties" />
 
@@ -465,7 +466,15 @@
     <fail if="javadoc.warnings">Javadoc warnings!</fail>
   </target>
 
-  <target name="dist" depends="jar, tools, javadoc"
+  <target name="pom" depends="ivy-init">
+    <ivy:makepom ivyfile="${basedir}/ivy.xml"
+		 pomfile="${dist.dir}/${fullname}.pom">
+      <mapping conf="default" scope="compile"/>
+      <mapping conf="test" scope="test"/>
+    </ivy:makepom>
+  </target>
+
+  <target name="dist" depends="jar, tools, javadoc, pom"
 	  description="Build distribution">
     <mkdir dir="${dist.dir}"/>
 
@@ -481,12 +490,6 @@
     <checksum file="${dist.dir}/avro-tools-${version}.jar" algorithm="md5"/>
     <checksum file="${dist.dir}/avro-tools-${version}.jar" algorithm="sha1"/>
 
-    <ivy:makepom ivyfile="${basedir}/ivy.xml"
-		 pomfile="${dist.dir}/${fullname}.pom">
-      <mapping conf="default" scope="compile"/>
-      <mapping conf="test" scope="test"/>
-    </ivy:makepom>
-
     <checksum file="${dist.dir}/${fullname}.pom" algorithm="md5"/>
     <checksum file="${dist.dir}/${fullname}.pom" algorithm="sha1"/>
 
@@ -569,4 +572,15 @@
   </target>
   <!-- End Eclipse targets -->
 
+  <target name="mvn-install" depends="jar,pom"
+	  description="Installs avro core jar to local fs m2 cache">
+    <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
+	     uri="urn:maven-artifact-ant"
+	     classpathref="java.classpath"/>
+    <mvn:pom file="${dist.dir}/${fullname}.pom" id="avro"/>
+    <mvn:install file="${build.dir}/${fullname}.jar">
+      <pom refid="avro"/>
+    </mvn:install>
+  </target>
+
 </project>

Modified: hadoop/avro/trunk/lang/java/ivy.xml
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/java/ivy.xml?rev=898997&r1=898996&r2=898997&view=diff
==============================================================================
--- hadoop/avro/trunk/lang/java/ivy.xml (original)
+++ hadoop/avro/trunk/lang/java/ivy.xml Wed Jan 13 23:26:56 2010
@@ -57,6 +57,8 @@
     <dependency org="net.java.dev.javacc" name="javacc" rev="5.0" 
         conf="build->default" />
     <dependency org="commons-lang" name="commons-lang" rev="2.4" />
+    <dependency org="org.apache.maven" name="maven-ant-tasks" rev="2.0.9"
+        conf="build->default"/>
   </dependencies>
 
 </ivy-module>

Added: hadoop/avro/trunk/lang/java/lib/.gitignore
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/java/lib/.gitignore?rev=898997&view=auto
==============================================================================
--- hadoop/avro/trunk/lang/java/lib/.gitignore (added)
+++ hadoop/avro/trunk/lang/java/lib/.gitignore Wed Jan 13 23:26:56 2010
@@ -0,0 +1,16 @@
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the "License"); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+/ivy-*.jar