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
Date Sat, 12 Mar 2005 06:10:57 GMT
brett       2005/03/11 22:10:57

  Modified:    maven-core/src/main/java/org/apache/maven/plugin
                        DefaultPluginManager.java
  Log:
  fix plugin configuration discovery
  
  Revision  Changes    Path
  1.47      +8 -6      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.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- DefaultPluginManager.java	10 Mar 2005 21:36:57 -0000	1.46
  +++ DefaultPluginManager.java	12 Mar 2005 06:10:57 -0000	1.47
  @@ -182,14 +182,16 @@
           return pluginDescriptors.containsKey( constructPluginKey( groupId, artifactId )
);
       }
   
  -    private String getPluginId( String goalName )
  +    private static String getPluginId( String goalName )
       {
  -        if ( goalName.indexOf( ":" ) > 0 )
  +        String pluginId = goalName;
  +
  +        if ( pluginId.indexOf( ":" ) > 0 )
           {
  -            return goalName.substring( 0, goalName.indexOf( ":" ) );
  +            pluginId = pluginId.substring( 0, pluginId.indexOf( ":" ) );
           }
   
  -        return goalName;
  +        return "maven-" + pluginId + "-plugin";
       }
   
       // TODO: don't throw Exception
  @@ -198,7 +200,7 @@
           String pluginId = getPluginId( goalName );
   
           // TODO: hardcoding of group ID/artifact ID
  -        verifyPlugin( "maven", "maven-" + pluginId + "-plugin", session );
  +        verifyPlugin( "maven", pluginId, session );
       }
   
       // TODO: don't throw Exception
  @@ -515,7 +517,7 @@
   
           if ( project.getPlugins() != null )
           {
  -            String pluginId = goalId.substring( 0, goalId.indexOf( ":" ) );
  +            String pluginId = getPluginId( goalId );
   
               for ( Iterator iterator = project.getPlugins().iterator(); iterator.hasNext();
)
               {
  
  
  

Mime
View raw message