fix plugin configuration discovery

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163536 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-03-12 06:10:57 +00:00
parent c6978405cf
commit d179db8752
1 changed files with 8 additions and 6 deletions

View File

@ -182,14 +182,16 @@ public class DefaultPluginManager
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 @@ public class DefaultPluginManager
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 @@ public class DefaultPluginManager
if ( project.getPlugins() != null )
{
String pluginId = goalId.substring( 0, goalId.indexOf( ":" ) );
String pluginId = getPluginId( goalId );
for ( Iterator iterator = project.getPlugins().iterator(); iterator.hasNext(); )
{