Author: nick
Date: Tue Jul  4 11:17:24 2006
New Revision: 419060

URL: http://svn.apache.org/viewvc?rev=419060&view=rev
Log:
Add ant task for building the maven/ibiblio friendly binary and source jar 
files, and creating a .pom for them

Added:
    jakarta/poi/trunk/poi.pom
Modified:
    jakarta/poi/trunk/build.xml

Modified: jakarta/poi/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/jakarta/poi/trunk/build.xml?rev=419060&r1=419059&r2=419060&view=diff
==============================================================================
--- jakarta/poi/trunk/build.xml (original)
+++ jakarta/poi/trunk/build.xml Tue Jul  4 11:17:24 2006
@@ -109,6 +109,7 @@
   <property name="apidocs.report.dir" location="${build.site}/apidocs"/>
   <property name="changelog.file" location="${build.site}/changelog.html"/>
   <property name="dist.dir" location="build/dist"/>
+  <property name="mavendist.dir" location="build/maven-dist"/>
   <property name="jar.name" value="poi"/>
   <property name="version.id" value="3.0-alpha2"/>
   <property name="halt.on.test.failure" value="true"/>
@@ -216,6 +217,7 @@
         <mkdir dir="${jdepend.report.out.dir}"/>
         <mkdir dir="${apidocs.report.dir}"/>
         <mkdir dir="${dist.dir}"/>
+        <mkdir dir="${mavendist.dir}"/>
         <mkdir dir="${build.site.src}/${main.documentation}"/>
 
         <copy todir="${build.site.src}/${main.documentation}">
@@ -788,6 +790,52 @@
       description="Generates POI's website's contents"/>
 
 
+    <target name="maven-dist" depends="compile" description="Builds the jar 
files for a maven distribution, and the POM to go with them">
+               <!-- Build a Jar of all the class files -->
+        <jar destfile="${mavendist.dir}/${jar.name}-${version.id}.jar">
+            <manifest>
+                <attribute name="Built-By" value="${user.name}"/>
+                <section name="common">
+                  <attribute name="Specification-Title" value="Jakarta POI"/>
+                  <attribute name="Specification-Version" 
value="${version.id}-${DSTAMP}"/>
+                  <attribute name="Specification-Vendor" value="Apache"/>
+                  <attribute name="Implementation-Title" value="Jakarta POI"/>
+                  <attribute name="Implementation-Version" 
value="${version.id}-${DSTAMP}"/>
+                  <attribute name="Implementation-Vendor" value="Apache"/>
+                </section>
+            </manifest>        
+                       <fileset dir="${main.output.dir}" />
+                       <fileset dir="${contrib.output.dir}" />
+                       <fileset dir="${scratchpad.output.dir}" />
+        </jar>
+
+               <!-- Build a Jar file of all the source files -->
+        <jar destfile="${mavendist.dir}/${jar.name}-${version.id}-sources.jar">
+            <manifest>
+                <attribute name="Built-By" value="${user.name}"/>
+                <section name="common">
+                  <attribute name="Specification-Title" value="Jakarta POI"/>
+                  <attribute name="Specification-Version" 
value="${version.id}-${DSTAMP}"/>
+                  <attribute name="Specification-Vendor" value="Apache"/>
+                  <attribute name="Implementation-Title" value="Jakarta POI"/>
+                  <attribute name="Implementation-Version" 
value="${version.id}-${DSTAMP}"/>
+                  <attribute name="Implementation-Vendor" value="Apache"/>
+                </section>
+            </manifest>        
+                       <fileset dir="${main.src}" includes="**/*.java" />
+                       <fileset dir="${contrib.src}" includes="**/*.java" />
+                       <fileset dir="${scratchpad.src}" includes="**/*.java" />
+        </jar>
+
+               <!-- Build the pom -->
+               <!-- Copy from the base file, and substitute in the version -->
+               <filter token="VERSION" value="${version.id}" />
+               <copy 
+                       filtering="true" 
+                       file="poi.pom" 
+                       tofile="${mavendist.dir}/${jar.name}-${version.id}.pom" 
+               />
+       </target>
 
     <target name="jar" depends="compile" description="Creates jar files for 
distribution">
         <jar basedir="${main.output.dir}" 
destfile="${dist.dir}/${jar.name}-${version.id}-${DSTAMP}.jar">

Added: jakarta/poi/trunk/poi.pom
URL: http://svn.apache.org/viewvc/jakarta/poi/trunk/poi.pom?rev=419060&view=auto
==============================================================================
--- jakarta/poi/trunk/poi.pom (added)
+++ jakarta/poi/trunk/poi.pom Tue Jul  4 11:17:24 2006
@@ -0,0 +1,30 @@
+<metadata>
+       <modelVersion>4.0.0</modelVersion>
+       <groupId>poi</groupId>
+       <artifactId>poi</artifactId>
+       <version>@VERSION@</version>
+       <packaging>jar</packaging>
+       <name>Jakarta POI</name>
+       <url>http://jakarta.apache.org/poi/</url>
+       <description>Jakarta POI - Java API To Access Microsoft Format 
Files</description>
+
+       <dependencies></dependencies>
+
+       <licenses>
+               <license>
+                       <name>The Apache Software License, Version 2.0</name>
+                       
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+                       <distribution>repo</distribution>
+               </license>
+       </licenses>
+       <scm>
+               <url>http://svn.apache.org/viewvc/jakarta/poi/trunk</url>
+               
<connection>scm:svn:http://svn.apache.org/repos/asf/jakarta/poi/trunk</connection>
+       </scm>
+       <issueTrackingUrl>http://issues.apache.org/bugzilla/</issueTrackingUrl>
+       <organization>
+               <name>Apache Software Foundation</name>
+               <url>http://www.apache.org/</url>
+               
<logo>http://jakarta.apache.org/images/original-jakarta-logo.gif</logo>
+       </organization>
+</metadata>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/

Reply via email to