mirror of https://github.com/apache/maven.git
[MNG-4874] The <latestVersion> value isn't updated for local installs
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@1029117 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
11bae42268
commit
d838106be6
|
@ -24,6 +24,7 @@ import java.io.File;
|
||||||
import org.apache.maven.artifact.repository.metadata.Metadata;
|
import org.apache.maven.artifact.repository.metadata.Metadata;
|
||||||
import org.apache.maven.artifact.repository.metadata.Versioning;
|
import org.apache.maven.artifact.repository.metadata.Versioning;
|
||||||
import org.sonatype.aether.artifact.Artifact;
|
import org.sonatype.aether.artifact.Artifact;
|
||||||
|
import org.sonatype.aether.util.artifact.ArtifactProperties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Benjamin Bentmann
|
* @author Benjamin Bentmann
|
||||||
|
@ -52,7 +53,11 @@ final class VersionsMetadata
|
||||||
versioning.addVersion( artifact.getBaseVersion() );
|
versioning.addVersion( artifact.getBaseVersion() );
|
||||||
if ( !artifact.isSnapshot() )
|
if ( !artifact.isSnapshot() )
|
||||||
{
|
{
|
||||||
versioning.setRelease( artifact.getVersion() );
|
versioning.setRelease( artifact.getBaseVersion() );
|
||||||
|
}
|
||||||
|
if ( "maven-plugin".equals( artifact.getProperty( ArtifactProperties.TYPE, "" ) ) )
|
||||||
|
{
|
||||||
|
versioning.setLatest( artifact.getBaseVersion() );
|
||||||
}
|
}
|
||||||
|
|
||||||
Metadata metadata = new Metadata();
|
Metadata metadata = new Metadata();
|
||||||
|
|
Loading…
Reference in New Issue