Author: akarasulu
Date: Sun Feb 6 16:48:58 2005
New Revision: 151648
URL: http://svn.apache.org/viewcvs?view=rev&rev=151648
Log:
changes ...
o added ability to consolidate javadocs for multiproject at the top level
o added more multiproject analogs to dist goals
Modified:
maven/maven-1/plugins/trunk/dist/plugin.jelly
Modified: maven/maven-1/plugins/trunk/dist/plugin.jelly
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/dist/plugin.jelly?view=diff&r1=151647&r2=151648
==============================================================================
--- maven/maven-1/plugins/trunk/dist/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/dist/plugin.jelly Sun Feb 6 16:48:58 2005
@@ -195,6 +195,9 @@
<!-- D E P L O Y D I S T R I B U T I O N -->
<!-- ================================================================== -->
+ <goal name="dist:multiproject-deploy" description="Deploy a multiproject
distribution"
+ prereqs="dist:multiproject-deploy-bin,dist:multiproject-deploy-src" />
+
<goal name="dist:deploy" description="Deploy a distribution"
prereqs="dist:deploy-bin,dist:deploy-src" />
@@ -215,6 +218,24 @@
</goal>
+ <goal name="dist:multiproject-deploy-bin" description="Deploy a binary
multiproject distribution" prereqs="dist:multiproject-bin">
+
+ <artifact:deploy
+ artifact="${maven.dist.dir}/${maven.final.name}.tar.gz"
+ type="distribution-targz"
+ project="${pom}"
+ typeHandler="${distTypeHandler}"
+ />
+ <artifact:deploy
+ artifact="${maven.dist.dir}/${maven.final.name}.zip"
+ type="distribution-zip"
+ project="${pom}"
+ typeHandler="${distTypeHandler}"
+ />
+
+ </goal>
+
+
<goal name="dist:deploy-src" description="Deploy a source distribution"
prereqs="dist:build-src">
<artifact:deploy
@@ -232,6 +253,24 @@
</goal>
+ <goal name="dist:multiproject-deploy-src" description="Deploy a source
multiproject distribution" prereqs="dist:multiproject-src">
+
+ <artifact:deploy
+ artifact="${maven.dist.dir}/${maven.final.name}-src.tar.gz"
+ type="distribution-src-targz"
+ project="${pom}"
+ typeHandler="${distTypeHandler}"
+ />
+ <artifact:deploy
+ artifact="${maven.dist.dir}/${maven.final.name}-src.zip"
+ type="distribution-src-zip"
+ project="${pom}"
+ typeHandler="${distTypeHandler}"
+ />
+
+ </goal>
+
+
<!-- ================================================================== -->
<!-- D E P L O Y S N A P S H O T D I S T R I B U T I O N -->
<!-- ================================================================== -->
@@ -272,4 +311,221 @@
/>
</goal>
+
+
+ <!-- ================================================================== -->
+ <!-- B I N A R Y M U L T I P R O J E C T D I S T R I B U T I O N -->
+ <!-- ================================================================== -->
+
+
+ <goal
+ name="dist:multiproject-bin"
+ prereqs="dist:build-setup">
+
+ <!-- we use plugin's own settings in first order. -->
+ <!-- if they are not provided we will try use use multiproject settings -->
+
+ <j:set var="multiprojectIncludes"
value="${maven.dist.multiproject.includes}"/>
+ <j:if test="${multiprojectIncludes == null or
multiprojectIncludes.length() eq 0}">
+ <maven:pluginVar var="multiprojectIncludes"
plugin="maven-multiproject-plugin"
+ property="maven.multiproject.includes"/>
+ </j:if>
+
+ <j:set var="multiprojectExcludes"
value="${maven.dist.multiproject.excludes}"/>
+ <j:if test="${multiprojectExcludes == null or
multiprojectExcludes.length() eq 0}">
+ <maven:pluginVar var="multiprojectExcludes"
plugin="maven-multiproject-plugin"
+ property="maven.multiproject.excludes"/>
+ </j:if>
+
+ <j:set var="multiprojectBasedir"
value="${maven.idea.project.multiproject.basedir}"/>
+ <j:if test="${multiprojectBasedir == null or multiprojectBasedir.length()
eq 0}">
+ <maven:pluginVar var="multiprojectBasedir"
plugin="maven-multiproject-plugin"
+ property="maven.multiproject.basedir"/>
+ </j:if>
+
+ <maven:reactor
+ basedir="${multiprojectBasedir}"
+ banner="Generating dist materials for:"
+ includes="${multiprojectIncludes}"
+ excludes="${multiprojectExcludes}"
+ postProcessing="true"
+ goals="xdoc:init, jar:jar"
+ ignoreFailures="true"/>
+
+ <ant:echo>
+ +----------------------------------------------------------------+
+ | C R E A T I N G B I N A R Y M U L T I P R O J E C T D I S T |
+ +----------------------------------------------------------------+
+ </ant:echo>
+
+ <ant:delete dir="${maven.dist.bin.assembly.dir}"/>
+ <ant:mkdir dir="${maven.dist.bin.assembly.dir}"/>
+
+ <ant:echo>
+ +--------------------------------------------------------------+
+ | C O P Y I N G L I C E N S E S A N D D I S C L A I M E R S |
+ +--------------------------------------------------------------+
+ </ant:echo>
+
+ <ant:copy todir="${maven.dist.bin.assembly.dir}">
+ <ant:fileset dir=".">
+ <ant:include name="README.txt"/>
+ <ant:include name="LICENSE*"/>
+ <ant:include name="NOTICE*"/>
+ <ant:include name="INCUBATOR-DISCLAIMER.txt"/>
+ </ant:fileset>
+ </ant:copy>
+
+ <ant:echo>
+ +--------------------------------------------------------------+
+ | C O P Y I N G C H I L D P R O J E C T A R T I F A C T S |
+ +--------------------------------------------------------------+
+ </ant:echo>
+
+ <!-- Copy artifacts from all reactor project target directories -->
+ <ant:copy todir="${maven.dist.bin.assembly.dir}">
+ <j:forEach var="project" items="${reactorProjects}">
+ <ant:fileset dir="${project.mavenXml.parent}/target">
+ <ant:include name="*${project.artifactId}*.jar"/>
+ </ant:fileset>
+ </j:forEach>
+ </ant:copy>
+
+ <ant:echo>
+ +-----------------------------------------------------+
+ | C R E A T I N G S I T E D O C U M E N T A T I O N |
+ +-----------------------------------------------------+
+ </ant:echo>
+
+ <attainGoal name="multiproject:site"/>
+
+ <!-- Copy generated non-javadoc documentation -->
+ <j:set var="docsDest" value="${maven.docs.dest}"/>
+ <ant:copy todir="${maven.dist.bin.assembly.dir}/docs">
+ <ant:fileset dir="${docsDest}">
+ <ant:include name="**"/>
+ </ant:fileset>
+ </ant:copy>
+
+ <ant:echo>
+ +-----------------------------------------------------------+
+ | C R E A T I N G C O N S O L I D A T E D J A V A D O C S |
+ +-----------------------------------------------------------+
+ </ant:echo>
+
+ <javadoc destdir="${maven.dist.bin.assembly.dir}/docs/apidocs">
+ <j:forEach var="project" items="${reactorProjects}">
+ <packageset dir="${project.build.sourceDirectory}"/>
+ </j:forEach>
+ <classpath>
+ <fileset dir="${basedir}">
+ <include name="**/*.jar"/>
+ </fileset>
+ </classpath>
+ </javadoc>
+
+ <ant:echo>
+ +---------------------------------------------+
+ | C R E A T I N G B I N A R Y T A R B A L L |
+ +---------------------------------------------+
+ </ant:echo>
+
+ <!-- Create a tar.gz file -->
+ <ant:tar longfile="gnu"
tarfile="${maven.dist.dir}/${maven.final.name}.tar">
+ <ant:tarfileset dir="${maven.dist.bin.archive.dir}"/>
+ </ant:tar>
+ <ant:gzip
+ zipfile="${maven.dist.dir}/${maven.final.name}.tar.gz"
+ src="${maven.dist.dir}/${maven.final.name}.tar"
+ />
+
+ <ant:delete file="${maven.dist.dir}/${maven.final.name}.tar"/>
+
+ <ant:echo>
+ +----------------------------------------------+
+ | C R E A T I N G B I N A R Y Z I P F I L E |
+ +----------------------------------------------+
+ </ant:echo>
+
+ <!-- Create a zip file -->
+ <ant:zip zipfile="${maven.dist.dir}/${maven.final.name}.zip">
+ <ant:zipfileset dir="${maven.dist.bin.archive.dir}"/>
+ </ant:zip>
+ </goal>
+
+
+ <!-- ================================================================== -->
+ <!-- S O U R C E M U L T I P R O J E C T D I S T R I B U T I O N -->
+ <!-- ================================================================== -->
+
+
+ <goal
+ name="dist:multiproject-src"
+ prereqs="dist:build-setup">
+
+ <ant:echo>
+ +----------------------------------------------------------------+
+ | C R E A T I N G S O U R C E M U L T I P R O J E C T D I S T |
+ +----------------------------------------------------------------+
+ </ant:echo>
+
+ <ant:delete dir="${maven.dist.src.assembly.dir}"/>
+ <ant:mkdir dir="${maven.dist.src.assembly.dir}"/>
+
+ <ant:echo>
+ +----------------------------------------------+
+ | C O P Y I N G A L L S O U R C E F I L E S |
+ +----------------------------------------------+
+ </ant:echo>
+
+ <ant:copy todir="${maven.dist.src.assembly.dir}">
+ <ant:fileset dir="${user.dir}">
+ <ant:include name="**/*"/>
+ <ant:exclude name="**/target/**"/>
+ <ant:exclude name="**/*.log*"/>
+ <ant:exclude name="**/*.ipr*"/>
+ <ant:exclude name="**/*.iml*"/>
+ <ant:exclude name="**/*.iws*"/>
+ <ant:exclude name="**/*.md5*"/>
+ <ant:exclude name="**/.???*"/>
+ </ant:fileset>
+ </ant:copy>
+
+ <ant:echo>
+
+ +---------------------------------------------+
+ | C R E A T I N G S O U R C E T A R B A L L |
+ +---------------------------------------------+
+ </ant:echo>
+
+ <!-- Create a tar.gz file -->
+ <ant:tar longfile="gnu"
tarfile="${maven.dist.dir}/${maven.final.name}-src.tar">
+ <ant:tarfileset dir="${maven.dist.src.archive.dir}"/>
+ </ant:tar>
+ <ant:gzip
+ zipfile="${maven.dist.dir}/${maven.final.name}-src.tar.gz"
+ src="${maven.dist.dir}/${maven.final.name}-src.tar"
+ />
+
+ <ant:delete file="${maven.dist.dir}/${maven.final.name}-src.tar"/>
+
+ <ant:echo>
+ +----------------------------------------------+
+ | C R E A T I N G S O U R C E Z I P F I L E |
+ +----------------------------------------------+
+ </ant:echo>
+
+ <!-- Create a zip file -->
+ <ant:zip zipfile="${maven.dist.dir}/${maven.final.name}-src.zip">
+ <ant:zipfileset dir="${maven.dist.src.archive.dir}"/>
+ </ant:zip>
+ </goal>
+
+ <goal
+ name="dist:multiproject"
+ prereqs="dist:multiproject-bin,dist:multiproject-src"
+ description="Build a complete distribution for a multiproject
configuration.">
+ </goal>
+
</project>
+
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]