The Eclipse Transformer Project

By Thomas Bitonti

Elevator Pitch

The Eclipse Transformer is a data driven engine for modifying (transforming) Java EE artifacts to enable them for the new Jakarta specification. The Transformer changes “javax” package references into “jakarta” package references for package names which were renamed by Jakarta EE.

Description

This presentation describes the Eclipse Transformer project, a new Eclipse-hosted open source project which is currently in use by IBM and Apache to create Jakarta EE enabled versions of their Open Liberty and TomEE application servers.  The Eclipse Transformer is also used within Open Liberty builds to convert Java EE applications into Jakarta EE applications as a step of running Jakarta EE integration tests.

The presentation has two main parts:

  • A description of the Eclipse Transformer: What the transformer does, and why that is valuable.
  •  A demonstration of transforming a Java EE utility library for use in a Jakarta EE application.

The Eclipse Transformer operates on Java EE resources (.class resources, manifest resources, and text-like resources such XML, HTML, and JSP), changing package references from their “javax” form to the new “jakarta” form.  For example, “javax.servlet” is replaced with “jakarta.servlet”.  The Transformer operates on individual resources and on aggregates of those resources (JAR, WAR, RAR, and EAR files, or directories contained their expanded contents).

The value of the Transformer is that it creates Jakarta EE enabled copies of existing artifacts without rebuilding those artifacts from source. The Transformer takes as input an existing Java EE artifact and produces as output a Jakarta EE enabled copy of the artifact.

Jakarta EE enabled artifacts must be created because of package name changes which were made within the current Jakarta EE specification.  Package names were changed from their current Java EE form (for example, “javax.servlet” to a new Jakarta EE form (“jakarta.servlet”).  The change of package names was a requirement of moving Java EE specifications to open source.  A consequence of the package name changes is that existing software which was written to the Java EE specifications must be rebuilt with new package names.

Additional values are:

  • The Transformer is available as an open source project;
  • The Transformer has both a Java API and a command line interface;
  • The Transformer may be used not only to perform “javax” to “jakarta” transformations, but may also be used to perform more generic transformations using user supplied rules data.

The Transformer is demonstrated by transforming a Java EE utility library, then incorporating the transformed copy of the utility library into a Jakarta EE application, then running the application using a preliminary Jakarta EE enabled version of Open Liberty.

Notes

The Eclipse Transformer project was begun by BJ Hargrave, then evolved by Thomas Bitonti and other Open Liberty developers to begin enabling Open Liberty for Jakarta EE.  The project was then accepted by Eclipse as a new open source Eclipse Technology project.

As project lead and primary contributors, BJ Hargrave and Thomas Bitonti have the best knowledge in regards to the project.

Technical background for the audience includes Java familiarity; general knowledge in regards to Java EE, and an awareness of the new Jakarta EE specifications.