o fixing construction of mojo descriptor id

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163548 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2005-03-13 23:52:43 +00:00
parent 915f5c77e0
commit 9d2c2d6d51
1 changed files with 10 additions and 3 deletions

View File

@ -223,18 +223,25 @@ public class DefaultLifecycleExecutor
// mojos the user has specified and ignore the rest.
// ----------------------------------------------------------------------
if ( plugin.getGoals().size() > 0 )
{
String pluginId = pluginDescriptor.getArtifactId();
pluginId = pluginId.substring( 6 ).substring( 0, 7 );
// Right now this maven-foo-plugin so this is a hack right now.
pluginId = pluginId.substring( 6 );
pluginId = pluginId.substring( 0, pluginId.lastIndexOf( "-" ) );
for ( Iterator i = plugin.getGoals().iterator(); i.hasNext(); )
{
Goal goal = (Goal) i.next();
configureMojo( pluginManager.getMojoDescriptor( pluginId + ":" + goal.getId() ) );
String mojoId = pluginId + ":" + goal.getId();
MojoDescriptor mojoDescriptor = pluginManager.getMojoDescriptor( mojoId );
configureMojo( mojoDescriptor );
}
}
else