mirror of https://github.com/apache/maven.git
2d34e67eed
Push MavenExecutionRequestPopulator down to only operate in the MavenCli. Two of the three methods were already called from MavenCli so now all of them are. In the process I deleted a bunch of code and pursue my quest to remove Settings from the core in order to make a general configuration mechanism that can be plugged into the core via the MavenCli. Also removed the requirement of the LegacyRepositorySystem in the DefaultMavenExecutionRequestPopulator which breaks another tie with the legacy code. I took the bits that were needed and a lot of the code, after tracing through it, is redundant so it has been deleted. Turning off: injectMirror( request, request.getRemoteRepositories(), request.getMirrors() ); injectMirror( request, request.getPluginArtifactRepositories(), request.getMirrors() ); in DefaultMavenExecutionRequestPopulator Results : Failed tests: MavenITmng4190MirrorRepoMergingTest>AbstractMavenIntegrationTestCase.runTest:220->testit:76 null expected:<[1]> but was:<[4]> Tests in error: MavenITmng4991NonProxyHostsTest>AbstractMavenIntegrationTestCase.runTest:220->testit:89 » Verification MavenITmng4963ParentResolutionFromMirrorTest>AbstractMavenIntegrationTestCase.runTest:220->testit:58 » Verification There is mirror evaluation code in DefaultMaven:newRepositorySession( MavenExecutionRequest request ) which appears to duplicate this logic but not quite enough for the ITs to pass. --- Turning off: injectProxy( request.getRemoteRepositories(), request.getProxies() ); injectProxy( request.getPluginArtifactRepositories(), request.getProxies() ); in DefaultMavenExecutionRequestPopulator Result: The ITs pass So the code is not needed so it has been deleted. --- Turning off: injectProxy( request.getRemoteRepositories(), request.getProxies() ); injectProxy( request.getPluginArtifactRepositories(), request.getProxies() ); injectAuthentication( request.getRemoteRepositories(), request.getServers() ); injectAuthentication( request.getPluginArtifactRepositories(), request.getServers() ); in DefaultMavenExecutionRequestPopulator Result: The ITs pass The code in DefaultMaven:newRepositorySession( MavenExecutionRequest request ) appears to populate proxies and authentication correctly. The injectAuthentication code has been deleted. --- This is also perfunctory in DefaultMavenExecutionRequestPopulator after tracing through it: request.setRemoteRepositories( getEffectiveRepositories( request, request.getRemoteRepositories() ) ); request.setPluginArtifactRepositories( getEffectiveRepositories( request, request.getPluginArtifactRepositories() ) ); |
||
---|---|---|
.. | ||
src | ||
pom.xml |