o Fixed plugin version resolution to consider plugin management, too

git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@778242 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-05-24 21:47:17 +00:00
parent 49698c0819
commit c3f3d4c30c
1 changed files with 12 additions and 0 deletions

View File

@ -576,6 +576,18 @@ public class DefaultLifecycleExecutor
break;
}
}
if ( plugin.getVersion() == null && project.getPluginManagement() != null )
{
for ( Plugin pluginInPom : project.getPluginManagement().getPlugins() )
{
if ( pluginInPom.getArtifactId().equals( plugin.getArtifactId() ) )
{
plugin.setVersion( pluginInPom.getVersion() );
break;
}
}
}
// If there is no version to be found then we need to look in the repository metadata for
// this plugin and see what's specified as the latest release.