Skip to content

Commit 2bfa3a8

Browse files
authored
[MNG-8061] Maven: Require Java 17 (#1430)
1 parent 5029cc2 commit 2bfa3a8

File tree

6 files changed

+15
-12
lines changed

6 files changed

+15
-12
lines changed

.github/workflows/maven.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242

4343
- uses: actions/setup-java@v4
4444
with:
45-
java-version: 11
45+
java-version: 17
4646
distribution: 'temurin'
4747
cache: 'maven'
4848

@@ -61,7 +61,7 @@ jobs:
6161
strategy:
6262
matrix:
6363
os: [ubuntu-latest, windows-latest, macOS-latest]
64-
java: [11, 17, 21]
64+
java: [17, 21]
6565

6666
fail-fast: false
6767
runs-on: ${{ matrix.os }}
@@ -130,4 +130,4 @@ jobs:
130130
if: failure() && matrix.os != 'windows-latest'
131131
with:
132132
name: ${{ github.run_number }}-integration-test-artifact-${{ matrix.os }}-${{ matrix.java }}
133-
path: ./maven-integration-testing/core-it-suite/target/test-classes/
133+
path: ./maven-integration-testing/core-it-suite/target/test-classes/

.github/workflows/maven_build_itself.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
strategy:
3232
matrix:
3333
os: [ubuntu-latest, windows-latest]
34-
java: [11, 17, 21]
34+
java: [17, 21]
3535
fail-fast: false
3636

3737
runs-on: ${{ matrix.os }}

Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
properties([buildDiscarder(logRotator(artifactNumToKeepStr: '5', numToKeepStr: env.BRANCH_NAME=='master'?'5':'1'))])
2121

2222
def buildOs = 'linux'
23-
def buildJdk = '11'
23+
def buildJdk = '17'
2424
def buildMvn = '3.8.x'
2525
def runITsOses = ['linux']
26-
def runITsJdks = ['11', '17', '21']
26+
def runITsJdks = ['17', '21']
2727
def runITsMvn = '3.8.x'
2828
def runITscommand = "mvn clean install -Prun-its,embedded -B -U -V" // -DmavenDistro=... -Dmaven.test.failure.ignore=true
2929
def tests

Jenkinsfile.s390x

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
properties([buildDiscarder(logRotator(artifactNumToKeepStr: '5', numToKeepStr: env.BRANCH_NAME=='master'?'5':'1'))])
2121

2222
def buildOs = 'linux'
23-
def buildJdk = '11'
23+
def buildJdk = '17'
2424
def buildMvn = '3.8.x'
2525
def runITsOses = ['linux']
26-
def runITsJdks = ['11', '17']
26+
def runITsJdks = ['17']
2727
def runITsMvn = '3.8.x'
2828
def runITscommand = "mvn clean install -Prun-its,embedded -B -U -V" // -DmavenDistro=... -Dmaven.test.failure.ignore=true
2929
def tests

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Do you like Apache Maven? Then [donate back to the ASF](https://www.apache.org/f
6565
Quick Build
6666
-------
6767
If you want to bootstrap Maven, you'll need:
68-
- Java 11+
68+
- Java 17+
6969
- Maven 3.6.3 or later
7070
- Run Maven, specifying a location into which the completed Maven distro should be installed:
7171
```

pom.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,10 @@ under the License.
147147
</distributionManagement>
148148

149149
<properties>
150-
<javaVersion>8</javaVersion>
150+
<javaVersion>17</javaVersion>
151+
<maven.compiler.source>${javaVersion}</maven.compiler.source>
152+
<maven.compiler.target>${javaVersion}</maven.compiler.target>
153+
<maven.compiler.release>${javaVersion}</maven.compiler.release>
151154
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
152155
<maven.baseline>3.8.8</maven.baseline>
153156
<!-- Control the name of the distribution and information output by mvn -->
@@ -816,10 +819,10 @@ under the License.
816819
<configuration>
817820
<rules>
818821
<requireJavaVersion>
819-
<version>[11,)</version>
822+
<version>[17,)</version>
820823
</requireJavaVersion>
821824
<enforceBytecodeVersion>
822-
<maxJdkVersion>${maven.compiler.target}</maxJdkVersion>
825+
<maxJdkVersion>${maven.compiler.release}</maxJdkVersion>
823826
<ignoredScopes>
824827
<ignoredScope>test</ignoredScope>
825828
</ignoredScopes>

0 commit comments

Comments
 (0)