Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[FIXED JENKINS-20263]
Artifact Resolver does not retrieve the latest version from central Maven Repository
* as #resolveMirrors() currently just copies the repository, we should ensure, that the policies are set BEFORE the copy was made
  • Loading branch information
barclay-reg committed Jun 22, 2015
1 parent 9d9175f commit 6678c68
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -116,13 +116,14 @@ private void initRemoteRepos(Collection<Repository> remoteRepositories) {
repoObj.setAuthentication(authentication);
}
repoObj.setRepositoryManager(repo.isRepositoryManager());
repoObj.setPolicy(true, snapshotPolicy);
repoObj.setPolicy(false, releasePolicy);

if (repoObj.isRepositoryManager()) {
// well, in case of repository manager, let's have a look one step deeper
// @see org.sonatype.aether.impl.internal.DefaultMetadataResolver#getEnabledSourceRepositories(org.sonatype.aether.repository.RemoteRepository, org.sonatype.aether.metadata.Metadata.Nature)
repoObj.setMirroredRepositories(resolveMirrors(repoObj));
}
repoObj.setPolicy(true, snapshotPolicy);
repoObj.setPolicy(false, releasePolicy);
repositories.add(repoObj);
}
}
Expand Down

0 comments on commit 6678c68

Please sign in to comment.