Skip to content

Commit 5054f25

Browse files
committed
fix: correctly set Java version in maven and CI
1 parent eb59da2 commit 5054f25

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
java-version: ${{ matrix.java }}
5050
distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
5151
- name: Build
52-
run: mvn -B -e -Papache-release -Dgpg.skip=true verify
52+
run: mvn -B -e -Papache-release -Dgpg.skip=true -Dmaven.compiler.release=${{ matrix.java }} verify
5353
- name: Remove Snapshots
5454
run: find ~/.m2/repository -name '*-SNAPSHOT' -a -type d -print0 | xargs -0 rm -rf
5555
site:
@@ -72,7 +72,7 @@ jobs:
7272
java-version: ${{ env.BASE_JAVA_VERSION }}
7373
distribution: ${{ env.DEFAULT_JAVA_DISTRIBUTION }}
7474
- name: Build
75-
run: mvn -B -e -Dmaven.test.skip=true package site-deploy
75+
run: mvn -B -e -Dmaven.test.skip=true -Dmaven.compiler.release=${{ env.BASE_JAVA_VERSION }} package site-deploy
7676
- name: Remove Snapshots
7777
run: find ~/.m2/repository -name '*-SNAPSHOT' -a -type d -print0 | xargs -0 rm -rf
7878
deploy:
@@ -102,7 +102,7 @@ jobs:
102102
server-username: NEXUS_USER
103103
server-password: NEXUS_PW
104104
- name: Deploy
105-
run: mvn -B -e -Papache-release -Dgpg.skip=true -Dmaven.test.skip=true deploy
105+
run: mvn -B -e -Papache-release -Dgpg.skip=true -Dmaven.test.skip=true -Dmaven.compiler.release=${{ env.BASE_JAVA_VERSION }} deploy
106106
env:
107107
NEXUS_USER: ${{ secrets.NEXUS_USER }}
108108
NEXUS_PW: ${{ secrets.NEXUS_PW }}

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@
507507
http://maven.apache.org/plugins/maven-site-plugin/examples/creating-content.html -->
508508
<axis2_version>${project.version}</axis2_version>
509509
<project.build.outputTimestamp>2025-03-04T22:45:29Z</project.build.outputTimestamp>
510-
<maven.compiler.target>11</maven.compiler.target>
510+
<maven.compiler.release>17</maven.compiler.release>
511511
</properties>
512512

513513
<dependencyManagement>

0 commit comments

Comments
 (0)