Merge branch '3.3.x'
This commit is contained in:
commit
15a7366dcd
|
@ -43,6 +43,7 @@ import org.springframework.http.HttpStatus;
|
|||
import org.springframework.http.converter.StringHttpMessageConverter;
|
||||
import org.springframework.web.client.HttpClientErrorException;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
import org.springframework.web.util.UriComponentsBuilder;
|
||||
|
||||
/**
|
||||
* A {@link VersionResolver} that examines {@code maven-metadata.xml} to determine the
|
||||
|
@ -76,7 +77,10 @@ final class MavenMetadataVersionResolver implements VersionResolver {
|
|||
|
||||
private Set<String> resolveVersions(String groupId, String artifactId, MavenArtifactRepository repository) {
|
||||
Set<String> versions = new HashSet<>();
|
||||
URI url = repository.getUrl().resolve(groupId.replace('.', '/') + "/" + artifactId + "/maven-metadata.xml");
|
||||
URI url = UriComponentsBuilder.fromUri(repository.getUrl())
|
||||
.pathSegment(groupId.replace('.', '/'), artifactId, "maven-metadata.xml")
|
||||
.build()
|
||||
.toUri();
|
||||
try {
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
String username = repository.getCredentials().getUsername();
|
||||
|
|
|
@ -43,6 +43,7 @@ public abstract class UpgradeBom extends UpgradeDependencies {
|
|||
}
|
||||
|
||||
private void addOpenSourceRepositories() {
|
||||
getRepositoryNames().add(ArtifactRepositoryContainer.DEFAULT_MAVEN_CENTRAL_REPO_NAME);
|
||||
getProject().getRepositories().withType(MavenArtifactRepository.class, (repository) -> {
|
||||
String name = repository.getName();
|
||||
if (name.startsWith("spring-") && !name.endsWith("-snapshot")) {
|
||||
|
|
Loading…
Reference in New Issue