mirror of https://github.com/apache/maven.git
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:
parent
e62f7b0956
commit
be460f201a
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue