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