SPIGOT-7638: Library loader does not seem to resolve every dependency

This commit is contained in:
DerFrZocker 2024-04-27 09:25:29 +10:00 committed by md_5
parent 336333acb1
commit 6335af840b
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -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() ) );