vmassol 7bc976f263 - Added some goal documentation
- Fixed one goal description
- Removed extra empty lines


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113602 13f79535-47bb-0310-9956-ffa450edef68
2003-07-05 08:31:11 +00:00

225 lines
8.5 KiB
XML

<?xml version="1.0"?>
<project
xmlns:j="jelly:core"
xmlns:maven="jelly:maven"
xmlns:ant="jelly:ant"
xmlns:doc="doc"
xmlns:util="jelly:util"
xmlns:velocity="jelly:velocity">
<j:set var="maven.gen.docs"
value="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.gen.docs')}"/>
<j:set var="maven.docs.dest"
value="${pom.getPluginContext('maven-xdoc-plugin').getVariable('maven.docs.dest')}"/>
<!--==================================================================-->
<!-- Default goal: builds sites for all subprojects -->
<!--==================================================================-->
<goal name="multiproject"
description="Run the site goal of all subprojects"
prereqs="multiproject:site">
</goal>
<!--==================================================================-->
<!-- Builds sites for all subprojects -->
<!--==================================================================-->
<goal name="multiproject:site"
description="Run the site goal of all subprojects">
<attainGoal name="multiproject:create-nav"/>
<!-- generate site docs -->
<maven:reactor
basedir="${maven.multiproject.basedir}"
includes="${maven.multiproject.includes}"
excludes="${maven.multiproject.excludes}"
postProcessing="true"
goals="clean,site"
ignoreFailures="${maven.multiproject.ignoreFailures}"
/>
<attainGoal name="site" />
<!-- copy or not? -->
<j:set var="navType" value="${maven.multiproject.navigation}"/>
<j:if test="${navType == 'aggregate'}">
<!-- copy each project over into ${maven.docs.dest} -->
<j:forEach var="reactorProject" items="${reactorProjects}">
<!-- note this is the same name as is generated in the navigation-aggregate.xml -->
<j:set var="directory" value="${maven.docs.dest}/multiproject/${reactorProject.name}"/>
<mkdir dir="${directory}"/>
<!--
${reactorProject.name} has docs directory
${reactorProject.getPluginContext('maven-xdoc-plugin').getVariable('maven.docs.dest')}
needing to be copied
-->
<j:set var="fromDir"
value="${reactorProject.getPluginContext('maven-xdoc-plugin').getVariable('maven.docs.dest')}"/>
<copy toDir="${directory}">
<fileset dir="${fromDir}"/>
</copy>
</j:forEach>
</j:if>
</goal>
<!--==================================================================-->
<!-- Generate HTML files for navigation bar across projects. -->
<!--==================================================================-->
<goal name="multiproject:create-nav">
<mkdir dir="${maven.gen.docs}"/>
<!-- get all projects for template processing -->
<maven:reactor
basedir="${maven.multiproject.basedir}"
includes="${maven.multiproject.includes}"
excludes="${maven.multiproject.excludes}"
postProcessing="true"
ignoreFailures="true"
/>
<!-- generate navbar for project based on aggregate or independent -->
<j:set var="navType" value="${maven.multiproject.navigation}"/>
<j:if test="${navType != ''}">
<echo>Producing ${navType} navigation...</echo>
<velocity:merge
name="${maven.gen.docs}/navigation.xml"
basedir="${plugin.resources}/templates"
template="navigation-${navType}.xml"/>
</j:if>
<util:file var="userNavTemplate" name="${basedir}/multiproject/navigation.xml"/>
<j:if test="${userNavTemplate.exists()}">
<echo>Producing user supplied navigation...</echo>
<velocity:merge
name="${maven.gen.docs}/navigation.xml"
basedir="${basedir}/multiproject"
template="navigation.xml"/>
</j:if>
</goal>
<!--==================================================================-->
<!-- Run specific sets of goals for all subprojects -->
<!--==================================================================-->
<goal name="multiproject:goal" description="Run a given goal on all projects">
<!-- FIXME: This should be a tag somewhere else as it's common to do tag param checking -->
<j:if test="${empty(goal)}">
<ant:fail>A goal to run must be specified, e.g.
maven -Dgoal=clean multiproject:goal
</ant:fail>
</j:if>
<ant:echo>Executing ${goal} on all projects</ant:echo>
<maven:reactor
basedir="${maven.multiproject.basedir}"
includes="${maven.multiproject.includes}"
excludes="${maven.multiproject.excludes}"
postProcessing="false"
goals="${goal}"
ignoreFailures="${maven.multiproject.ignoreFailures}"
/>
</goal>
<!--==================================================================-->
<!-- Builds all artifacts for all subprojects -->
<!--==================================================================-->
<goal name="multiproject:artifact"
description=" Builds all artifacts for all subproject">
<maven:reactor
basedir="${maven.multiproject.basedir}"
includes="${maven.multiproject.includes}"
excludes="${maven.multiproject.excludes}"
postProcessing="false"
goals="multiproject:artifact-callback"
ignoreFailures="${maven.multiproject.ignoreFailures}"
/>
</goal>
<goal name="multiproject:artifact-callback">
<attainGoal name="${maven.multiproject.type}:${maven.multiproject.type}"/>
</goal>
<!--==================================================================-->
<!-- Run 'artifact':install for all subprojects -->
<!--==================================================================-->
<goal name="multiproject:install"
description="Run 'artifact':install for all subprojects">
<maven:reactor
basedir="${maven.multiproject.basedir}"
includes="${maven.multiproject.includes}"
excludes="${maven.multiproject.excludes}"
postProcessing="false"
goals="multiproject:install-callback"
ignoreFailures="${maven.multiproject.ignoreFailures}"
/>
</goal>
<goal name="multiproject:install-callback">
<attainGoal name="${maven.multiproject.type}:install"/>
</goal>
<!--==================================================================-->
<!-- Run 'artifact':install-snapshot for all subprojects -->
<!--==================================================================-->
<goal name="multiproject:install-snapshot"
description="Run 'artifact':install-snapshot for all subprojects">
<maven:reactor
basedir="${maven.multiproject.basedir}"
includes="${maven.multiproject.includes}"
excludes="${maven.multiproject.excludes}"
postProcessing="false"
goals="multiproject:install-snapshot-callback"
ignoreFailures="${maven.multiproject.ignoreFailures}"
/>
</goal>
<goal name="multiproject:install-snapshot-callback">
<attainGoal name="${maven.multiproject.type}:install-snapshot"/>
</goal>
<!--==================================================================-->
<!-- Run 'artifact':deploy for all subprojects -->
<!--==================================================================-->
<goal name="multiproject:deploy"
description="Run 'artifact':deploy for all subprojects">
<maven:reactor
basedir="${maven.multiproject.basedir}"
includes="${maven.multiproject.includes}"
excludes="${maven.multiproject.excludes}"
postProcessing="false"
goals="multiproject:deploy-callback"
ignoreFailures="${maven.multiproject.ignoreFailures}"
/>
</goal>
<goal name="multiproject:deploy-callback">
<attainGoal name="${maven.multiproject.type}:deploy"/>
</goal>
<!--==================================================================-->
<!-- Run 'artifact':deploy-snapshot for all subprojects -->
<!--==================================================================-->
<goal name="multiproject:deploy-snapshot"
description="Run 'artifact':deploy-snapshot for all subprojects">
<maven:reactor
basedir="${maven.multiproject.basedir}"
includes="${maven.multiproject.includes}"
excludes="${maven.multiproject.excludes}"
postProcessing="false"
goals="multiproject:deploy-snapshot-callback"
ignoreFailures="${maven.multiproject.ignoreFailures}"
/>
</goal>
<goal name="multiproject:deploy-snapshot-callback">
<attainGoal name="${maven.multiproject.type}:deploy-snapshot"/>
</goal>
</project>