reuse project set to run faster
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@115018 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -34,17 +34,9 @@
|
||||
prereqs="multiproject:site">
|
||||
</goal>
|
||||
|
||||
|
||||
<!--======================================================================-->
|
||||
<!-- Runs reactor and puts variable "reactorProjects" into jelly contex -->
|
||||
<!-- This allows to share the work done by reactor in goals -->
|
||||
<!-- which just need the list of project but don't need to run any goal -->
|
||||
<!--======================================================================-->
|
||||
<goal name="multiproject:site-init">
|
||||
|
||||
<j:if test="${mpsiteInit == null}">
|
||||
<j:set var="mpsiteInit" value="true" />
|
||||
<!-- generate site docs -->
|
||||
<goal name="multiproject:projects-init">
|
||||
<j:if test="${mpprojectsInit == null}">
|
||||
<j:set var="mpprojectsInit" value="true" />
|
||||
<ant:echo>Gathering project list</ant:echo>
|
||||
<maven:reactor
|
||||
basedir="${maven.multiproject.basedir}"
|
||||
@@ -52,9 +44,22 @@
|
||||
includes="${maven.multiproject.includes}"
|
||||
excludes="${maven.multiproject.excludes}"
|
||||
postProcessing="true"
|
||||
collectOnly="true"
|
||||
collectionVar="multiprojects"
|
||||
ignoreFailures="${maven.multiproject.ignoreFailures}"
|
||||
/>
|
||||
|
||||
</j:if>
|
||||
</goal>
|
||||
|
||||
<!--======================================================================-->
|
||||
<!-- Runs reactor and puts variable "multiprojects" into jelly contex -->
|
||||
<!-- This allows to share the work done by reactor in goals -->
|
||||
<!-- which just need the list of project but don't need to run any goal -->
|
||||
<!--======================================================================-->
|
||||
<goal name="multiproject:site-init" prereqs="multiproject:projects-init">
|
||||
|
||||
<j:if test="${mpsiteInit == null}">
|
||||
<j:set var="mpsiteInit" value="true" />
|
||||
<mkdir dir="${maven.gen.docs}"/>
|
||||
|
||||
<j:set var="aggregateDir" value="${maven.multiproject.aggregateDir}"/>
|
||||
@@ -87,23 +92,14 @@
|
||||
<maven:reactor
|
||||
basedir="${maven.multiproject.basedir}"
|
||||
banner="Generating site for "
|
||||
projectList="${reactorProjects}"
|
||||
projectList="${multiprojects}"
|
||||
goals="site"
|
||||
ignoreFailures="${maven.multiproject.ignoreFailures}"
|
||||
/>
|
||||
|
||||
<!-- TODO: remove <maven:reactor
|
||||
basedir="${maven.multiproject.basedir}"
|
||||
banner="Generating site for "
|
||||
includes="${maven.multiproject.includes}"
|
||||
excludes="${maven.multiproject.excludes}"
|
||||
postProcessing="true"
|
||||
goals="site"
|
||||
ignoreFailures="${maven.multiproject.ignoreFailures}"
|
||||
/> -->
|
||||
<echo>now building reactor projects: ${multiprojects}</echo>
|
||||
|
||||
<!-- copy each project over into ${maven.docs.dest} -->
|
||||
<j:forEach var="reactorProject" items="${reactorProjects}">
|
||||
<j:forEach var="reactorProject" items="${multiprojects}">
|
||||
<!-- note this is the same name as is generated in the navigation-aggregate.xml -->
|
||||
<j:set var="directory" value="${maven.docs.dest}/${maven.multiproject.aggregateDir}${reactorProject.artifactId}"/>
|
||||
<mkdir dir="${directory}"/>
|
||||
@@ -129,7 +125,7 @@
|
||||
prereqs="multiproject:site-init">
|
||||
|
||||
|
||||
<j:forEach var="reactorProject" items="${reactorProjects}">
|
||||
<j:forEach var="reactorProject" items="${multiprojects}">
|
||||
<j:if test="${reactorProject.id == pom.id}">
|
||||
<fail message="You must exclude ${pom.id} (the top level project) from the subproject set"/>
|
||||
</j:if>
|
||||
@@ -196,6 +192,7 @@
|
||||
<!-- Run specific sets of goals for all subprojects -->
|
||||
<!--==================================================================-->
|
||||
<goal name="multiproject:goal"
|
||||
prereqs="multiproject:projects-init"
|
||||
description="Run a given goal on all projects">
|
||||
|
||||
<maven:param-check value="${goal}" fail="true">
|
||||
@@ -205,9 +202,7 @@ maven -Dgoal=clean multiproject:goal</maven:param-check>
|
||||
<maven:reactor
|
||||
basedir="${maven.multiproject.basedir}"
|
||||
banner="Executing ${goal}"
|
||||
includes="${maven.multiproject.includes}"
|
||||
excludes="${maven.multiproject.excludes}"
|
||||
postProcessing="false"
|
||||
projectList="${multiprojects}"
|
||||
goals="${goal}"
|
||||
ignoreFailures="${maven.multiproject.ignoreFailures}"
|
||||
/>
|
||||
@@ -338,24 +333,13 @@ maven -Dgoal=clean multiproject:goal</maven:param-check>
|
||||
<!-- versions of dependencies which are used in sub-projects -->
|
||||
<!--==================================================================-->
|
||||
<goal name="multiproject:dependency-convergence-report"
|
||||
prereqs="multiproject:projects-init"
|
||||
description="Generate report which shows how consistent are the versions of artitfacts between projects" >
|
||||
|
||||
<mkdir dir="${maven.gen.docs}"/>
|
||||
|
||||
<!-- FIXME: 2) Needs to be a tag
|
||||
| get all projects for template processing
|
||||
| -->
|
||||
<maven:reactor
|
||||
basedir="${maven.multiproject.basedir}"
|
||||
banner="Adding dependencies from:"
|
||||
includes="${maven.multiproject.includes}"
|
||||
excludes="${maven.multiproject.excludes}"
|
||||
postProcessing="true"
|
||||
ignoreFailures="true"
|
||||
/>
|
||||
<mkdir dir="${maven.gen.docs}"/>
|
||||
|
||||
<j:useBean var="harmonizer" class="org.apache.maven.multiproject.harmonizer.DependencyHarmonizer"/>
|
||||
${harmonizer.build(reactorProjects)}
|
||||
${harmonizer.build(multiprojects)}
|
||||
|
||||
<j:set var="encoding" value="${maven.docs.outputencoding}"/>
|
||||
<velocity:merge
|
||||
|
||||
Reference in New Issue
Block a user