From 04e18e049beb6dd0bd3abe149eca463fc5f625d5 Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Fri, 11 Oct 2024 22:24:32 +0200 Subject: [PATCH 1/2] Use same repository that maven, allow access to central --- .mvn/maven.properties | 1 + core-it-suite/src/test/resources-filtered/settings.xml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 .mvn/maven.properties diff --git a/.mvn/maven.properties b/.mvn/maven.properties new file mode 100644 index 000000000..53f3c8b9f --- /dev/null +++ b/.mvn/maven.properties @@ -0,0 +1 @@ +aether.lrm.enhanced.split = true diff --git a/core-it-suite/src/test/resources-filtered/settings.xml b/core-it-suite/src/test/resources-filtered/settings.xml index 4a456c250..b3509a83a 100644 --- a/core-it-suite/src/test/resources-filtered/settings.xml +++ b/core-it-suite/src/test/resources-filtered/settings.xml @@ -33,7 +33,7 @@ own test repos or can employ the local repository (after bootstrapping). This co central Apache Maven Integration Testing Repository - file:target/null + https://repo.maven.apache.org/maven2 true @@ -46,7 +46,7 @@ own test repos or can employ the local repository (after bootstrapping). This co central Apache Maven Integration Testing Repository - file:target/null + https://repo.maven.apache.org/maven2 true From f8629caf8f2ebe0516eae5cc25c3c42e49528fdf Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Sat, 12 Oct 2024 02:39:35 +0200 Subject: [PATCH 2/2] Use split repo + reuse local repo for tests --- .mvn/maven.properties | 1 + .../org/apache/maven/it/AbstractMavenIntegrationTestCase.java | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.mvn/maven.properties b/.mvn/maven.properties index 53f3c8b9f..09c6abdff 100644 --- a/.mvn/maven.properties +++ b/.mvn/maven.properties @@ -1 +1,2 @@ aether.lrm.enhanced.split = true +maven.repo.local = ${maven.user.conf}/repo-split diff --git a/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java b/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java index f91e35aee..5c0eee68f 100644 --- a/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java +++ b/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java @@ -254,6 +254,10 @@ protected Verifier newVerifier(String basedir, boolean debug) throws Verificatio protected Verifier newVerifier(String basedir, String settings, boolean debug) throws VerificationException { Verifier verifier = new Verifier(basedir, debug); + verifier.getVerifierProperties().setProperty("use.mavenRepoLocal", Boolean.FALSE.toString()); + verifier.setLocalRepo(System.getProperty("maven.repo.local")); + verifier.addCliArgument("-Dmaven.repo.local=" + verifier.getLocalRepository()); + verifier.addCliArgument("-Daether.lrm.enhanced.split=true"); verifier.setAutoclean(false);