Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 11 additions & 18 deletions apache-maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,10 @@ under the License.
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http</artifactId>
<classifier>shaded</classifier>
<exclusions>
<exclusion>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http-shared</artifactId>
Copy link
Copy Markdown
Member

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.

</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-file</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand All @@ -86,12 +75,16 @@ under the License.
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-file</artifactId>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-connector-basic</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-connector-basic</artifactId>
<artifactId>maven-resolver-transport-file</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-transport-http</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,22 @@
@Named
public class DefaultRepositorySystemSessionFactory
{
private static final String MAVEN_TRANSPORT_KEY = "maven.transport";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must be: MAVEN_RESOLVER_TRANSPORT = maven.resolver.transport


private static final String MAVEN_TRANSPORT_WAGON = "wagon";

private static final String MAVEN_TRANSPORT_RESOLVER = "resolver";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should have been: internal or similar since Resolver decides what is used internally.


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;
Expand Down Expand Up @@ -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 ) ) );
Expand Down
6 changes: 3 additions & 3 deletions maven-resolver-provider/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ under the License.
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-transport-wagon</artifactId>
<artifactId>maven-resolver-transport-file</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-file</artifactId>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-transport-http</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
13 changes: 11 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The 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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down