From 6335af840bfac3401b8e73a728d6191826a154db Mon Sep 17 00:00:00 2001 From: DerFrZocker Date: Sat, 27 Apr 2024 09:25:29 +1000 Subject: [PATCH] SPIGOT-7638: Library loader does not seem to resolve every dependency --- .../main/java/net/md_5/bungee/api/plugin/LibraryLoader.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/src/main/java/net/md_5/bungee/api/plugin/LibraryLoader.java b/api/src/main/java/net/md_5/bungee/api/plugin/LibraryLoader.java index 55e166c8f..ebfaf63c7 100644 --- a/api/src/main/java/net/md_5/bungee/api/plugin/LibraryLoader.java +++ b/api/src/main/java/net/md_5/bungee/api/plugin/LibraryLoader.java @@ -61,6 +61,11 @@ class LibraryLoader logger.log( Level.INFO, "Downloading {0}", event.getResource().getRepositoryUrl() + event.getResource().getResourceName() ); } } ); + + // SPIGOT-7638: Add system properties, + // since JdkVersionProfileActivator needs 'java.version' when a profile has the 'jdk' element + // otherwise it will silently fail and not resolves the dependencies in the affected pom. + session.setSystemProperties( System.getProperties() ); session.setReadOnly(); this.repositories = repository.newResolutionRepositories( session, Arrays.asList( new RemoteRepository.Builder( "central", "default", "https://repo.maven.apache.org/maven2" ).build() ) );