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/01/10 10:06:15 UTC

cvs commit: maven-components/maven-core/src/java/org/apache/maven/plugin PluginManager.java

jvanzyl     2004/01/10 01:06:15

  Modified:    maven-core/src/java/org/apache/maven/plugin
                        PluginManager.java
  Log:
  o note about classloading
  
  Revision  Changes    Path
  1.2       +8 -21     maven-components/maven-core/src/java/org/apache/maven/plugin/PluginManager.java
  
  Index: PluginManager.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/src/java/org/apache/maven/plugin/PluginManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PluginManager.java	8 Jan 2004 04:29:13 -0000	1.1
  +++ PluginManager.java	10 Jan 2004 09:06:15 -0000	1.2
  @@ -900,10 +900,8 @@
                   // lets do it!
                   if ( artifact.exists() )
                   {
  -                    if ( artifact.getFile().toURL().toString().indexOf("junit") > 0 )
  +                    if ( artifact.getFile().toURL().toString().indexOf( "junit" ) > 0 )
                       {
  -                        System.out.println( "Not loading Junit!" );
  -
                           continue;
                       }
   
  @@ -920,8 +918,12 @@
           }
       }
   
  -
  -    // We need to deal with populating a plugin classloader with its requirements.
  +    // This variant is for isolation, but sadly the plugins aren't ready because
  +    // there are many places where there is the assumption that maven's own
  +    // dependencies are available which can't be done. I originally set it up
  +    // so that the plugin execute with only its stated dependencies and just
  +    // use the system classloader as the parent, but I suppose we could use
  +    // maven's classloader as the parent to make maven's deps available.
       private void processDependencies( Project project, PluginClassLoader classLoader )
           throws MalformedURLException
       {
  @@ -936,26 +938,11 @@
   
               Dependency dependency = artifact.getDependency();
   
  -            String classloader = dependency.getProperty( "classloader" );
  -
  -            // Only add compile type dependencies to classloader
               if ( dependency.getType().equals( "jar" ) )
               {
  -                // We have the jar and the classloader to push it into so
  -                // lets do it!
                   if ( artifact.exists() )
                   {
                       classLoader.addURL( artifact.getFile().toURL() );
  -                    /*
  -                    if ( classloader != null && classloader.equals( "root" ) )
  -                    {
  -                        rootClassLoader.addURL( artifact.getFile().toURL() );
  -                    }
  -                    else
  -                    {
  -                        classLoader.addURL( artifact.getFile().toURL() );
  -                    }
  -                    */
                   }
               }
           }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org