Erik,
The Tomcat project has not, does not and will not copy classes from
Jakarta EE. It would be a clear breach of the licensing of those classes
to do so without following the terms of the license.
If you look into the history, you will see that many of those classes
were part of the original donation of Tomcat to the ASF and were
maintained at the ASF for a number of years before they were forked as
part of creating the Glassfish project.
Tomcat has always maintained its own version of the Java EE / Jakarta EE
APIs that it implements. Those APIs are not pure APIs and do contain
some implementation. Maintaining our own versions allows the Tomcat
project to:
- respond more quickly to bugs in those classes
- add Tomcat specific configuration (usually via system properties)
when necessary
- keep pace with changes as new versions of the specifications are
developed
- use Tomcat as a test bed to experiment with potential new
specification features as part of the development of the
specifications
The Java EE / Jakarta EE API JARs provided by Tomcat should be drop in
replacements for the equivalent JARs provided by the specification
projects. The TCKs check that the public API is identical and Tomcat
passes those tests.
It is our intention that Tomcat is compatible with JPMS. The API JARs
provided by Tomcat should have the same JPMS module names as the JARs
provided by the specification projects.
The embedded JARs are slightly different. A deliberate packaging choice
was made with those JARs to minimise the number of JARs. That means they
do contain API classes but don't have the same module name.
If the packaging of the embedded JARS is problematic, you can always use
the standard Tomcat JARs. They contain exactly the same classes just in
more JARs.
If you have an example where you see JPMS errors when using the standard
Tomcat JARs then please provide sufficient details for use to recreate
the issue so we can investigate.
Mark
On 07/12/2024 20:37, Erik Meuwese wrote:
Apache Tomcat copies classes of the Jakarta EE API's into the Tomcat
module. The package jakarta
https://github.com/apache/tomcat/tree/main/java/jakarta should be removed
from the Tomcat module or renamed. And the Jakarta EE API's should be
included as dependencies.
Copying the source from https://github.com/jakartaee/servlet to
https://github.com/apache/tomcat/tree/main/java/jakarta/servlet, and also
other Jakarta API's, causes Java Platform Module System (JPMS) errors. A
package can only be exported by one module on the classpath.
It will result in errors like this:
[ERROR] Error: Modules org.apache.tomcat.embed.el and jakarta.el export
package jakarta.el to module maven.artifact
[ERROR] Error: Modules org.apache.tomcat.servlet and jakarta.servlet
package jakarta.servlet to module maven.artifact
It would be nice if Apache Tomcat is compatible with JPMS.
Kind regards,
Erik Meuwese
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org