From 802ef2b2534ca4bd6a936b24c55106a104de227c Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Thu, 28 Mar 2024 18:57:10 -0500 Subject: [PATCH 1/4] [JBEAP-22930] Mojarra -- test branch used for EAP 7.4 using SE 17 Modify version in POM to add support for Java 17 Minor test update to work around minor data change in testing Add GH Action workflow --- .github/workflows/test-2.3.14.yaml | 49 +++++++++++++++++ impl/pom.xml | 16 +++--- .../com/sun/faces/mock/MockResultSet.java | 4 +- pom.xml | 55 +++++++++++-------- 4 files changed, 91 insertions(+), 33 deletions(-) create mode 100644 .github/workflows/test-2.3.14.yaml diff --git a/.github/workflows/test-2.3.14.yaml b/.github/workflows/test-2.3.14.yaml new file mode 100644 index 0000000000..826f9b7b82 --- /dev/null +++ b/.github/workflows/test-2.3.14.yaml @@ -0,0 +1,49 @@ +name: Build and Test Mojarra 2.3.14.SP + +on: + workflow_dispatch: + branches: + - 2.3.14.SP + push: + branches: + - 2.3.14.SP + pull_request: + branches: + - 2.3.14.SP + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + java-version: [ 8, 17, 21 ] + + steps: + - uses: actions/checkout@v3 + + - name: Set up JDK ${{ matrix.java-version }} + uses: actions/setup-java@v3 + with: + java-version: ${{ matrix.java-version }} + cache: 'maven' + + - name: Restore cached Maven packages + id: cache-maven-packages + uses: actions/cache/restore@v3 + with: + path: | + ~/.m2 + ~/.local/share/containers + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + + - name: Clean and build + run: mvn -B -fae clean package -Dgithub=true + + - name: Cache Maven packages + uses: actions/cache/save@v3 + with: + path: | + ~/.m2 + ~/.local/share/containers + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} diff --git a/impl/pom.xml b/impl/pom.xml index 7fd5f112c7..d46f4ed7ea 100644 --- a/impl/pom.xml +++ b/impl/pom.xml @@ -168,32 +168,32 @@ 2.2.3 test - + org.easymock - easymockclassextension - 3.1 + easymock + 5.2.0 test - + org.powermock powermock-api-easymock - 1.4.11 + 2.0.9 test org.powermock powermock-module-junit4 - 1.4.11 + 2.0.9 test commons-beanutils commons-beanutils - 1.8.3 + 1.9.4 test @@ -302,7 +302,7 @@ org.apache.felix maven-bundle-plugin - 4.0.0 + 5.1.9 true diff --git a/impl/src/test/java/com/sun/faces/mock/MockResultSet.java b/impl/src/test/java/com/sun/faces/mock/MockResultSet.java index 5dd4f61f0b..6973e37e67 100644 --- a/impl/src/test/java/com/sun/faces/mock/MockResultSet.java +++ b/impl/src/test/java/com/sun/faces/mock/MockResultSet.java @@ -139,9 +139,11 @@ public Object getObject(String columnName) throws SQLException { if (columnName.equals("writeOnlyProperty") && (beans[row - 1] instanceof BeanTestImpl)) { return (((BeanTestImpl) beans[row - 1]).getWriteOnlyPropertyValue()); - } else { + } else if (!columnName.equals("class")) { return (PropertyUtils.getSimpleProperty(beans[row - 1], columnName)); + } else { + return null; } } catch (Exception e) { throw new SQLException(e.getMessage()); diff --git a/pom.xml b/pom.xml index 3f99045c17..cbcf2e7d54 100644 --- a/pom.xml +++ b/pom.xml @@ -112,29 +112,6 @@ - - org.apache.maven.plugins - maven-enforcer-plugin - - - enforce-java-version - - enforce - - - - - - - - - To build this project, JDK 1.8 is required. Please install it. - - [1.8,1.9) - - - - org.apache.maven.plugins maven-release-plugin @@ -168,5 +145,35 @@ - + + + + java-modules + + [9,] + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.2.5 + + + --add-opens=java.base/java.lang=ALL-UNNAMED + + + + + + + + javax.xml.bind + jaxb-api + 2.3.1 + test + + + + From 5ece0d8e50d1b878db75ccb4c4d91902ad92d32f Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Thu, 28 Mar 2024 19:00:49 -0500 Subject: [PATCH 2/4] [JBEAP-22930] --- .github/workflows/test-2.3.14.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-2.3.14.yaml b/.github/workflows/test-2.3.14.yaml index 826f9b7b82..4913fcf2e8 100644 --- a/.github/workflows/test-2.3.14.yaml +++ b/.github/workflows/test-2.3.14.yaml @@ -25,6 +25,7 @@ jobs: - name: Set up JDK ${{ matrix.java-version }} uses: actions/setup-java@v3 with: + distribution: 'temurin' java-version: ${{ matrix.java-version }} cache: 'maven' From 2b214e19837f87f124da4a4431bc1a1dcb26eb66 Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Thu, 28 Mar 2024 19:04:27 -0500 Subject: [PATCH 3/4] [JBEAP-22930] Mojarra -- test branch used for EAP 7.4 using SE 17 Add JDK version as part of cache key --- .github/workflows/test-2.3.14.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-2.3.14.yaml b/.github/workflows/test-2.3.14.yaml index 4913fcf2e8..4d6e1d7f8b 100644 --- a/.github/workflows/test-2.3.14.yaml +++ b/.github/workflows/test-2.3.14.yaml @@ -36,7 +36,7 @@ jobs: path: | ~/.m2 ~/.local/share/containers - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + key: ${{ runner.os }}-m2-${{ matrix.java-version }}-${{ hashFiles('**/pom.xml') }} - name: Clean and build run: mvn -B -fae clean package -Dgithub=true From b795d801c0d1a2df7bb80754781abf8ae34c8603 Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Thu, 28 Mar 2024 19:05:51 -0500 Subject: [PATCH 4/4] Fix cache key --- .github/workflows/test-2.3.14.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-2.3.14.yaml b/.github/workflows/test-2.3.14.yaml index 4d6e1d7f8b..47040f2027 100644 --- a/.github/workflows/test-2.3.14.yaml +++ b/.github/workflows/test-2.3.14.yaml @@ -47,4 +47,4 @@ jobs: path: | ~/.m2 ~/.local/share/containers - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + key: ${{ runner.os }}-m2-${{ matrix.java-version }}-${{ hashFiles('**/pom.xml') }}