poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r545491 - in /jakarta/poi/trunk: build.xml poi-redirect.pom poi.pom
Date Fri, 08 Jun 2007 12:31:22 GMT
Author: nick
Date: Fri Jun  8 05:31:21 2007
New Revision: 545491

URL: http://svn.apache.org/viewvc?view=rev&rev=545491
Log:
As requested by Andy, a big change to how the maven-dist occurs. Now, we copy over the main
jars to the maven directory, rather than making their own. We then have a different pom for
each of poi, -scratchpad and -contrib. Finally, put all the files under maven-dist into the
right place for upload

Modified:
    jakarta/poi/trunk/build.xml
    jakarta/poi/trunk/poi-redirect.pom
    jakarta/poi/trunk/poi.pom

Modified: jakarta/poi/trunk/build.xml
URL: http://svn.apache.org/viewvc/jakarta/poi/trunk/build.xml?view=diff&rev=545491&r1=545490&r2=545491
==============================================================================
--- jakarta/poi/trunk/build.xml (original)
+++ jakarta/poi/trunk/build.xml Fri Jun  8 05:31:21 2007
@@ -127,6 +127,8 @@
   <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="mavendist.poi.dir" location="build/maven-dist/poi"/>
+  <property name="mavendist.oap.dir" location="build/maven-dist/org.apache.poi"/>
   <property name="jar.name" value="poi"/>
   <property name="version.id" value="3.0.1-alpha1"/>
   <property name="halt.on.test.failure" value="true"/>
@@ -234,9 +236,15 @@
         <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}"/>
 
+        <mkdir dir="${mavendist.dir}"/>
+        <mkdir dir="${mavendist.poi.dir}"/>
+        <mkdir dir="${mavendist.poi.dir}/poms"/>
+        <mkdir dir="${mavendist.oap.dir}"/>
+        <mkdir dir="${mavendist.oap.dir}/jars"/>
+        <mkdir dir="${mavendist.oap.dir}/poms"/>
+
         <copy todir="${build.site.src}/${main.documentation}">
             <fileset dir="${main.documentation}"/>
         </copy>
@@ -807,57 +815,102 @@
       description="Generates POI's website's contents"/>
 
 
-    <target name="maven-dist" depends="clean,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}"/>
-                <attribute name="Specification-Title" value="Apache POI"/>
-                <attribute name="Specification-Version" value="${version.id}-${DSTAMP}"/>
-                <attribute name="Specification-Vendor" value="Apache"/>
-                <attribute name="Implementation-Title" value="Apache POI"/>
-                <attribute name="Implementation-Version" value="${version.id}-${DSTAMP}"/>
-                <attribute name="Implementation-Vendor" value="Apache"/>
-            </manifest>        
-			<fileset dir="${main.output.dir}" />
-			<fileset dir="${contrib.output.dir}" />
-			<fileset dir="${scratchpad.output.dir}" />
-			<fileset dir="legal/" />
-        </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}"/>
-                <attribute name="Specification-Title" value="Apache POI"/>
-                <attribute name="Specification-Version" value="${version.id}-${DSTAMP}"/>
-                <attribute name="Specification-Vendor" value="Apache"/>
-                <attribute name="Implementation-Title" value="Apache POI"/>
-                <attribute name="Implementation-Version" value="${version.id}-${DSTAMP}"/>
-                <attribute name="Implementation-Vendor" value="Apache"/>
-            </manifest>        
-			<fileset dir="${main.src}" includes="**/*.java" />
-			<fileset dir="${contrib.src}" includes="**/*.java" />
-			<fileset dir="${scratchpad.src}" includes="**/*.java" />
-			<fileset dir="legal/" />
-        </jar>
+    <target name="maven-dist" depends="jar" description="Builds the POM files for a maven
distribution, and copies these and the jars to the appropriate locations">
+		<!-- Copy the jar files into the maven jar directory -->
+		<copy
+			file="${dist.dir}/${jar.name}-${version.id}-${DSTAMP}.jar"
+			todir="${mavendist.oap.dir}/jars/" />
+		<copy
+			file="${dist.dir}/${jar.name}-contrib-${version.id}-${DSTAMP}.jar"
+			todir="${mavendist.oap.dir}/jars/" />
+		<copy
+			file="${dist.dir}/${jar.name}-scratchpad-${version.id}-${DSTAMP}.jar"
+			todir="${mavendist.oap.dir}/jars/" />
+
+		<!-- Build the org.apache.poi poms -->
+		<!-- Copy from the base file, substituting in the version and -->
+		<!--  artificat, plus doing the core poi dependency as needed -->
 
 		<!-- Build the main 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" 
-		/>
-		<!-- Build the poi => org.apache.poi redirect pom -->
-		<!-- Copy from the base file, and substitute in the version -->
-		<filter token="VERSION" value="${version.id}" />
+			tofile="${mavendist.oap.dir}/poms/${jar.name}-${version.id}.pom" 
+		>
+			<filterchain>
+				<replacetokens>
+					<token key="VERSION" value="${version.id}" />
+					<token key="ARTIFICAT" value="poi" />
+				</replacetokens>
+				<tokenfilter>
+					<filetokenizer/>
+					<replaceregex pattern="START_NON_MAIN.*END_NON_MAIN_DEPENDENCY" replace="No POI dependency
on the main jar" flags="s" />
+				</tokenfilter>
+			</filterchain>
+		</copy>
+		<!-- And the contrib pom -->
+		<copy 
+			file="poi.pom" 
+			tofile="${mavendist.oap.dir}/poms/${jar.name}-contrib-${version.id}.pom" 
+		>
+			<filterchain>
+				<replacetokens>
+					<token key="VERSION" value="${version.id}" />
+					<token key="ARTIFICAT" value="poi-contrib" />
+				</replacetokens>
+				<tokenfilter>
+					<replaceregex pattern="..-- START_NON_MAIN_DEPENDENCY --." replace="" flags="s"/>
+					<replaceregex pattern="..-- END_NON_MAIN_DEPENDENCY --." replace="" flags="s"/>
+				</tokenfilter>
+			</filterchain>
+		</copy>
+		<!-- And the scratchpad pom -->
+		<copy 
+			file="poi.pom" 
+			tofile="${mavendist.oap.dir}/poms/${jar.name}-scratchpad-${version.id}.pom" 
+		>
+			<filterchain>
+				<replacetokens>
+					<token key="VERSION" value="${version.id}" />
+					<token key="ARTIFICAT" value="poi-scratchpad" />
+				</replacetokens>
+				<tokenfilter>
+					<replaceregex pattern="..-- START_NON_MAIN_DEPENDENCY --." replace="" flags="s"/>
+					<replaceregex pattern="..-- END_NON_MAIN_DEPENDENCY --." replace="" flags="s"/>
+				</tokenfilter>
+			</filterchain>
+		</copy>
+
+		<!-- Build the poi => org.apache.poi redirect poms -->
+		<!-- Copy from the base file, substituting in the version+artifact -->
+		<copy 
+			file="poi-redirect.pom" 
+			tofile="${mavendist.poi.dir}/poms/${jar.name}-${version.id}.pom" 
+		>
+			<filterchain><replacetokens>
+				<token key="VERSION" value="${version.id}" />
+				<token key="ARTIFICAT" value="poi" />
+			</replacetokens></filterchain>
+		</copy>
 		<copy 
-			filtering="true" 
 			file="poi-redirect.pom" 
-			tofile="${mavendist.dir}/${jar.name}-${version.id}-redirect.pom" 
-		/>
+			tofile="${mavendist.poi.dir}/poms/${jar.name}-contrib-${version.id}.pom" 
+		>
+			<filterchain><replacetokens>
+				<token key="VERSION" value="${version.id}" />
+				<token key="ARTIFICAT" value="poi-contrib" />
+			</replacetokens></filterchain>
+		</copy>
+		<copy 
+			file="poi-redirect.pom" 
+			tofile="${mavendist.poi.dir}/poms/${jar.name}-scratchpad-${version.id}.pom" 
+		>
+			<filterchain><replacetokens>
+				<token key="VERSION" value="${version.id}" />
+				<token key="ARTIFICAT" value="poi-scratchpad" />
+			</replacetokens></filterchain>
+		</copy>
+
+		<!-- And that's it for maven -->
 	</target>
 
     <target name="jar" depends="compile" description="Creates jar files for distribution">

Modified: jakarta/poi/trunk/poi-redirect.pom
URL: http://svn.apache.org/viewvc/jakarta/poi/trunk/poi-redirect.pom?view=diff&rev=545491&r1=545490&r2=545491
==============================================================================
--- jakarta/poi/trunk/poi-redirect.pom (original)
+++ jakarta/poi/trunk/poi-redirect.pom Fri Jun  8 05:31:21 2007
@@ -25,7 +25,7 @@
 
 	<modelVersion>4.0.0</modelVersion>
 	<groupId>poi</groupId>
-	<artifactId>poi</artifactId>
+	<artifactId>@ARTIFICAT@</artifactId>
 	<version>@VERSION@</version>
 
     <distributionManagement>

Modified: jakarta/poi/trunk/poi.pom
URL: http://svn.apache.org/viewvc/jakarta/poi/trunk/poi.pom?view=diff&rev=545491&r1=545490&r2=545491
==============================================================================
--- jakarta/poi/trunk/poi.pom (original)
+++ jakarta/poi/trunk/poi.pom Fri Jun  8 05:31:21 2007
@@ -25,7 +25,7 @@
 
 	<modelVersion>4.0.0</modelVersion>
 	<groupId>org.apache.poi</groupId>
-	<artifactId>poi</artifactId>
+	<artifactId>@ARTIFICAT@</artifactId>
 	<version>@VERSION@</version>
 	<packaging>jar</packaging>
 	<name>Apache POI</name>
@@ -33,6 +33,14 @@
 	<description>Apache POI - Java API To Access Microsoft Format Files</description>
 
     <dependencies>
+        <!-- START_NON_MAIN_DEPENDENCY -->
+        <dependency>
+           <groupId>org.apache.poi</groupId>
+           <artifactId>poi</artifactId>
+           <version>@VERSION@</version>
+        </dependency>
+        <!-- END_NON_MAIN_DEPENDENCY -->
+
         <dependency>
             <groupId>commons-logging</groupId>
             <artifactId>commons-logging</artifactId>



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


Mime
View raw message