You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2026/09/29 18:36:52 UTC
(maven-integration-testing) branch maven-3.10.x updated: Use a per-workspace local repository in Jenkins builds
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch maven-3.10.x
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git
The following commit(s) were added to refs/heads/maven-3.10.x by this push:
new d0b1c1a59 Use a per-workspace local repository in Jenkins builds
d0b1c1a59 is described below
commit d0b1c1a595b6296a957ca420a575478d72e814e1
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Tue Sep 29 17:28:57 2026 +0200
Use a per-workspace local repository in Jenkins builds
The two ubuntu stages can land on the same agent and share ~/.m2; their concurrent MNG-4745 runs then overwrite each other's cached plugin metadata.
---
Jenkinsfile | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index b63c1733c..b35479b16 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -49,10 +49,12 @@ def mavenBuild(jdk, mvnName) {
script {
try {
withMaven(jdk: "$jdk", maven: "$mvnName", publisherStrategy: 'EXPLICIT', mavenOpts: "-Xms2g -Xmx4g -Djava.awt.headless=true") {
+ // parallel stages can share an agent; a shared ~/.m2 lets their ITs race on the same artifacts
+ String localRepo = "${env.WORKSPACE}/.repository"
if (isUnix()) {
- sh "mvn -V clean install -Prun-its,embedded -B"
+ sh "mvn -V clean install -Prun-its,embedded -B -Dmaven.repo.local=${localRepo}"
} else {
- bat "mvn -V clean install -Prun-its,embedded -B"
+ bat "mvn -V clean install -Prun-its,embedded -B -Dmaven.repo.local=${localRepo}"
}
}
}