You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by jv...@apache.org on 2004/05/07 19:56:57 UTC
cvs commit: maven-components/maven-core/src/main/java/org/apache/maven/plugin/manager AbstractPluginManager.java DefaultPluginManagerManager.java PluginManager.java
jvanzyl 2004/05/07 10:56:57
Modified: maven-core/src/main/java/org/apache/maven/plugin/manager
AbstractPluginManager.java
DefaultPluginManagerManager.java PluginManager.java
Log:
no message
Revision Changes Path
1.4 +2 -44 maven-components/maven-core/src/main/java/org/apache/maven/plugin/manager/AbstractPluginManager.java
Index: AbstractPluginManager.java
===================================================================
RCS file: /home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/plugin/manager/AbstractPluginManager.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AbstractPluginManager.java 2 Apr 2004 18:33:13 -0000 1.3
+++ AbstractPluginManager.java 7 May 2004 17:56:57 -0000 1.4
@@ -16,16 +16,10 @@
* limitations under the License.
*/
-import org.apache.maven.artifact.MavenArtifact;
-import org.apache.maven.model.Dependency;
-import org.apache.maven.project.MavenProject;
-import org.codehaus.classworlds.ClassRealm;
import org.codehaus.plexus.util.Expand;
import java.io.File;
import java.io.IOException;
-import java.net.MalformedURLException;
-import java.util.Iterator;
import java.util.List;
/**
@@ -46,8 +40,6 @@
protected String mavenLocalHome;
- protected ClassRealm rootClassRealm;
-
protected List goals;
public abstract String getId();
@@ -75,15 +67,13 @@
}
}
- public void initializePlugins( String mavenHome, String mavenLocalHome, ClassRealm rootClassRealm )
+ public void initializePlugins( String mavenHome, String mavenLocalHome )
throws Exception
{
this.mavenHome = mavenHome;
this.mavenLocalHome = mavenLocalHome;
- this.rootClassRealm = rootClassRealm;
-
setupPluginsDirectories();
File[] files = pluginsDir.listFiles();
@@ -150,38 +140,6 @@
String directory = files[i].getName();
loadPlugin( directory );
- }
- }
- }
- }
-
- protected void processDependencies( MavenProject project, ClassRealm realm )
- throws MalformedURLException
- {
- if ( project.getArtifacts() == null )
- {
- return;
- }
-
- for ( Iterator i = project.getArtifacts().iterator(); i.hasNext(); )
- {
- MavenArtifact artifact = (MavenArtifact) i.next();
-
- Dependency dependency = artifact.getDependency();
-
- if ( dependency.getType().equals( "jar" ) )
- {
- // We have the jar and the classloader to push it into so
- // lets do it!
- if ( artifact.exists() )
- {
- if ( artifact.getFile().toURL().toString().indexOf( "junit" ) > 0 )
- {
- continue;
- }
-
- rootClassRealm.addConstituent( artifact.getFile().toURL() );
-
}
}
}
1.11 +1 -14 maven-components/maven-core/src/main/java/org/apache/maven/plugin/manager/DefaultPluginManagerManager.java
Index: DefaultPluginManagerManager.java
===================================================================
RCS file: /home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/plugin/manager/DefaultPluginManagerManager.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- DefaultPluginManagerManager.java 7 Apr 2004 20:00:41 -0000 1.10
+++ DefaultPluginManagerManager.java 7 May 2004 17:56:57 -0000 1.11
@@ -23,12 +23,9 @@
import org.apache.maven.plugin.descriptor.PluginDescriptor;
import org.apache.maven.plugin.descriptor.PluginDescriptorBuilder;
import org.apache.maven.project.MavenProject;
-import org.codehaus.classworlds.ClassRealm;
import org.codehaus.plexus.component.discovery.ComponentDiscoveryEvent;
import org.codehaus.plexus.component.discovery.ComponentDiscoveryListener;
-import org.codehaus.plexus.context.Context;
import org.codehaus.plexus.logging.AbstractLogEnabled;
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
import org.codehaus.plexus.util.dag.CycleDetectedException;
import org.codehaus.plexus.util.dag.DAG;
@@ -41,12 +38,10 @@
public class DefaultPluginManagerManager
extends AbstractLogEnabled
- implements PluginManagerManager, ComponentDiscoveryListener, Contextualizable, Initializable
+ implements PluginManagerManager, ComponentDiscoveryListener, Initializable
{
static String MAVEN_PLUGIN = "maven-plugin";
- private ClassRealm rootClassRealm;
-
// ----------------------------------------------------------------------
// Components
// ----------------------------------------------------------------------
@@ -231,12 +226,6 @@
// Lifecycle
// ----------------------------------------------------------------------
- public void contextualize( Context context )
- throws Exception
- {
- rootClassRealm = (ClassRealm) context.get( "rootClassRealm" );
- }
-
public void initialize()
throws Exception
{
@@ -245,8 +234,6 @@
PluginManager pluginManager = (PluginManager) i.next();
getLogger().info( "Initializing " + pluginManager.getId() + " plugin manager." );
-
- //pluginManager.initializePlugins( mavenHome, mavenLocalHome, rootClassRealm );
}
}
}
1.6 +2 -3 maven-components/maven-core/src/main/java/org/apache/maven/plugin/manager/PluginManager.java
Index: PluginManager.java
===================================================================
RCS file: /home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/plugin/manager/PluginManager.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- PluginManager.java 4 Apr 2004 17:23:44 -0000 1.5
+++ PluginManager.java 7 May 2004 17:56:57 -0000 1.6
@@ -18,7 +18,6 @@
import org.apache.maven.plugin.PluginExecutionRequest;
import org.apache.maven.plugin.PluginExecutionResponse;
-import org.codehaus.classworlds.ClassRealm;
import java.util.List;
@@ -42,6 +41,6 @@
void loadPlugin( String directory )
throws Exception;
- void initializePlugins( String mavenHome, String mavenLocalHome, ClassRealm rootClassRealm )
+ void initializePlugins( String mavenHome, String mavenLocalHome )
throws Exception;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org