Repository details in RuntimeException for MavenLibraryResolver#addRepository (#12939)

This commit is contained in:
Pedro
2025-08-22 06:25:08 -04:00
committed by GitHub
parent 38fe16b5f2
commit b0da38c278
@@ -123,7 +123,7 @@ public class MavenLibraryResolver implements ClassPathLibrary {
if (MAVEN_CENTRAL_URLS.stream().anyMatch(remoteRepository.getUrl()::startsWith)) { if (MAVEN_CENTRAL_URLS.stream().anyMatch(remoteRepository.getUrl()::startsWith)) {
LOGGER.warn( LOGGER.warn(
"Use of Maven Central as a CDN is against the Maven Central Terms of Service. Use MavenLibraryResolver.MAVEN_CENTRAL_DEFAULT_MIRROR instead.", "Use of Maven Central as a CDN is against the Maven Central Terms of Service. Use MavenLibraryResolver.MAVEN_CENTRAL_DEFAULT_MIRROR instead.",
new RuntimeException("Plugin used Maven Central for library resolution") new RuntimeException("Plugin used Maven Central for library resolution (%s)".formatted(remoteRepository.toString()))
); );
} }
this.repositories.add(remoteRepository); this.repositories.add(remoteRepository);