PR: MNG-613

merge all metadata fields on update

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@278898 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-09-06 01:55:04 +00:00
parent 1129522bd7
commit 00e365d2ce
2 changed files with 24 additions and 1 deletions

View File

@ -30,6 +30,7 @@ import java.io.FileWriter;
import java.io.IOException;
import java.io.Reader;
import java.io.Writer;
import java.util.Iterator;
/**
* Metadata for the artifact directory of the repository.
@ -162,6 +163,25 @@ public class ArtifactRepositoryMetadata
changed = true;
}
}
if ( versioning.getRelease() != null )
{
changed = true;
v.setRelease( versioning.getRelease() );
}
if ( versioning.getLatest() != null )
{
changed = true;
v.setLatest( versioning.getLatest() );
}
for ( Iterator i = versioning.getVersions().iterator(); i.hasNext(); )
{
String version = (String) i.next();
if ( !v.getVersions().contains( version ) )
{
changed = true;
v.getVersions().add( version );
}
}
}
else
{

View File

@ -95,10 +95,13 @@ public class ArtifactResolutionException
{
ArtifactRepository remoteRepository = (ArtifactRepository) i.next();
sb.append( remoteRepository.getId() );
sb.append( " (" );
sb.append( remoteRepository.getUrl() );
sb.append( ")" );
if ( i.hasNext() )
{
sb.append( ", " );
sb.append( ",\n " );
}
}
}