You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sj...@apache.org on 2025/07/13 13:43:24 UTC
(maven) branch master updated: Use local repository as tail in MavenExecutorTest
This is an automated email from the ASF dual-hosted git repository.
sjaranowski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven.git
The following commit(s) were added to refs/heads/master by this push:
new 0a289125da Use local repository as tail in MavenExecutorTest
0a289125da is described below
commit 0a289125da08b0c2313e9f07ca96b3755a7f6bbd
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Fri Jul 11 00:05:04 2025 +0200
Use local repository as tail in MavenExecutorTest
---
.../apache/maven/cling/executor/MavenExecutorTestSupport.java | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/impl/maven-executor/src/test/java/org/apache/maven/cling/executor/MavenExecutorTestSupport.java b/impl/maven-executor/src/test/java/org/apache/maven/cling/executor/MavenExecutorTestSupport.java
index bbfbbcb402..79bace4a9f 100644
--- a/impl/maven-executor/src/test/java/org/apache/maven/cling/executor/MavenExecutorTestSupport.java
+++ b/impl/maven-executor/src/test/java/org/apache/maven/cling/executor/MavenExecutorTestSupport.java
@@ -329,11 +329,18 @@ protected String mavenVersion(ExecutorRequest request) throws Exception {
}
public static ExecutorRequest.Builder mvn3ExecutorRequestBuilder() {
- return ExecutorRequest.mavenBuilder(Paths.get(System.getProperty("maven3home")));
+ return addTailRepo(ExecutorRequest.mavenBuilder(Paths.get(System.getProperty("maven3home"))));
}
public static ExecutorRequest.Builder mvn4ExecutorRequestBuilder() {
- return ExecutorRequest.mavenBuilder(Paths.get(System.getProperty("maven4home")));
+ return addTailRepo(ExecutorRequest.mavenBuilder(Paths.get(System.getProperty("maven4home"))));
+ }
+
+ private static ExecutorRequest.Builder addTailRepo(ExecutorRequest.Builder builder) {
+ if (System.getProperty("localRepository") != null) {
+ builder.argument("-Dmaven.repo.local.tail=" + System.getProperty("localRepository"));
+ }
+ return builder;
}
protected void layDownFiles(Path cwd) throws IOException {