-
Notifications
You must be signed in to change notification settings - Fork 2.9k
[MNG-7454] Include resolver-transport-http in Maven master #711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -78,6 +78,22 @@ | |
| @Named | ||
| public class DefaultRepositorySystemSessionFactory | ||
| { | ||
| private static final String MAVEN_TRANSPORT_KEY = "maven.transport"; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Must be: |
||
|
|
||
| private static final String MAVEN_TRANSPORT_WAGON = "wagon"; | ||
|
|
||
| private static final String MAVEN_TRANSPORT_RESOLVER = "resolver"; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should have been: |
||
|
|
||
| private static final String MAVEN_TRANSPORT_AUTO = "auto"; | ||
|
|
||
| private static final String WAGON_TRANSPORTER_KEY_PRIORITY_KEY = "aether.priority.WagonTransporterFactory"; | ||
|
|
||
| private static final String RESOLVER_HTTP_TRANSPORTER_PRIORITY_KEY = "aether.priority.HttpTransporterFactory"; | ||
|
|
||
| private static final String RESOLVER_FILE_TRANSPORTER_PRIORITY_KEY = "aether.priority.FileTransporterFactory"; | ||
|
|
||
| private static final String RESOLVER_MAX_PRIORITY = String.valueOf( Float.MAX_VALUE ); | ||
|
|
||
| private final Logger logger = LoggerFactory.getLogger( getClass() ); | ||
|
|
||
| private final ArtifactHandlerManager artifactHandlerManager; | ||
|
|
@@ -245,6 +261,25 @@ else if ( request.isUpdateSnapshots() ) | |
| } | ||
| session.setAuthenticationSelector( authSelector ); | ||
|
|
||
| String transport = request.getUserProperties().getProperty( MAVEN_TRANSPORT_KEY, MAVEN_TRANSPORT_WAGON ); | ||
| if ( MAVEN_TRANSPORT_RESOLVER.equals( transport ) ) | ||
| { | ||
| // Make sure (whatever extra priority is set) that resolver native is selected | ||
| configProps.put( RESOLVER_FILE_TRANSPORTER_PRIORITY_KEY, RESOLVER_MAX_PRIORITY ); | ||
| configProps.put( RESOLVER_HTTP_TRANSPORTER_PRIORITY_KEY, RESOLVER_MAX_PRIORITY ); | ||
| } | ||
| else if ( MAVEN_TRANSPORT_WAGON.equals( transport ) ) | ||
| { | ||
| // Make sure (whatever extra priority is set) that wagon is selected | ||
| configProps.put( WAGON_TRANSPORTER_KEY_PRIORITY_KEY, RESOLVER_MAX_PRIORITY ); | ||
| } | ||
| else if ( !MAVEN_TRANSPORT_AUTO.equals( transport ) ) | ||
| { | ||
| throw new IllegalArgumentException( "Unknown maven.transport=" + transport | ||
| + ". Supported ones are: " + MAVEN_TRANSPORT_WAGON + ", " | ||
| + MAVEN_TRANSPORT_RESOLVER + " and " + MAVEN_TRANSPORT_AUTO ); | ||
| } | ||
|
|
||
| session.setTransferListener( request.getTransferListener() ); | ||
|
|
||
| session.setRepositoryListener( eventSpyDispatcher.chainListener( new LoggingRepositoryListener( logger ) ) ); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,7 +65,7 @@ under the License. | |
| <cipherVersion>2.0</cipherVersion> | ||
| <modelloVersion>2.0.0</modelloVersion> | ||
| <jxpathVersion>1.3</jxpathVersion> | ||
| <resolverVersion>1.7.2</resolverVersion> | ||
| <resolverVersion>1.7.3</resolverVersion> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is basically irrelevant since we are going to 1.8.0 anyway |
||
| <slf4jVersion>1.7.32</slf4jVersion> | ||
| <xmlunitVersion>2.6.4</xmlunitVersion> | ||
| <maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile> | ||
|
|
@@ -340,7 +340,6 @@ under the License. | |
| <groupId>org.apache.maven.wagon</groupId> | ||
| <artifactId>wagon-http</artifactId> | ||
| <version>${wagonVersion}</version> | ||
| <classifier>shaded</classifier> | ||
| </dependency> | ||
| <!-- Repository --> | ||
| <dependency> | ||
|
|
@@ -368,6 +367,16 @@ under the License. | |
| <artifactId>maven-resolver-connector-basic</artifactId> | ||
| <version>${resolverVersion}</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.maven.resolver</groupId> | ||
| <artifactId>maven-resolver-transport-file</artifactId> | ||
| <version>${resolverVersion}</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.maven.resolver</groupId> | ||
| <artifactId>maven-resolver-transport-http</artifactId> | ||
| <version>${resolverVersion}</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.maven.resolver</groupId> | ||
| <artifactId>maven-resolver-transport-wagon</artifactId> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create a followup ticket for WAGON to drop the shaded artifact.