use repository that provides the metadata

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@280506 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-09-13 05:26:06 +00:00
parent e62f7b0956
commit be460f201a
3 changed files with 6 additions and 12 deletions

View File

@ -80,10 +80,6 @@ public class ArtifactRepositoryMetadata
public void setRepository( ArtifactRepository remoteRepository )
{
// TODO: this is the first wins policy - really, shouldn't call if not
if ( artifact.getRepository() == null )
{
artifact.setRepository( remoteRepository );
}
artifact.setRepository( remoteRepository );
}
}

View File

@ -112,11 +112,13 @@ public class DefaultRepositoryMetadataManager
if ( metadataFile.exists() )
{
Metadata metadata = readMetadata( metadataFile );
repoMetadata.setRepository( remoteRepository );
if ( repoMetadata.getMetadata() != null )
{
metadata.merge( repoMetadata.getMetadata() );
if ( metadata.merge( repoMetadata.getMetadata() ) )
{
repoMetadata.setRepository( remoteRepository );
}
}
repoMetadata.setMetadata( metadata );
}

View File

@ -79,10 +79,6 @@ public class SnapshotArtifactRepositoryMetadata
public void setRepository( ArtifactRepository remoteRepository )
{
// TODO: this is the first wins policy - really, shouldn't call if not
if ( artifact.getRepository() == null )
{
artifact.setRepository( remoteRepository );
}
artifact.setRepository( remoteRepository );
}
}