Commits
DerFrZocker authored and md_5 committed e8215ea2000
58 58 | session.setChecksumPolicy( RepositoryPolicy.CHECKSUM_POLICY_FAIL ); |
59 59 | session.setLocalRepositoryManager( repository.newLocalRepositoryManager( session, new LocalRepository( "libraries" ) ) ); |
60 60 | session.setTransferListener( new AbstractTransferListener() |
61 61 | { |
62 62 | |
63 63 | public void transferStarted( TransferEvent event) throws TransferCancelledException |
64 64 | { |
65 65 | logger.log( Level.INFO, "Downloading {0}", event.getResource().getRepositoryUrl() + event.getResource().getResourceName() ); |
66 66 | } |
67 67 | } ); |
68 + | |
69 + | // SPIGOT-7638: Add system properties, |
70 + | // since JdkVersionProfileActivator needs 'java.version' when a profile has the 'jdk' element |
71 + | // otherwise it will silently fail and not resolves the dependencies in the affected pom. |
72 + | session.setSystemProperties( System.getProperties() ); |
68 73 | session.setReadOnly(); |
69 74 | |
70 75 | this.repositories = repository.newResolutionRepositories( session, Arrays.asList( new RemoteRepository.Builder( "central", "default", "https://repo.maven.apache.org/maven2" ).build() ) ); |
71 76 | } |
72 77 | |
73 78 | |
74 79 | public ClassLoader createLoader( PluginDescriptionFile desc) |
75 80 | { |
76 81 | if ( desc.getLibraries().isEmpty() ) |
77 82 | { |