brett 2004/02/19 15:33:06
Modified: src/java/org/apache/maven/plugin Tag: MAVEN-1_0-BRANCH
GoalToJellyScriptHousingMapper.java
Log:
PR: MAVEN-1165, MAVEN-1094
fix issues with dependant tag libraries not being loaded first
Revision Changes Path
No revision
No revision
1.3.4.9 +11 -5
maven/src/java/org/apache/maven/plugin/GoalToJellyScriptHousingMapper.java
Index: GoalToJellyScriptHousingMapper.java
===================================================================
RCS file:
/home/cvs/maven/src/java/org/apache/maven/plugin/GoalToJellyScriptHousingMapper.java,v
retrieving revision 1.3.4.8
retrieving revision 1.3.4.9
diff -u -r1.3.4.8 -r1.3.4.9
--- GoalToJellyScriptHousingMapper.java 13 Feb 2004 02:31:25 -0000 1.3.4.8
+++ GoalToJellyScriptHousingMapper.java 19 Feb 2004 23:33:06 -0000 1.3.4.9
@@ -67,6 +67,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.maven.util.InsertionOrderedSet;
import org.apache.plexus.util.StringUtils;
import com.werken.werkz.CyclicGoalChainException;
@@ -275,7 +276,7 @@
*/
Set resolveJellyScriptHousings( String goal ) throws NoSuchGoalException
{
- Set pluginSet = new HashSet();
+ Set pluginSet = new InsertionOrderedSet();
Goal[] chain = getExecutionChain( goal, goalProject );
@@ -294,7 +295,10 @@
pluginSet.addAll( decorators );
}
- pluginSet.addAll( resolveDynaTagPlugins( pluginSet ) );
+ // Done like this as the dynatag plugin dependencies must be first in the
list
+ InsertionOrderedSet newPluginSet = resolveDynaTagPlugins( pluginSet );
+ newPluginSet.addAll( pluginSet );
+ pluginSet = newPluginSet;
// Here we make the resolved plugins field be the full set of plugins, and
the plugins returned just the
// additional ones resolved.
@@ -348,11 +352,13 @@
* Resolve plugins that provide dynamic tags for the given set of plugins.
*
* @param plugins the plugins containing tags
- * @return the plugins providing tags
+ * @return the plugins providing tags, in insertion order
*/
- private Set resolveDynaTagPlugins( Set plugins )
+ private InsertionOrderedSet resolveDynaTagPlugins( Set plugins )
{
- Set resolvedDynaTagPlugins = new HashSet();
+ // Important to return an insertion ordered set as the calling function is
going to add to it and
+ // depends on these remaining first
+ InsertionOrderedSet resolvedDynaTagPlugins = new InsertionOrderedSet();
for ( Iterator i = plugins.iterator(); i.hasNext(); )
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]