[MNG-4355] [regression] Extensions without version in the POM are not resolved to the RELEASE artifact

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@814571 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-09-14 10:47:46 +00:00
parent 57b95421a6
commit 8edb01d911
1 changed files with 8 additions and 0 deletions

View File

@ -145,6 +145,14 @@ public class DefaultProjectBuildingHelper
for ( Extension extension : build.getExtensions() )
{
if ( extension.getVersion() == null )
{
PluginVersionRequest versionRequest = new DefaultPluginVersionRequest( repositoryRequest );
versionRequest.setGroupId( extension.getGroupId() );
versionRequest.setArtifactId( extension.getArtifactId() );
extension.setVersion( pluginVersionResolver.resolve( versionRequest ).getVersion() );
}
Artifact artifact =
repositorySystem.createArtifact( extension.getGroupId(), extension.getArtifactId(),
extension.getVersion(), "jar" );