https://bz.apache.org/bugzilla/show_bug.cgi?id=67932
Bug ID: 67932
Summary: module-info re-export other libraries
Product: Tomcat 10
Version: unspecified
Hardware: PC
OS: Mac OS X 10.1
Status: NEW
Severity: normal
Priority: P2
Component: Packaging
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ------
I have a problem with split packages when I use tomcat libraries. The issue is
that e.g. org.apache.tomcat.embed.core module exports:
open module org.apache.tomcat.embed.core {
…
exports jakarta.servlet;
exports org.apache.catalina;
exports org.apache.coyote;
…
}
I'm also importing a library, that has in it's module info:
module org.example.spring {
…
requires transitive jakarta.servlet;
…
}
Now, if I use those two libraries in my main application, I'm not able to
compile the project. My main module-info.java looks like:
module org.example.main.app {
…
requires org.apache.tomcat.embed.core;
…
}
However I'm not able to compile it, because module 'jakarta.servlet' required
by 'org.example.spring' is not found.
If I try to resolve it by adding a new dependency, that add 'jakarta.servlet'
module, I'm not able to compile it again, because content of package
'jakarta.servlet' is exported from two different modules, what is not allowed.
'org.apache.tomcat.embed.core' should only export those packages, that are new
in this project and do not re-export other libraries content.
Please correct me if I'm mistaken.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]