Skip to content

Commit 5670f5f

Browse files
committed
Use Maven 4.0.0-beta-4 to build, use split repo, cache only the remote repo
1 parent 519af9d commit 5670f5f

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.github/workflows/maven.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@ jobs:
5151

5252
- uses: actions/cache@v4
5353
with:
54-
path: ~/.m2/repository
55-
key: ${{ runner.os }}-maven-${{ github.sha }}
54+
path: ~/.m2/repository/cached
55+
key: maven-${{ hashFiles('**/pom.xml') }}
56+
restore-keys: maven-
5657

5758
- name: Set up Maven
5859
run:
59-
mvn --errors --batch-mode --show-version org.apache.maven.plugins:maven-wrapper-plugin:3.3.2:wrapper "-Dmaven=3.9.7"
60+
mvn --errors --batch-mode --show-version org.apache.maven.plugins:maven-wrapper-plugin:3.3.2:wrapper "-Dmaven=4.0.0-beta-4"
6061

6162
- name: Build with Maven
6263
run: ./mvnw verify -e -B -V -DdistributionFileName=apache-maven
@@ -132,7 +133,13 @@ jobs:
132133

133134
- name: Set up Maven
134135
run:
135-
mvn --errors --batch-mode --show-version org.apache.maven.plugins:maven-wrapper-plugin:3.3.2:wrapper "-Dmaven=3.9.7"
136+
mvn --errors --batch-mode --show-version org.apache.maven.plugins:maven-wrapper-plugin:3.3.2:wrapper "-Dmaven=4.0.0-beta-4"
137+
138+
- uses: actions/cache@v4
139+
with:
140+
path: ~/.m2/repository/cached
141+
key: maven-${{ hashFiles('**/pom.xml') }}
142+
restore-keys: maven-
136143

137144
- name: Build Maven
138145
run: ./mvnw install -e -B -V -DdistributionFileName=apache-maven -DskipTests -f maven/pom.xml

.mvn/maven.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
aether.lrm.enhanced.split = true

0 commit comments

Comments
 (0)