brett 2004/04/16 02:35:52
Modified: src/java/org/apache/maven/jelly/tags/maven Tag:
MAVEN-1_0-BRANCH ReactorTag.java
Log:
fix multiproject reuse issue by removing i.remove(); add sort parameter to determine
whether dep. sort should
be performed
Revision Changes Path
No revision
No revision
1.36.4.10 +19 -8 maven/src/java/org/apache/maven/jelly/tags/maven/ReactorTag.java
Index: ReactorTag.java
===================================================================
RCS file:
/home/cvs/maven/src/java/org/apache/maven/jelly/tags/maven/ReactorTag.java,v
retrieving revision 1.36.4.9
retrieving revision 1.36.4.10
diff -u -r1.36.4.9 -r1.36.4.10
--- ReactorTag.java 15 Apr 2004 06:06:44 -0000 1.36.4.9
+++ ReactorTag.java 16 Apr 2004 09:35:51 -0000 1.36.4.10
@@ -74,6 +74,9 @@
*/
private boolean collectOnly = false;
+ /** Whether to sort the projects by dependencies. */
+ private boolean sort = true;
+
/**
* Post processing flag. If this is set then we will hold on to the
* processed projects, otherwise they will be dumped.
@@ -127,6 +130,11 @@
{
return this.basedir;
}
+
+ public void setSort( boolean sort )
+ {
+ this.sort = sort;
+ }
/** Set the collectOnly attribute. This controls whether reactor
* will actually execute any goals on the projects, or simply
@@ -350,10 +358,6 @@
{
reactorProjects.add( project );
}
-
- // remove this project from the collection, as we no
- // longer require it.
- i.remove();
}
getContext().setVariable( collectionVar, reactorProjects );
@@ -396,10 +400,17 @@
List projects = MavenUtils.getProjects( getBasedir(), projectIncludes,
getExcludes(),
getMavenContext().getMavenSession().getRootContext() );
- DependencyResolver dr = new DependencyResolver();
- dr.setProjects( projects );
+ if ( sort )
+ {
+ DependencyResolver dr = new DependencyResolver();
+ dr.setProjects( projects );
- return dr.getSortedDependencies( false );
+ return dr.getSortedDependencies( false );
+ }
+ else
+ {
+ return projects;
+ }
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]