maven-m2-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject cvs commit: maven-components/maven-core/src/main/java/org/apache/maven/plugin DefaultPluginManager.java PluginManager.java
Date Thu, 03 Mar 2005 11:42:30 GMT
brett       2005/03/03 03:42:30

  Modified:    maven-core/src/main/java/org/apache/maven/lifecycle
                        DefaultLifecycleExecutor.java
               maven-core/src/main/java/org/apache/maven/plugin
                        DefaultPluginManager.java PluginManager.java
  Log:
  must initialise the whole plugin, even if already loaded, as only some mojos may have been
processed
  
  Revision  Changes    Path
  1.15      +11 -12    maven-components/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
  
  Index: DefaultLifecycleExecutor.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- DefaultLifecycleExecutor.java	3 Mar 2005 11:19:45 -0000	1.14
  +++ DefaultLifecycleExecutor.java	3 Mar 2005 11:42:30 -0000	1.15
  @@ -157,21 +157,20 @@
       private void processPluginPhases( String pluginId, MavenSession mavenSession )
           throws Exception
       {
  -        if ( pluginManager.verifyPlugin( pluginId, mavenSession ) )
  +        pluginManager.verifyPlugin( pluginId, mavenSession );
  +        PluginDescriptor pluginDescriptor = pluginManager.getPluginDescriptor( pluginId
);
  +        for ( Iterator j = pluginDescriptor.getMojos().iterator(); j.hasNext(); )
           {
  -            PluginDescriptor pluginDescriptor = pluginManager.getPluginDescriptor( pluginId
);
  -            for ( Iterator j = pluginDescriptor.getMojos().iterator(); j.hasNext(); )
  -            {
  -                MojoDescriptor mojoDescriptor = (MojoDescriptor) j.next();
  +            MojoDescriptor mojoDescriptor = (MojoDescriptor) j.next();
   
  -                // TODO: check if the goal exists in the configuration and is disabled
  -                if ( mojoDescriptor.getPhase() != null )
  -                {
  -                    Phase phase = (Phase) phaseMap.get( mojoDescriptor.getPhase() );
  -                    phase.getGoals().add( mojoDescriptor.getId() );
  -                }
  +            // TODO: check if the goal exists in the configuration and is disabled
  +            if ( mojoDescriptor.getPhase() != null )
  +            {
  +                Phase phase = (Phase) phaseMap.get( mojoDescriptor.getPhase() );
  +                phase.getGoals().add( mojoDescriptor.getId() );
               }
           }
  +
       }
   
       private void processGoalChain( String task, MavenSession session )
  
  
  
  1.38      +3 -9      maven-components/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
  
  Index: DefaultPluginManager.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- DefaultPluginManager.java	2 Mar 2005 12:29:03 -0000	1.37
  +++ DefaultPluginManager.java	3 Mar 2005 11:42:30 -0000	1.38
  @@ -192,16 +192,16 @@
       }
   
       // TODO: don't throw Exception
  -    public boolean verifyPluginForGoal( String goalName, MavenSession session )
  +    public void verifyPluginForGoal( String goalName, MavenSession session )
           throws Exception
       {
           String pluginId = getPluginId( goalName );
   
  -        return verifyPlugin( pluginId, session );
  +        verifyPlugin( pluginId, session );
       }
   
       // TODO: don't throw Exception
  -    public boolean verifyPlugin( String pluginId, MavenSession session )
  +    public void verifyPlugin( String pluginId, MavenSession session )
           throws Exception
       {
           if ( !isPluginInstalled( pluginId ) )
  @@ -217,12 +217,6 @@
               Artifact pluginArtifact = new DefaultArtifact( "maven", artifactId, version,
"plugin", "jar" );
   
               addPlugin( pluginArtifact, session );
  -
  -            return true;
  -        }
  -        else
  -        {
  -            return false;
           }
       }
   
  
  
  
  1.15      +3 -3      maven-components/maven-core/src/main/java/org/apache/maven/plugin/PluginManager.java
  
  Index: PluginManager.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/plugin/PluginManager.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- PluginManager.java	1 Mar 2005 07:05:33 -0000	1.14
  +++ PluginManager.java	3 Mar 2005 11:42:30 -0000	1.15
  @@ -36,11 +36,11 @@
       MojoDescriptor getMojoDescriptor( String goalId );
   
       // TODO: don't throw Exception
  -    boolean verifyPluginForGoal( String goalName, MavenSession session )
  +    void verifyPluginForGoal( String goalName, MavenSession session )
           throws Exception;
   
       // TODO: don't throw Exception
  -    boolean verifyPlugin( String pluginId, MavenSession session )
  +    void verifyPlugin( String pluginId, MavenSession session )
           throws Exception;
   
       PluginDescriptor getPluginDescriptor( String pluginId );
  
  
  

Mime
View raw message