blob: e3333edb68ef70ab3a57257c20ac3bcc327f88ba [file] [log] [blame]
= Migration to jakarta namespace
== Introduction
As described in the Apache TomEE Dev https://lists.apache.org/thread/qfxykymqbm916fhrpvhm8934vwo6pvt1[mailing list], the work for the migration to the Jakarta namespace is tracked by https://issues.apache.org/jira/browse/TOMEE-3862[TOMEE-3862].
The following is a list of common dependency upgrades, configuration, tips and tricks that can help you to jump or speed up your contribution to this migration by fixing test, examples, etc. within the project.
If you are new to the project, don't forget to check our https://tomee.apache.org/community/index.html[Community] page containing all the details on how to start contributing.
== General Notes
- Use a JDK >= 11 + Maven 3.8.x
- Master branch is being used for this migration.
- Javamail is currently broken. We need to have a jakarta compatible
version of Geronimo Javamail. This currently breaks 2 examples and
prevents platform tck from running.
- Deltaspike / Kratzo examples require dependency upgrades, i.e. MVC
2.0 + Jakarta version of Deltaspike.
- Micro Profile examples are broken due to the ongoing integration work
of SmallRye impls. If the integration is done, we can fix them.
- If Hibernate is used, we either need to upgrade to 6.0.0 _or_ use the
Jakarta artifact from the 5.6.x series. In some examples, we still use
Hibernate 4, so the upgrade also requires to deal with
"tomee.jpa.factory.lazy".
- Check for "http" repositories to avoid the default http blocker in
newer Maven versions.
== Artifacts
|====
|From | To | Comment
a|
[source, xml]
----
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>x.x.x</version>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
----
a|
[source, xml]
----
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
----
b|
Project master branch now targets Java 11.
a|
[source, xml]
----
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<version>x.x.x-.</version>
<scope>import</scope>
<type>pom</type>
</dependency>
----
a|
[source, xml]
----
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<version>1.7.0.Alpha10</version>
<scope>import</scope>
<type>pom</type>
</dependency>
----
b|
-
a|
[source, xml]
----
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.1.2</version>
----
a|
[source, xml]
----
<groupId>jakarta.servlet.jsp.jstl</groupId>
<artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
<version>2.0.0</version>
----
b|
-
a|
[source, xml]
----
groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-api</artifactId>
<version>2.1.8</version>
----
a|
[source, xml]
----
groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-api</artifactId>
<version>3.0.1</version>
----
b|
-
a|
[source, xml]
----
<dependency>
<groupId>javax.websocket</groupId>
<artifactId>javax.websocket-api</artifactId>
<version>1.x</version>
</dependency>
----
a|
[source, xml]
----
<dependency>
<groupId>jakarta.websocket</groupId>
<artifactId>jakarta.websocket-api</artifactId>
<version>2.0.0</version>
</dependency>
----
b|
-
a|
[source, xml]
----
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-api</artifactId>
<version>9.0.x</version>
<scope>provided</scope>
</dependency>
----
a|
[source, xml]
----
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-api</artifactId>
<version>10.0.20</version>
<scope>provided</scope>
</dependency>
----
b|
or latest Tomcat 10.0.x (depending on the Tomcat version used in the root pom.xml)
a|
[source, xml]
----
<dependency>
<groupId>org.eclipse.microprofile</groupId>
<artifactId>microprofile</artifactId>
<version>2.0.1</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
----
a|
[source, xml]
----
<dependency>
<groupId>org.eclipse.microprofile</groupId>
<artifactId>microprofile</artifactId>
<version>5.0</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
----
b|
-
a|
[source, xml]
----
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
----
a|
[source, xml]
----
<groupId>org.apache.tomee</groupId>
<artifactId>taglibs-shade</artifactId>
<version>9.0.0-M9-SNAPSHOT</version>
----
b|
Shaded artifacts are described in the next section.
|====
=== Shaded artifacts
Artifacts whose projects have not yet released a Jakarta namespace compatible version are being modified(shaded) in the module https://github.com/apache/tomee/tree/master/deps[tomee/deps], feel free to open a pull request if you find a version that needs to be shaded.
== Packages
|====
|From | To | Comment
a|
[source, java]
----
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
----
a|
-
b|
This packages come from JRE and don't need migration.
|====