don't ever ping to local repository

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@292169 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-09-28 12:58:13 +00:00
parent 687b41ede8
commit eb1c5b5fb2
1 changed files with 11 additions and 4 deletions

View File

@ -109,14 +109,14 @@ public class DefaultRepositoryMetadataManager
if ( policy.isEnabled() )
{
loadMetadata( metadata, repository, localRepository );
loadMetadata( metadata, repository, localRepository, true );
}
}
loadMetadata( metadata, localRepository, localRepository );
loadMetadata( metadata, localRepository, localRepository, false );
}
private void loadMetadata( RepositoryMetadata repoMetadata, ArtifactRepository remoteRepository,
ArtifactRepository localRepository )
ArtifactRepository localRepository, boolean setRepository )
throws ArtifactMetadataRetrievalException
{
File metadataFile = new File( localRepository.getBasedir(),
@ -129,13 +129,20 @@ public class DefaultRepositoryMetadataManager
if ( repoMetadata.getMetadata() != null )
{
if ( repoMetadata.getMetadata().merge( metadata ) )
{
if ( setRepository )
{
repoMetadata.setRepository( remoteRepository );
}
}
}
else
{
repoMetadata.setMetadata( metadata );
if ( setRepository )
{
repoMetadata.setRepository( remoteRepository );
}
}
}
}