[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:
Benjamin Bentmann 2010-10-30 16:54:51 +00:00
parent 11bae42268
commit d838106be6
1 changed files with 6 additions and 1 deletions

View File

@ -24,6 +24,7 @@ import java.io.File;
import org.apache.maven.artifact.repository.metadata.Metadata;
import org.apache.maven.artifact.repository.metadata.Versioning;
import org.sonatype.aether.artifact.Artifact;
import org.sonatype.aether.util.artifact.ArtifactProperties;
/**
* @author Benjamin Bentmann
@ -52,7 +53,11 @@ final class VersionsMetadata
versioning.addVersion( artifact.getBaseVersion() );
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();