Skip to content

Commit

Permalink
Fixes piranhacloud#3540 - Update to Java 21
Browse files Browse the repository at this point in the history
  • Loading branch information
Automated workflow committed Oct 14, 2023
1 parent a21b0e0 commit 58cfd24
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 62 deletions.
66 changes: 10 additions & 56 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,16 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [ '17', '20' ]
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout Sources
uses: actions/checkout@v3
- name: Setup Java
- name: Setup Java 21
uses: actions/setup-java@v3
with:
cache: 'maven'
distribution: 'temurin'
java-version: ${{ matrix.java }}
java-version: 21
- name: Build with Maven
run: mvn --no-transfer-progress -B install
- name: Publish Unit Test Results
Expand All @@ -46,12 +45,12 @@ jobs:
uses: github/codeql-action/init@v2
with:
languages: 'java'
- name: Setup Java
- name: Setup Java 21
uses: actions/setup-java@v3
with:
cache: 'maven'
distribution: 'temurin'
java-version: '17'
java-version: '21'
- name: Build with Maven
run: mvn -B -DskipTests=true -DskipITs=true --ntp install
- name: Perform CodeQL Analysis
Expand All @@ -62,12 +61,12 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Set up Java
- name: Set up Java 21
uses: actions/setup-java@v3
with:
cache: 'maven'
distribution: 'temurin'
java-version: 17
java-version: 21
- name: Build with Maven
run: mvn -B -Dmaven.javadoc.skip=true -DskipTests=true -DskipITs=true -ntp -P '!test' verify
- name: Login to GHCR
Expand Down Expand Up @@ -123,63 +122,18 @@ jobs:
mvn -B -Dmaven.javadoc.skip=true -DskipTests=true -DskipITs=true -ntp -P '!test' install
cd dist/webprofile
mvn -B -DskipTests=true -DskipITs=true -ntp -P docker deploy
early-access:
if: github.repository == 'piranhacloud/piranha'
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
fail-fast: false
matrix:
java: [ 'EA' ]
os: [ubuntu-latest]
steps:
- name: Checkout Sources
uses: actions/checkout@v3
- name: Setup Java ${{ matrix.java }}
uses: oracle-actions/setup-java@v1
with:
website: jdk.java.net
release: ${{ matrix.java }}
- name: Build with Maven
run: mvn -B --ntp install -Djacoco.skip=true
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
if: always()
with:
files: '**/target/surefire-reports/*.xml'
sonarcloud:
if: github.repository == 'piranhacloud/piranha' && github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
fetch-depth: 10
- name: Set up Java
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 17
- name: Analyze with SonarCloud
run: |
mvn -B -ntp install verify site \
sonar:sonar -Dsonar.projectKey=piranhacloud_piranha \
-Dsonar.organization=piranhacloud -Dsonar.host.url=https://sonarcloud.io
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
sonatype:
if: github.repository == 'piranhacloud/piranha' && github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Set up Java
- name: Set up Java 21
uses: actions/setup-java@v3
with:
cache: 'maven'
distribution: 'temurin'
java-version: 20
java-version: 21
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
Expand All @@ -201,12 +155,12 @@ jobs:
token: ${{ secrets.GIT_PASSWORD }}
path: piranha-website
ref: 'gh-pages'
- name: Set up Java
- name: Set up Java 21
uses: actions/setup-java@v3
with:
cache: 'maven'
distribution: 'temurin'
java-version: 20
java-version: 21
- name: Build with Maven
run: |
mvn -B -DskipTests -DskipITs -ntp install
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Set up Java
- name: Set up Java 21
uses: actions/setup-java@v3
with:
cache: 'maven'
distribution: 'temurin'
java-version: 20
java-version: 21
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tck-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [ '17' ]
java: [ '21' ]
os: [ubuntu-latest]
steps:
- name: Checkout Sources
Expand All @@ -32,7 +32,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [ '17' ]
java: [ '21' ]
os: [ubuntu-latest]
steps:
- name: Checkout sources
Expand All @@ -55,7 +55,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [ '17' ]
java: [ '21' ]
os: [ubuntu-latest]
steps:
- name: Checkout sources
Expand Down
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
<tidy-maven-plugin.version>1.2.0</tidy-maven-plugin.version>
<versions-maven-plugin.version>2.16.0</versions-maven-plugin.version>
<!-- other -->
<java.version>21</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand Down Expand Up @@ -852,7 +853,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<inherited>true</inherited>
<configuration>
<release>17</release>
<release>${java.version}</release>
</configuration>
</plugin>
<plugin>
Expand Down

0 comments on commit 58cfd24

Please sign in to comment.