Skip to content

Commit 15a7366

Browse files
committed
Merge branch '3.3.x'
2 parents e40ec93 + 1de35dd commit 15a7366

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/MavenMetadataVersionResolver.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
import org.springframework.http.converter.StringHttpMessageConverter;
4444
import org.springframework.web.client.HttpClientErrorException;
4545
import org.springframework.web.client.RestTemplate;
46+
import org.springframework.web.util.UriComponentsBuilder;
4647

4748
/**
4849
* A {@link VersionResolver} that examines {@code maven-metadata.xml} to determine the
@@ -76,7 +77,10 @@ public SortedSet<DependencyVersion> resolveVersions(String groupId, String artif
7677

7778
private Set<String> resolveVersions(String groupId, String artifactId, MavenArtifactRepository repository) {
7879
Set<String> versions = new HashSet<>();
79-
URI url = repository.getUrl().resolve(groupId.replace('.', '/') + "/" + artifactId + "/maven-metadata.xml");
80+
URI url = UriComponentsBuilder.fromUri(repository.getUrl())
81+
.pathSegment(groupId.replace('.', '/'), artifactId, "maven-metadata.xml")
82+
.build()
83+
.toUri();
8084
try {
8185
HttpHeaders headers = new HttpHeaders();
8286
String username = repository.getCredentials().getUsername();

buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/UpgradeBom.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public UpgradeBom(BomExtension bom) {
4343
}
4444

4545
private void addOpenSourceRepositories() {
46+
getRepositoryNames().add(ArtifactRepositoryContainer.DEFAULT_MAVEN_CENTRAL_REPO_NAME);
4647
getProject().getRepositories().withType(MavenArtifactRepository.class, (repository) -> {
4748
String name = repository.getName();
4849
if (name.startsWith("spring-") && !name.endsWith("-snapshot")) {

0 commit comments

Comments
 (0)