Skip to content

Commit

Permalink
Merge pull request gradle#26849 Implement MavenResolveTestFixture
Browse files Browse the repository at this point in the history
This test fixture leverages Maven's public APIs for performing dependency resolution with its artifact repository engine. We skip running Maven entirely since that requires downloading a Maven distribution, which itself downloads plugins upon startup. This approach is more flexible for future expansion since it offers the ability to traverse the resolved graph itself, in-process This approach is much faster than running maven in a forked process or running MavenCli embedded.

Fixes gradle#26826

### Reviewing cheatsheet

Before merging the PR, comments starting with
- ❌ ❓**must** be fixed
- 🤔 💅 **should** be fixed
- 💭 **may** be fixed
- 🎉 celebrate happy things

Co-authored-by: Justin Van Dort <[email protected]>
  • Loading branch information
bot-gradle and jvandort committed Oct 26, 2023
2 parents ad0cc4e + f12fbc8 commit 972c3e5
Show file tree
Hide file tree
Showing 9 changed files with 526 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,16 @@ abstract class ExternalModulesExtension(isBundleGroovy4: Boolean) {
val log4jToSlf4j = "org.slf4j:log4j-over-slf4j"
val maven3BuilderSupport = "org.apache.maven:maven-builder-support"
val maven3Model = "org.apache.maven:maven-model"
val maven3ResolverProvider = "org.apache.maven:maven-resolver-provider"
val maven3RepositoryMetadata = "org.apache.maven:maven-repository-metadata"
val maven3Settings = "org.apache.maven:maven-settings"
val maven3SettingsBuilder = "org.apache.maven:maven-settings-builder"
val mavenResolverApi = "org.apache.maven.resolver:maven-resolver-api"
val mavenResolverConnectorBasic = "org.apache.maven.resolver:maven-resolver-connector-basic"
val mavenResolverImpl = "org.apache.maven.resolver:maven-resolver-impl"
val mavenResolverSupplier = "org.apache.maven.resolver:maven-resolver-supplier"
val mavenResolverTransportFile = "org.apache.maven.resolver:maven-resolver-transport-file"
val mavenResolverTransportHttp = "org.apache.maven.resolver:maven-resolver-transport-http"
val minlog = "com.esotericsoftware.minlog:minlog"
val nativePlatform = "net.rubygrapefruit:native-platform"
val nativePlatformFileEvents = "net.rubygrapefruit:file-events"
Expand Down Expand Up @@ -253,9 +260,16 @@ abstract class ExternalModulesExtension(isBundleGroovy4: Boolean) {
log4jToSlf4j to License.MIT,
maven3BuilderSupport to License.Apache2,
maven3Model to License.Apache2,
maven3ResolverProvider to License.Apache2,
maven3RepositoryMetadata to License.Apache2,
maven3Settings to License.Apache2,
maven3SettingsBuilder to License.Apache2,
mavenResolverApi to License.Apache2,
mavenResolverConnectorBasic to License.Apache2,
mavenResolverImpl to License.Apache2,
mavenResolverSupplier to License.Apache2,
mavenResolverTransportFile to License.Apache2,
mavenResolverTransportHttp to License.Apache2,
minlog to License.BSD3,
nativePlatform to License.Apache2,
nativePlatformFileEvents to License.Apache2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
import java.util.TreeSet;

public class PomProjectInitDescriptor implements BuildConverter {
private final static String MAVEN_VERSION = "3.9.3";
private final static String MAVEN_VERSION = "3.9.5";
private final static String MAVEN_WAGON_VERSION = "3.5.3";
private final static String MAVEN_RESOLVER_VERSION = "1.9.13";
private final static String MAVEN_RESOLVER_VERSION = "1.9.16";

private final MavenSettingsProvider settingsProvider;
private final DocumentationRegistry documentationRegistry;
Expand Down
Loading

0 comments on commit 972c3e5

Please sign in to comment.