mirror of https://github.com/apache/maven.git
o Fixed NPE
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@798536 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fdb57e65ca
commit
a151c6c1a3
|
@ -707,19 +707,22 @@ public class DefaultLifecycleExecutor
|
|||
{
|
||||
Metadata pluginMetadata = readMetadata( artifactMetadataFile );
|
||||
|
||||
String release = pluginMetadata.getVersioning().getRelease();
|
||||
|
||||
if ( StringUtils.isNotEmpty( release ) )
|
||||
if ( pluginMetadata.getVersioning() != null )
|
||||
{
|
||||
plugin.setVersion( release );
|
||||
}
|
||||
else
|
||||
{
|
||||
String latest = pluginMetadata.getVersioning().getLatest();
|
||||
String release = pluginMetadata.getVersioning().getRelease();
|
||||
|
||||
if ( StringUtils.isNotEmpty( latest ) )
|
||||
if ( StringUtils.isNotEmpty( release ) )
|
||||
{
|
||||
plugin.setVersion( latest );
|
||||
plugin.setVersion( release );
|
||||
}
|
||||
else
|
||||
{
|
||||
String latest = pluginMetadata.getVersioning().getLatest();
|
||||
|
||||
if ( StringUtils.isNotEmpty( latest ) )
|
||||
{
|
||||
plugin.setVersion( latest );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue