brett 2004/01/27 14:29:13 Modified: . Tag: MAVEN-1_0-BRANCH maven.xml src/java/org/apache/maven/jelly/tags/werkz Tag: MAVEN-1_0-BRANCH MavenAttainGoalTag.java MavenGoalTag.java src/java/org/apache/maven/plugin Tag: MAVEN-1_0-BRANCH PluginManager.java Log: When lazy initialising goals, the werkz project they are created in needs to be the same as the werkz project they are attained in Revision Changes Path No revision No revision 1.97.2.6 +1 -2 maven/maven.xml Index: maven.xml =================================================================== RCS file: /home/cvs/maven/maven.xml,v retrieving revision 1.97.2.5 retrieving revision 1.97.2.6 diff -u -r1.97.2.5 -r1.97.2.6 --- maven.xml 26 Jan 2004 22:57:11 -0000 1.97.2.5 +++ maven.xml 27 Jan 2004 22:29:12 -0000 1.97.2.6 @@ -69,13 +69,12 @@ name="maven:plugins-test" description="Test each Maven plugin"> - <!-- TODO [RC2] - put back dashboard - broken in RC1 too when offline, but broken differently in RC2 --> <!-- TODO [RC2] - put back clover - it seems broken at present --> <maven:reactor basedir="${maven.plugins.directory}" includes="${maven.plugins.includes}" - excludes="${maven.plugins.excludes},dashboard/**,clover/**" + excludes="${maven.plugins.excludes},clover/**" goals="plugin:test" banner="Testing" ignoreFailures="false" No revision No revision 1.2.2.2 +7 -2 maven/src/java/org/apache/maven/jelly/tags/werkz/Attic/MavenAttainGoalTag.java Index: MavenAttainGoalTag.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/jelly/tags/werkz/Attic/MavenAttainGoalTag.java,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -u -r1.2.2.1 -r1.2.2.2 --- MavenAttainGoalTag.java 26 Jan 2004 23:36:09 -0000 1.2.2.1 +++ MavenAttainGoalTag.java 27 Jan 2004 22:29:12 -0000 1.2.2.2 @@ -65,6 +65,7 @@ import com.werken.werkz.jelly.WerkzTagSupport; import org.apache.commons.jelly.JellyTagException; import org.apache.commons.jelly.XMLOutput; +import org.apache.maven.MavenConstants; import org.apache.maven.jelly.MavenJellyContext; import org.apache.maven.plugin.GoalToJellyScriptHousingMapper; import org.apache.maven.plugin.PluginManager; @@ -86,7 +87,6 @@ /** The session. */ private Session session; - /** * Construct. */ public MavenAttainGoalTag() @@ -216,5 +216,10 @@ public String getName() { return this.name; + } + + public WerkzProject getProject() + { + return (WerkzProject) getContext().getVariable(MavenConstants.WERKZ_PROJECT); } } 1.2.4.5 +11 -8 maven/src/java/org/apache/maven/jelly/tags/werkz/Attic/MavenGoalTag.java Index: MavenGoalTag.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/jelly/tags/werkz/Attic/MavenGoalTag.java,v retrieving revision 1.2.4.4 retrieving revision 1.2.4.5 diff -u -r1.2.4.4 -r1.2.4.5 --- MavenGoalTag.java 26 Jan 2004 23:32:27 -0000 1.2.4.4 +++ MavenGoalTag.java 27 Jan 2004 22:29:12 -0000 1.2.4.5 @@ -58,10 +58,12 @@ import com.werken.werkz.Action; import com.werken.werkz.Goal; +import com.werken.werkz.WerkzProject; import com.werken.werkz.Session; import com.werken.werkz.jelly.GoalTag; import org.apache.commons.jelly.JellyTagException; import org.apache.commons.jelly.XMLOutput; +import org.apache.maven.MavenConstants; import org.apache.maven.jelly.MavenJellyContext; import org.apache.maven.plugin.GoalToJellyScriptHousingMapper; import org.apache.maven.plugin.JellyScriptHousing; @@ -105,13 +107,6 @@ super.doTag( output ); goal = getProject().getGoal( getName() ); goal.setAction( new MavenGoalAction() ); - // TODO [RC2]: remove debugging - // System.err.println( "defining goal: " + getName() ); - } - else - { - // TODO [RC2]: remove debugging - // System.err.println( "skipping goal already defined: " + getName() ); } } @@ -122,6 +117,9 @@ getBody().run( context, context.getXMLOutput() ); } + /** + * @todo refactor into a separate class that gets the necessary variables delegated to it. + */ public class MavenGoalAction implements Action { public void performAction( Session session ) throws Exception @@ -167,5 +165,10 @@ { return true; } + } + + public WerkzProject getProject() + { + return (WerkzProject) getContext().getVariable(MavenConstants.WERKZ_PROJECT); } } No revision No revision 1.70.4.11 +1 -6 maven/src/java/org/apache/maven/plugin/PluginManager.java Index: PluginManager.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/plugin/PluginManager.java,v retrieving revision 1.70.4.10 retrieving revision 1.70.4.11 diff -u -r1.70.4.10 -r1.70.4.11 --- PluginManager.java 26 Jan 2004 23:32:27 -0000 1.70.4.10 +++ PluginManager.java 27 Jan 2004 22:29:12 -0000 1.70.4.11 @@ -665,16 +665,11 @@ public Set prepAttainGoal( String goalName, MavenJellyContext baseContext, GoalToJellyScriptHousingMapper transientMapper ) throws Exception { -// TODO [RC2] - remove -//System.err.println("prepping goal " + goalName); Set pluginSet = transientMapper.resolveJellyScriptHousings( goalName ); for ( Iterator j = pluginSet.iterator(); j.hasNext(); ) { JellyScriptHousing housing = ( JellyScriptHousing ) j.next(); - -// TODO [RC2] - remove -//System.err.println( "prepping plugin " + housing.getId() + " for the first time" ); // FIXME: this is a bit nasty File pluginDirectory = housing.getProject().getFile().getParentFile();
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]