Skip to content
Permalink
Browse files

[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 6678c6838691cc154a8fe55eb909e420087fcdd6
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/main/java/org/jvnet/hudson/plugins/repositoryconnector/aether/Aether.java
@@ -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);
}
}

0 comments on commit 6678c68

Please sign in to comment.
You can’t perform that action at this time.