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 2023/01/16 14:59:35 UTC

[maven] 01/01: Execute IT tests with clean local repository

This is an automated email from the ASF dual-hosted git repository.

sjaranowski pushed a commit to branch clean-local-repo
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 73ccfd5f084ab6dbea990330817374c882c5bfd9
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Mon Jan 16 15:55:50 2023 +0100

    Execute IT tests with clean local repository
---
 .github/workflows/maven.yml | 13 ++-----------
 Jenkinsfile                 |  2 +-
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index ca2127fd1..ce78f7b5a 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -106,15 +106,6 @@ jobs:
           ref: ${{ env.REPO_BRANCH }}
           persist-credentials: false
 
-
-      - name: Set up cache for ~/.m2/repository
-        uses: actions/cache@v3
-        with:
-          path: ~/.m2/repository
-          key: it-m2-repo-${{ matrix.os }}-${{ hashFiles('maven-integration-testing/**/pom.xml') }}
-          restore-keys: |
-            it-m2-repo-${{ matrix.os }}-
-
       - name: Download built Maven
         uses: actions/download-artifact@v3
         with:
@@ -126,8 +117,8 @@ jobs:
         with:
           java-version: ${{ matrix.java }}
           distribution: 'temurin'
-          cache: 'maven'
+#          cache: 'maven' - don't use cache for integration tests
 
       - name: Running integration tests
         shell: bash
-        run: mvn install -e -B -V -Prun-its,embedded -Dmaven.repo.local="$HOME/.m2/repository" -DmavenDistro="$GITHUB_WORKSPACE/built-maven/apache-maven-bin.zip" -f maven-integration-testing/pom.xml
+        run: mvn install -e -B -V -Prun-its,embedded -DmavenDistro="$GITHUB_WORKSPACE/built-maven/apache-maven-bin.zip" -f maven-integration-testing/pom.xml
diff --git a/Jenkinsfile b/Jenkinsfile
index a57cd876a..a2ecf0f1d 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -101,7 +101,7 @@ for (String os in runITsOses) {
                             withEnv(["JAVA_HOME=${ tool "$jdkName" }",
                                         "PATH+MAVEN=${ tool "$jdkName" }/bin:${tool "$mvnName"}/bin",
                                         "MAVEN_OPTS=-Xms2g -Xmx4g -Djava.awt.headless=true"]) {                                               
-                                String cmd = "${runITscommand} -DmavenDistro=$WORK_DIR/dists/apache-maven-bin.zip -Dmaven.test.failure.ignore"
+                                String cmd = "${runITscommand} -Dmaven.repo.local=$WORK_DIR/it-local-repo -DmavenDistro=$WORK_DIR/dists/apache-maven-bin.zip -Dmaven.test.failure.ignore"
 
                                 if (isUnix()) {
                                     sh 'df -hT'