Skip to content

Latest commit

 

History

History
248 lines (208 loc) · 5.06 KB

namespace-change.adoc

File metadata and controls

248 lines (208 loc) · 5.06 KB

Migration to jakarta namespace

Introduction

As described in the Apache TomEE Dev mailing list, the work for the migration to the Jakarta namespace is tracked by 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 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
<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>
<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>

Project master branch now targets Java 11.

<dependency>
  <groupId>org.jboss.arquillian</groupId>
  <artifactId>arquillian-bom</artifactId>
  <version>x.x.x-.</version>
  <scope>import</scope>
  <type>pom</type>
</dependency>
<dependency>
  <groupId>org.jboss.arquillian</groupId>
  <artifactId>arquillian-bom</artifactId>
  <version>1.7.0.Alpha10</version>
  <scope>import</scope>
  <type>pom</type>
</dependency>

-

<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.1.2</version>
<groupId>jakarta.servlet.jsp.jstl</groupId>
<artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
<version>2.0.0</version>

-

groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-api</artifactId>
<version>2.1.8</version>
groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-api</artifactId>
<version>3.0.1</version>

-

<dependency>
  <groupId>javax.websocket</groupId>
  <artifactId>javax.websocket-api</artifactId>
  <version>1.x</version>
</dependency>
<dependency>
  <groupId>jakarta.websocket</groupId>
  <artifactId>jakarta.websocket-api</artifactId>
  <version>2.0.0</version>
</dependency>

-

<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat-api</artifactId>
    <version>9.0.x</version>
    <scope>provided</scope>
</dependency>
<dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat-api</artifactId>
    <version>10.0.20</version>
    <scope>provided</scope>
</dependency>

or latest Tomcat 10.0.x (depending on the Tomcat version used in the root pom.xml)

<dependency>
  <groupId>org.eclipse.microprofile</groupId>
  <artifactId>microprofile</artifactId>
  <version>2.0.1</version>
  <type>pom</type>
  <scope>provided</scope>
</dependency>
<dependency>
  <groupId>org.eclipse.microprofile</groupId>
  <artifactId>microprofile</artifactId>
  <version>5.0</version>
  <type>pom</type>
  <scope>provided</scope>
</dependency>

-

<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
<groupId>org.apache.tomee</groupId>
<artifactId>taglibs-shade</artifactId>
<version>9.0.0-M9-SNAPSHOT</version>

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 tomee/deps, feel free to open a pull request if you find a version that needs to be shaded.

Packages

From To Comment
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;

-

This packages come from JRE and don’t need migration.