You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ye...@apache.org on 2010/01/24 14:05:48 UTC

svn commit: r902561 - /poi/trunk/build.xml

Author: yegor
Date: Sun Jan 24 13:05:48 2010
New Revision: 902561

URL: http://svn.apache.org/viewvc?rev=902561&view=rev
Log:
added mvn-install Ant target equivalent to 'mvn install' in maven-driven projects

Modified:
    poi/trunk/build.xml

Modified: poi/trunk/build.xml
URL: http://svn.apache.org/viewvc/poi/trunk/build.xml?rev=902561&r1=902560&r2=902561&view=diff
==============================================================================
--- poi/trunk/build.xml (original)
+++ poi/trunk/build.xml Sun Jan 24 13:05:48 2010
@@ -47,7 +47,7 @@
           ANT_OPTS="-Xmx1024m -XX:MaxPermSize=256m" ant test
 
  -->
-<project name="POI Build" default="help" basedir=".">
+<project name="POI Build" default="help" basedir="." xmlns:mvn="antlib:org.apache.maven.artifact.ant">
 
     <description>The Apache POI project Ant build.</description>
 
@@ -1035,5 +1035,39 @@
 
     <target name="gump" depends="compile-all, test-all, jar"/>
 
+    <available property="maven.ant.tasks.present" classname="org.apache.maven.artifact.ant.Pom"/>
+    <target name="maven.ant.tasks-check">
+      <fail unless="maven.ant.tasks.present">
+      Maven ant tasks not found.
+      Please make sure the maven-ant-tasks jar is in ANT_HOME/lib, or made 
+      available to Ant using other mechanisms like -lib or CLASSPATH.
+      
+      You can download the Maven Ant Tasks from http://maven.apache.org/ant-tasks/download.html
+      </fail>
+    </target>
+
+    <macrodef name="m2-install">
+      <attribute name="artifactId"/>
+      
+      <sequential>
+        <mvn:install file="${dist.dir}/@{artifactId}-${version.id}-${DSTAMP}.jar">
+          <pom file="${dist.dir}/@{artifactId}-${version.id}.pom"/>
+        </mvn:install>
+      </sequential>
+    </macrodef>  
+
+    <!--
+      Install POI artifacts into the local repository. 
+      Invoking this command is equivalent to 'mvn install' in Maven-driven projects.
+    -->
+    <target name="mvn-install" depends="maven.ant.tasks-check,jar,maven-poms">
+      <m2-install artifactId="poi"/>
+      <m2-install artifactId="poi-scratchpad"/>
+      <m2-install artifactId="poi-contrib"/>
+      <m2-install artifactId="poi-ooxml"/>
+      <m2-install artifactId="poi-examples"/>
+      <m2-install artifactId="poi-ooxml-schemas"/>
+    </target>
+    
 </project>
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org