Return-Path: Mailing-List: contact turbine-maven-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list turbine-maven-dev@jakarta.apache.org Received: (qmail 15367 invoked by uid 97); 30 Nov 2002 17:19:14 -0000 Received: (qmail 15359 invoked by uid 98); 30 Nov 2002 17:19:13 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Received: (qmail 15324 invoked from network); 30 Nov 2002 17:19:11 -0000 Received: from daedalus.apache.org (HELO apache.org) (63.251.56.142) by nagoya.betaversion.org with SMTP; 30 Nov 2002 17:19:11 -0000 Received: (qmail 69133 invoked by uid 500); 30 Nov 2002 17:18:03 -0000 Received: (qmail 69120 invoked from network); 30 Nov 2002 17:18:03 -0000 Received: from icarus.apache.org (63.251.56.143) by daedalus.apache.org with SMTP; 30 Nov 2002 17:18:03 -0000 Received: (qmail 2910 invoked by uid 1162); 30 Nov 2002 17:18:02 -0000 Date: 30 Nov 2002 17:18:02 -0000 Message-ID: <20021130171802.2908.qmail@icarus.apache.org> From: jvanzyl@apache.org To: jakarta-turbine-maven-cvs@apache.org Subject: cvs commit: jakarta-turbine-maven/src/java/org/apache/maven/app PluginManager.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N jvanzyl 2002/11/30 09:18:02 Modified: src/java/org/apache/maven/app PluginManager.java Log: refactoring Revision Changes Path 1.59 +7 -106 jakarta-turbine-maven/src/java/org/apache/maven/app/PluginManager.java Index: PluginManager.java =================================================================== RCS file: /home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/app/PluginManager.java,v retrieving revision 1.58 retrieving revision 1.59 diff -u -r1.58 -r1.59 --- PluginManager.java 27 Nov 2002 01:24:00 -0000 1.58 +++ PluginManager.java 30 Nov 2002 17:18:02 -0000 1.59 @@ -58,12 +58,6 @@ import com.werken.forehead.Forehead; import com.werken.werkz.Goal; -import org.apache.commons.grant.GrantProject; -import org.apache.commons.jelly.JellyContext; -import org.apache.commons.jelly.XMLOutput; -import org.apache.commons.jelly.expression.CompositeExpression; -import org.apache.commons.jelly.expression.Expression; -import org.apache.commons.jelly.expression.jexl.JexlExpressionFactory; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.maven.CreateDependencyClasspath; @@ -103,7 +97,6 @@ * * @version $Id$ * - * @todo Get rid of while iterator idiom. */ public class PluginManager { @@ -137,21 +130,9 @@ /** ${maven.home}/bin/plugins directory. */ private File pluginsDir; - /** Jelly's output. */ - private XMLOutput output; - /** Jelly conext. */ private MavenJellyContext context; - /** The Ant project. */ - private GrantProject antProject; - - /** ${maven.home}/ directory. */ - private File mavenHome; - - /** Project verifier */ - private ProjectVerifier projectVerifier; - /** Plugins cache. */ private Properties pluginsCache; @@ -184,7 +165,7 @@ * * @throws Exception If an error occurs while initializing any plugin. */ - public void initializePlugins() + public void initialize() throws Exception { setPluginsDir( new File( (String) context.getVariable( MavenConstants.HOME ), "plugins" ) ); @@ -573,7 +554,7 @@ JellyUtils.runScript( projectBuildFile, projectBuildFile.getParentFile().toURL(), pluginJellyContext, - getXMLOutput() ); + getContext().getXMLOutput() ); Set currentGoals = new HashSet( werkzProject.getGoals() ); @@ -917,8 +898,8 @@ log.debug( "VERIFYING PLUGIN" ); } // Retrieve the dependencies that this plugin requires. - getProjectVerifier().setMavenProject( pluginProject ); - getProjectVerifier().doExecute(); + //getContext().getProjectVerifier().setMavenProject( pluginProject ); + getContext().getProjectVerifier().execute(); // Mark the plugin as processed. createNewFile( getPluginProcessedMarker( name ) ); @@ -1001,7 +982,7 @@ JellyUtils.runScript( pluginScript, getPluginDir( name ).toURL(), pluginJellyContext, - getXMLOutput() ); + getContext().getXMLOutput() ); } /** @@ -1090,49 +1071,9 @@ } /** - * Set Maven home. - * - * @param mavenHome The location of maven home in the file system. - */ - public void setMavenHome( File mavenHome ) - { - this.mavenHome = mavenHome; - } - - /** - * Retrieve Maven home. - * - * @return File The location of maven home in the file system. - */ - public File getMavenHome() - { - return mavenHome; - } - - /** - * Set Ant project. - * - * @param antProject The ant project. - */ - public void setAntProject( GrantProject antProject ) - { - this.antProject = antProject; - } - - /** - * Retrieve the Ant project. - * - * @return The ant project. - */ - public GrantProject getAntProject() - { - return this.antProject; - } - - /** * Set Jelly context. * - * @param jellyContext The maven jelly context. + * @param context The maven jelly context. */ public void setContext( MavenJellyContext context ) { @@ -1150,26 +1091,6 @@ } /** - * Sets the XMLOutput attribute of the PluginManager object - * - * @param output Jelly XMLOutput. - */ - public void setXMLOutput( XMLOutput output ) - { - this.output = output; - } - - /** - * Retrieve the XML execution output sink. - * - * @return The output sink. - */ - public XMLOutput getXMLOutput() - { - return this.output; - } - - /** * Sets the pluginsDir attribute of the PluginManager object * * @param pluginsDir The maven plugin directory. @@ -1187,25 +1108,5 @@ public File getPluginsDir() { return this.pluginsDir; - } - - /** - * Set the project verifier. - * - * @param projectVerifier The maven project verifier. - */ - public void setProjectVerifier( ProjectVerifier projectVerifier ) - { - this.projectVerifier = projectVerifier; - } - - /** - * Get the project verifier. - * - * @return ProjectVerifier The maven project verfier. - */ - public ProjectVerifier getProjectVerifier() - { - return projectVerifier; } }