Skip to content

Commit

Permalink
Merge branch 'eclipse-ee4j:master' into 4.0_variable_mapper
Browse files Browse the repository at this point in the history
  • Loading branch information
pizzi80 authored Oct 19, 2024
2 parents b1526a0 + 89696c0 commit 630cd77
Show file tree
Hide file tree
Showing 814 changed files with 13,523 additions and 139,020 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,29 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [ '11' ]
java: [ '17' ]
os: [ubuntu-latest]
steps:
- name: Checkout Sources
uses: actions/checkout@v1
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Checkout API
uses: actions/checkout@v4
with:
repository: jakartaee/faces
ref: '5.0'
path: './faces'
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Setup Maven Action
uses: s4u/[email protected]
with:
checkout-fetch-depth: 0
java-version: 17
java-distribution: temurin
maven-version: 3.9.6
- name: Build with Maven
run: mvn --no-transfer-progress install -Pstaging
run: mvn --no-transfer-progress install -Pstaging -Papi
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "faces"]
path = faces
url = https://github.com/jakartaee/faces.git
branch = 5.0
80 changes: 49 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,28 @@
[//]: # " SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 "
-->

# Mojarra 4.0
# Mojarra 5.0

Eclipse's implementation of the Jakarta Faces 4.0 specification
Eclipse's implementation of the Jakarta Faces 5.0 specification

For Mojarra / JSF 2.3 please have a look at https://github.com/eclipse-ee4j/mojarra/blob/2.3/README.md.
For Mojarra / JSF 3.0 please have a look at https://github.com/eclipse-ee4j/mojarra/blob/3.0/README.md.
* Mojarra 5.0 - this branch, under development
* [Mojarra 4.1](https://github.com/eclipse-ee4j/mojarra/blob/4.1/README.md) - stable release
* [Mojarra 4.0](https://github.com/eclipse-ee4j/mojarra/blob/4.0/README.md) - stable release
* [Mojarra 3.0](https://github.com/eclipse-ee4j/mojarra/blob/3.0/README.md) - legacy release
* [Mojarra 2.3](https://github.com/eclipse-ee4j/mojarra/blob/2.3/README.md) - legacy release

## Minimum Requirements
For support on Mojarra 2.3 and earlier please contact your vendor for support (RedHat, IBM,
Oracle, Omnifish, Payara, etceteras)

- Java 11
- Jakarta Servlet 6.0
- Jakarta Expression Language 5.0
- CDI 4.0
- Jakarta Standard Tag Library 2.0
- Jakarta Web Socket 2.0 (optional, only when `<f:websocket>` is used)
- Jakarta JSON Processing 2.0 (optional, only when `<f:websocket>` is used)
- Jakarta Validation 3.0 (optional, only when `<f:validateBean>` or `<f:validateWholeBean>` is used)
## Minimum Requirements

CDI is explicitly required because since Jakarta Faces 2.3 the `javax.faces.bean.*` annotations such as `@ManagedBean` are deprecated, and in 4.0 these have been removed. Several implicit Jakarta Expression Language objects are produced via CDI producers, and `<f:websocket>` manages the Jakarta WebSocket sessions and events via CDI.
- Java 17
- Jakarta Servlet 6.1
- Jakarta Expression Language 6.0
- Jakarta CDI 4.1
- Jakarta Web Socket 2.2 (optional, only when `<f:websocket>` is used)
- Jakarta JSON Processing 2.1 (optional, only when `<f:websocket>` is used)
- Jakarta Validation 3.1 (optional, only when `<f:validateBean>` or `<f:validateWholeBean>` is used)


## Installation
Expand All @@ -52,12 +55,11 @@ In case you're manually carrying around JARs:

Add below JARs to `/WEB-INF/lib`:

- [`jakarta.faces.4.0.x.jar`][9]
- [`weld-servlet-shaded-4.0.0.Final.jar`][10]
- [`jstl-2.0.jar`][11]
- [`jakarta.json-api-2.0.jar`][12] (optional, only when `<f:websocket>` is used)
- [`jakarta.json-2.0.jar`][12a] (optional, only when `<f:websocket>` is used)
- [`validation-api-3.0.0.Final.jar`][13] (optional, only when `<f:validateBean|validateWholeBean>` is used)
- [`jakarta.faces.4.1.x.jar`][9]
- [`weld-servlet-shaded-4.1.0.Final.jar`][10]
- [`jakarta.json-api-2.1.0.jar`][12] (optional, only when `<f:websocket>` is used)
- [`jakarta.json-2.1.0.jar`][12a] (optional, only when `<f:websocket>` is used)
- [`jakarta.validation-api-3.1.0.jar`][13] (optional, only when `<f:validateBean|validateWholeBean>` is used)
- [`hibernate-validator-8.0.x.Final.jar`][14] (optional, only when `<f:validateBean|validateWholeBean>` is used)

Substitute `x` with latest version number available.
Expand All @@ -72,7 +74,7 @@ In case you're using Maven, you can find below the necessary coordinates:
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-api</artifactId>
<version>10.0.0</version>
<version>11.0.0</version>
<scope>provided</scope>
</dependency>
```
Expand All @@ -90,17 +92,12 @@ In case of WildFly/JBoss EAP, [you need to manually package `jsf-api.jar` and `j
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet-shaded</artifactId>
<version>4.0.0.Final</version>
</dependency>
<dependency>
<groupId>jakarta.servlet.jsp.jstl</groupId>
<artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
<version>2.0.0</version>
<version>4.1.0.Final</version>
</dependency>
<dependency> <!-- Optional, only when <f:websocket> is used. -->
<groupId>org.glassfish</groupId>
<artifactId>jakarta.json</artifactId>
<version>2.0.0</version>
<version>2.1.0</version>
</dependency>
<dependency> <!-- Optional, only when <f:validateBean> or <f:validateWholeBean> is used. -->
<groupId>org.hibernate.validator</groupId>
Expand Down Expand Up @@ -228,20 +225,35 @@ Finally create a [Facelets][20] file `/hello.xhtml` as below:

Start the server and open it by `http://localhost:8080/contextname/hello.xhtml`.

## Activating CDI in Jakarta Faces 4.0
## Activating CDI in Jakarta Faces 4.1

CDI is activated by default in Jakarta Faces 4.0 and can´t be deactivated.
CDI is activated by default in Jakarta Faces 4.1 and can´t be deactivated.
It´s not required anymore to add `@FacesConfig` to a CDI managed bean to accomplish this.
As of Jakarta Faces 4.0 `@FacesConfig` still removes the need to explicitly add a `FacesServlet` entry to `web.xml`.

## Building

In case you want to checkout this repository and manually build from source yourself (if necessary after editing source code), here are the instructions:

### Jakarta Faces.Next

1. Make sure that you have JDK 17, Ant and Maven installed.
2. Checkout branch [`master`][28].
3. Run the following commands from the root directory of the project:

```bash
# under the root dir of project
mvn clean install
```

4. The binary is now available as `impl/target/jakarta.faces-4.x.x-SNAPSHOT.jar`.



### Jakarta Faces 4.0

1. Make sure that you have JDK 11, Ant and Maven installed.
2. Checkout branch [`master`][28].
2. Checkout branch [`4.0`][31].
3. Run the following commands from the root directory of the project:

```bash
Expand Down Expand Up @@ -287,6 +299,11 @@ In case you want to checkout to edit the source code of Mojarra with full IDE su

### Eclipse

#### Jakarta Faces 4.0

1. Checkout branch [`4.0`][29] using File -> import -> Git
2. Right click the Mojarra project after checkout, choose Configure -> Convert to Maven Project

#### Jakarta Faces 3.0

1. Checkout branch [`3.0`][29] using File -> import -> Git
Expand Down Expand Up @@ -358,3 +375,4 @@ mvn versions:set -DgroupId=* -DartifactId=* -DoldVersion=* -DgenerateBackupPoms=
[28]: https://github.com/eclipse-ee4j/mojarra
[29]: https://github.com/eclipse-ee4j/mojarra/tree/3.0
[30]: https://github.com/eclipse-ee4j/mojarra/tree/2.3
[31]: https://github.com/eclipse-ee4j/mojarra/tree/4.0
39 changes: 39 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Releasing a new Mojarra version

In below example we assume 4.0.3.

1. Check beforehand that this version does NOT exist in [staging](https://jakarta.oss.sonatype.org/content/repositories/staging/org/glassfish/jakarta.faces/) else bump the version
2. Go to [Mojarra CI](https://ci.eclipse.org/mojarra/)
3. [Log in](https://ci.eclipse.org/mojarra/login?from=%2Fmojarra%2F)
4. Open [1_mojarra_build_and_stage](https://ci.eclipse.org/mojarra/job/1_mojarra-build-and-stage/)
5. Click [Build with parameters](https://ci.eclipse.org/mojarra/job/1_mojarra-build-and-stage/build) in menu
- `BRANCH` = `4.0`
- `RELEASE_VERSION` = `4.0.3`
- `JDK` = `JDK11`
- click [Build] button
6. Wait for it to finish successfully
7. Drill down into this build e.g. [build 106](https://ci.eclipse.org/mojarra/job/1_mojarra-build-and-stage/106)
8. Click [Console Output](https://ci.eclipse.org/mojarra/job/1_mojarra-build-and-stage/106/console) in menu
9. Ctrl+F 'orgglassfish', to find release ID, e.g. `Created staging repository with ID "orgglassfish-1273"`, remember this for `STAGING_RELEASE_ID` in a later step
10. Verify that it's present in [staging](https://jakarta.oss.sonatype.org/content/repositories/staging/org/glassfish/jakarta.faces/)
11. Verify that a new [4.0.3](https://github.com/eclipse-ee4j/mojarra/branches/active) branch is created
12. Verify that a new [4.0.3-RELEASE](https://github.com/eclipse-ee4j/mojarra/tags) tag is created
13. Open [2_mojarra-run-tck-against-staged-build_4_0](https://ci.eclipse.org/mojarra/job/2_mojarra-run-tck-against-staged-build_4_0) (there are separate ones for 2.3 and 3.0)
14. Click [Build with parameters](https://ci.eclipse.org/mojarra/job/2_mojarra-run-tck-against-staged-build_4_0/build) in menu
- `IMPL_SOURCE` = `STAGE`
- `IMPL_VERSION` = `4.0.3`
- `IMPL_BRANCH` = `4.0`
- click [Build] button
15. Wait for it to finish successfully
16. Open [3_mojarra-staging-to-release](https://ci.eclipse.org/mojarra/job/3_mojarra-staging-to-release/)
17. Click [Build with parameters](https://ci.eclipse.org/mojarra/job/3_mojarra-staging-to-release/build) in menu
- `STAGING_RELEASE_ID` = `orgglassfish-1273`
- click [Build] button
18. Wait for it to finish successfully
19. Verify that it's present in [Maven Central](https://repo1.maven.org/maven2/org/glassfish/jakarta.faces/) (might take up to a hour)
20. If everything is OK, then merge 4.0.3 branch into 4.0 via a PR
21. Delete the 4.0.3 branch after merge
22. Manage the [milestones](https://github.com/eclipse-ee4j/mojarra/milestones) page
- make sure all issues/PRs are linked to proper milestone
- close the milestones which were just released
- create new milestones for next releases
6 changes: 0 additions & 6 deletions action/faces-config.NavData

This file was deleted.

60 changes: 0 additions & 60 deletions action/pom.xml

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 630cd77

Please sign in to comment.