From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Date: Mon, 30 Jun 2025 02:41:48 +0800 Subject: [PATCH] Better warning message for discouraging Maven Central as CDN Dreeam's Note: Also see `Configurable LibraryLoader maven repos` patch, able to match googleapi mirror urls, to replace to repo url we custom defined. This able to switch back to maven central repo, to prevent situation that dependencies exist in maven central, but not in mirror. diff --git a/src/main/java/io/papermc/paper/plugin/loader/library/impl/MavenLibraryResolver.java b/src/main/java/io/papermc/paper/plugin/loader/library/impl/MavenLibraryResolver.java index 298bb04c294a89ad783eb3dac73faf47fa5fb1ba..bb715d2ee5b0c548ac2d2d07bfaa2cb456794bb9 100644 --- a/src/main/java/io/papermc/paper/plugin/loader/library/impl/MavenLibraryResolver.java +++ b/src/main/java/io/papermc/paper/plugin/loader/library/impl/MavenLibraryResolver.java @@ -122,7 +122,7 @@ public class MavenLibraryResolver implements ClassPathLibrary { public void addRepository(final RemoteRepository remoteRepository) { if (MAVEN_CENTRAL_URLS.stream().anyMatch(remoteRepository.getUrl()::startsWith)) { 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. DO NOT report this to Paper or Leaf! Please contact plugin's support to adapt this change.", // Leaf - Better warning message for discouraging Maven Central as CDN new RuntimeException("Plugin used Maven Central for library resolution (%s)".formatted(remoteRepository.toString())) ); }