Index: src/java/org/apache/maven/jelly/tags/maven/ReactorTag.java =================================================================== retrieving revision 1.36.4.2 diff -u -r1.36.4.2 ReactorTag.java --- src/java/org/apache/maven/jelly/tags/maven/ReactorTag.java 9 Dec 2003 23:36:00 -0000 1.36.4.2 +++ src/java/org/apache/maven/jelly/tags/maven/ReactorTag.java 14 Dec 2003 23:58:36 -0000 @@ -102,6 +102,14 @@ /** project base directory */ private File basedir; + + /** The name of the context variable to store the project collection in. */ + private String collectionVar = "reactorProjects"; + + /** Whether to actually execute the default or specified goals, or + * simply collect the projects in order. + */ + private boolean collectOnly = false; /** * Post processing flag. If this is set then we will hold on to the @@ -138,6 +146,33 @@ { return this.basedir; } + + /** Set the collectOnly attribute. This controls whether reactor + * will actually execute any goals on the projects, or simply + * collect the sorted set of projects included in this reactor + * invocation. + * + * @param collectOnly if true, don't execute project goals; simply + * gather the sorted project collection and store. Otherwise, + * operate as before (execute either specified goals or default goal + * for each project). + */ + public void setCollectOnly(boolean collectOnly) + { + this.collectOnly = collectOnly; + } + + /** Set the collectionVar attribute. This controls the context + * variable which will contain the sorted set of projects included + * in this reactor invocation. + * + * @param collectionVar The context variable for the project collection + * discovered here. + */ + public void setCollectionVar(String collectionVar) + { + this.collectionVar = collectionVar; + } /** * Set the postProcessing attribute. @@ -310,7 +345,12 @@ } beforeLaunchGoals(project); - getMavenContext().getMavenSession().attainGoals( project, goalList ); + + if(!collectOnly) + { + getMavenContext().getMavenSession().attainGoals( project, goalList ); + } + afterLaunchGoals(project); } catch ( Exception e ) @@ -333,7 +373,7 @@ i.remove(); } - getContext().setVariable( "reactorProjects", reactorProjects ); + getContext().setVariable( collectionVar, reactorProjects ); Collection c = (Collection) getContext().getVariable( MavenConstants.FAILED_PROJECTS ); if ( c == null ) {