Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JBEAP-22930] Mojarra -- test branch used for EAP 7.4 using SE 17 #99

Open
wants to merge 4 commits into
base: 2.3.14.SP
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/test-2.3.14.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
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:
distribution: 'temurin'
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-${{ matrix.java-version }}-${{ 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-${{ matrix.java-version }}-${{ hashFiles('**/pom.xml') }}
16 changes: 8 additions & 8 deletions impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -168,32 +168,32 @@
<version>2.2.3</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymockclassextension</artifactId>
<version>3.1</version>
<artifactId>easymock</artifactId>
<version>5.2.0</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-easymock</artifactId>
<version>1.4.11</version>
<version>2.0.9</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>1.4.11</version>
<version>2.0.9</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.8.3</version>
<version>1.9.4</version>
<scope>test</scope>
</dependency>

Expand Down Expand Up @@ -302,7 +302,7 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>4.0.0</version>
<version>5.1.9</version>
<extensions>true</extensions>
<executions>
<execution>
Expand Down
4 changes: 3 additions & 1 deletion impl/src/test/java/com/sun/faces/mock/MockResultSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
55 changes: 31 additions & 24 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,29 +112,6 @@
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-java-version</id>
<goals>
<goal>enforce</goal>
</goals>
</execution>
</executions>
<configuration>
<rules>
<!-- JDK 1.8 is required to build Mojarra 2.3.x. -->
<requireJavaVersion>
<message>
To build this project, JDK 1.8 is required. Please install it.
</message>
<version>[1.8,1.9)</version>
</requireJavaVersion>
</rules>
</configuration>
</plugin>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you remove this you need something to enforce the use of SE 8 when releasing. For example:

https://github.com/wildfly/wildfly/blob/main/pom.xml#L1133-L1146

So I think you need to leave the plugin in place but just tweak the execution by moving the configuration into it and setting the phase to 'deploy'.

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
Expand Down Expand Up @@ -168,5 +145,35 @@
</plugins>
</pluginManagement>
</build>


<profiles>
<profile>
<id>java-modules</id>
<activation>
<jdk>[9,]</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
<configuration>
<argLine>
--add-opens=java.base/java.lang=ALL-UNNAMED
</argLine>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
Loading