Skip to content

Commit

Permalink
Merge pull request #5443 from arjantijms/41_update_pom_versions
Browse files Browse the repository at this point in the history
Update various versions in pom, specifically Jakarta versions to final
  • Loading branch information
arjantijms authored May 7, 2024
2 parents 4a68ab2 + ef72b9b commit 593931f
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 41 deletions.
52 changes: 23 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,30 @@
[//]: # " SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 "
-->

# Mojarra 4.0
# Mojarra 4.1

Eclipse's implementation of the Jakarta Faces 4.0 specification
Eclipse's implementation of the Jakarta Faces 4.1 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.
For Mojarra / JSF 4.0 please have a look at https://github.com/eclipse-ee4j/mojarra/blob/4.0/README.md.

## Minimum Requirements

- 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)
- 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)

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.
CDI is explicitly required because since Jakarta Faces 2.3 the `javax.faces.bean.*` annotations such as `@ManagedBean` are deprecated, and since 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.


## Installation

Depending on the server used, Jakarta Faces may already be built-in (full fledged Jakarta EE containers such as [WildFly][1], [JBoss EAP][2], [TomEE][3], [Payara][4], [GlassFish][5], [Liberty][6], etc.), or not (barebones Jakarta Server Pages/Jakarta Servlet containers such as [Tomcat][7], [Jetty][8], etc.). If the server doesn't ship with Jakarta Faces built-in, then you need to manually install Jakarta Faces 4.0 along with CDI 4.0+, Jakarta JSON Processing 2.0+ and Jakarta Standard Tag Library 2.0+ as those Jakarta Servlet containers usually also don't even ship with those Jakarta Faces dependencies.
Depending on the server used, Jakarta Faces may already be built-in (full fledged Jakarta EE containers such as [WildFly][1], [JBoss EAP][2], [TomEE][3], [Payara][4], [GlassFish][5], [Liberty][6], etc.), or not (barebones Jakarta Server Pages/Jakarta Servlet containers such as [Tomcat][7], [Jetty][8], etc.). If the server doesn't ship with Jakarta Faces built-in, then you need to manually install Jakarta Faces 4.1 along with a CDI 4.1+, Jakarta JSON Processing 2.1+ as those Jakarta Servlet containers usually also don't ship with those Jakarta Faces dependencies.


### Non-Maven
Expand All @@ -52,12 +52,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 +71,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 +89,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,9 +222,9 @@ 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`.

Expand All @@ -240,7 +234,7 @@ In case you want to checkout this repository and manually build from source your

### Jakarta Faces.Next

1. Make sure that you have JDK 11, Ant and Maven installed.
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:

Expand Down
2 changes: 1 addition & 1 deletion action/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.1.0-M2</version>
<version>6.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
12 changes: 6 additions & 6 deletions impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,20 @@
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.1.0-M2</version>
<version>6.1.0</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>jakarta.websocket</groupId>
<artifactId>jakarta.websocket-api</artifactId>
<version>2.2.0-M1</version>
<version>2.2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.websocket</groupId>
<artifactId>jakarta.websocket-client-api</artifactId>
<version>2.2.0-M1</version>
<version>2.2.0</version>
<scope>provided</scope>
</dependency>

Expand Down Expand Up @@ -91,7 +91,7 @@
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<version>3.1.0-M1</version>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>

Expand Down Expand Up @@ -125,7 +125,7 @@
<dependency>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
<version>3.2.0-M2</version>
<version>3.2.0</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
Expand Down Expand Up @@ -221,7 +221,7 @@
<plugin>
<groupId>com.github.blutorange</groupId>
<artifactId>closure-compiler-maven-plugin</artifactId>
<version>2.28.0</version>
<version>2.30.0</version>
<executions>
<!-- Process all files in the "includes" directory individually-->
<execution>
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

<build>
<plugins>
<!-- Sets minimal Maven version to 3.6.0 -->
<!-- Sets minimal Maven version to 3.8.6 -->
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
Expand All @@ -74,7 +74,7 @@
<configuration>
<rules>
<requireMavenVersion>
<version>3.6.0</version>
<version>3.8.6</version>
</requireMavenVersion>
</rules>
</configuration>
Expand All @@ -85,7 +85,7 @@
<!-- Restricts the Java version to 17 - API remains at Java 17 for now. -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.12.1</version>
<version>3.13.0</version>
<configuration>
<release>17</release>
<compilerArgument>-Xlint:unchecked</compilerArgument>
Expand Down
4 changes: 2 additions & 2 deletions rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.1.0-M2</version>
<version>6.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.json.bind</groupId>
<artifactId>jakarta.json.bind-api</artifactId>
<version>3.0.0</version>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down

0 comments on commit 593931f

Please sign in to comment.