brett       2004/03/10 03:18:09

  Modified:    src/java/org/apache/maven/plugin Tag: MAVEN-1_0-BRANCH
                        PluginManager.java
  Log:
  cleanup comments and logging
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.70.4.24 +15 -14    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.23
  retrieving revision 1.70.4.24
  diff -u -r1.70.4.23 -r1.70.4.24
  --- PluginManager.java        8 Mar 2004 22:17:49 -0000       1.70.4.23
  +++ PluginManager.java        10 Mar 2004 11:18:08 -0000      1.70.4.24
  @@ -317,7 +317,7 @@
        * @throws MalformedURLException if a file can't be converted to a URL.
        * @throws Exception             for any other issue. FIXME
        */
  -    public void processDependencies( Project project, ForeheadClassLoader 
projectClassLoader )
  +    public void processDependencies( Project project )
               throws MalformedURLException, Exception
       {
           if ( project.getArtifacts() == null )
  @@ -325,7 +325,9 @@
               log.debug( "No dependencies to process for project " + 
project.getName() );
               return;
           }
  -        log.debug( "Processing dependencies for project " + project.getName() );
  +
  +        ForeheadClassLoader projectClassLoader = ( ForeheadClassLoader ) 
project.getContext().getClassLoader();
  +        log.debug( "Processing dependencies for project " + project.getName() + "; 
classloader " + projectClassLoader );
   
           // add the dependencies to the classpath
           for ( Iterator i = project.getArtifacts().iterator(); i.hasNext(); )
  @@ -350,6 +352,8 @@
                   {
                       if ( dependencyClassLoader != null )
                       {
  +                        log.debug( "DEPRECATION: " + dependency.getId() + " in 
project " + project.getId() + " forces the classloader '" + dependencyClassLoader + 
"'" );
  +                        log.debug( "             This behaviour is deprecated. 
Please refer to the FAQ" );
                           ForeheadClassLoader loader = 
Forehead.getInstance().getClassLoader( dependencyClassLoader );
                           if ( loader == null )
                           {
  @@ -398,19 +402,17 @@
           project.pushContext( baseContext );
           baseContext.setProject( project );
   
  +        // Set up the ant project.
           // Before attempting to attain the goals verify the project
           // if desired.
           // FIXME: From attainGoals angle, how does it know the project needs to
           //        to be verified, or that the project object hasn't been used before
           project.verifyDependencies();
  +        processDependencies( project );
   
  -        ForeheadClassLoader classLoader = new ForeheadClassLoader( 
Forehead.getInstance().getClassLoader( ROOT_MAVEN_CLASSLOADER ), project.getId() );
  -        processDependencies( project, classLoader );
  -
  -        // Set up the ant project.
           AntProjectBuilder.build( project, baseContext );
   
  -        // TODO [1.0]: shouldn't this be a stack too? Then session attribute not 
needed
  +        // TODO: shouldn't this be a stack too? Then session attribute not needed
           GoalToJellyScriptHousingMapper transientMapper = new 
GoalToJellyScriptHousingMapper();
   
           // Create the Jelly session
  @@ -443,7 +445,7 @@
           // driver.jelly
           InputStream driver = getClass().getResourceAsStream( "/driver.jelly" );
           JellyScriptHousing driverHousing = createJellyScriptHousing( project, 
driver );
  -        // TODO [1.0] stop reading all scripts 2 times
  +        // TODO: stop reading all scripts 2 times
           driver.close();
           driver = getClass().getResourceAsStream( "/driver.jelly" );
           driverHousing.parse( transientMapper, driver );
  @@ -488,11 +490,8 @@
               goals.add( "build:end" );
           }
   
  -        // TODO [1.0]: any reason not to do this at the start?
           transientMapper.merge( mapper );
   
  -        Thread.currentThread().setContextClassLoader( null );
  -
           WerkzProject werkzProject = new WerkzProject();
           baseContext.setWerkzProject( werkzProject );
   
  @@ -501,6 +500,8 @@
           Set oldDelayedPops = new HashSet( delayedPops );
           delayedPops.clear();
   
  +        Thread.currentThread().setContextClassLoader( null );
  +
           try
           {
               for ( Iterator j = projectHousings.iterator(); j.hasNext(); )
  @@ -796,9 +797,9 @@
           {
               // not needed for maven.xml
               // TODO: should differentiate between plugins and script housings better
  -            ForeheadClassLoader pluginClassLoader = (ForeheadClassLoader) 
jellyScriptHousing.getProject().getContext().getClassLoader();
               jellyScriptHousing.getProject().verifyDependencies();
  -            processDependencies(jellyScriptHousing.getProject(), pluginClassLoader);
  +            processDependencies( jellyScriptHousing.getProject() );
  +            ForeheadClassLoader pluginClassLoader = (ForeheadClassLoader) 
jellyScriptHousing.getProject().getContext().getClassLoader();
               pluginClassLoader.addURL( 
jellyScriptHousing.getPluginDirectory().toURL() );
           }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to