Skip to content

Commit 1e9e367

Browse files
committed
. e Fix Java 8 compatibility for maven builds and GitHub actions
- Skip install for test-only module approvaltests-util-tests - Generate Maven 3.8.8 wrapper in GitHub action for Java 8 compatibility - Use wrapper instead of system Maven to avoid plugin version conflicts
1 parent e148a6f commit 1e9e367

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

.github/workflows/test-jdk-8.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@ jobs:
2525
- name: Turn off formatting
2626
run: |
2727
./set_formatting_off.sh
28+
- name: Setup Maven Wrapper for Java 8 compatibility
29+
run: |
30+
mvn wrapper:wrapper -Dmaven=3.8.8
2831
- name: Build with Maven
2932
run: |
30-
mvn -B install --file pom.xml
33+
./mvnw -B install --file pom.xml
3134
- name: Set up JDK8
3235
uses: actions/setup-java@v4
3336
with:
@@ -39,10 +42,13 @@ jobs:
3942
- name: Use local build
4043
run: |
4144
sed -i '/<artifactId>approvaltests<\/artifactId>/{N;s/<version>.*<\/version>/<version>100.0.0-SNAPSHOT<\/version>/}' pom.xml
45+
- name: Setup Maven Wrapper for StarterProject
46+
run: |
47+
mvn wrapper:wrapper -Dmaven=3.8.8
4248
- name: Run in JDK8
4349
run: |
4450
java -version
45-
mvn verify
51+
./mvnw verify
4652
- name: Publish Test Report
4753
uses: mikepenz/action-junit-report@v5
4854
if: always()

approvaltests-util-tests/pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,14 @@
9292
<skipIfEmpty>true</skipIfEmpty>
9393
</configuration>
9494
</plugin>
95+
<plugin>
96+
<groupId>org.apache.maven.plugins</groupId>
97+
<artifactId>maven-install-plugin</artifactId>
98+
<version>2.5.2</version>
99+
<configuration>
100+
<skip>true</skip>
101+
</configuration>
102+
</plugin>
95103
</plugins>
96104
</build>
97105

0 commit comments

Comments
 (0)