Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omit removed Java modules from detected jlinkModules #1374

Merged
merged 2 commits into from
Oct 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,28 @@ object JlinkPlugin extends AutoPlugin {
// This requires special handling on our part when deciding if the module
// is a part of the platform or not.
// At least the new modules shouldn't be doing this...
val knownJakartaJavaModules = Set("java.xml.bind", "java.xml.soap", "java.ws.rs")
val knownJakartaJavaModules = Set("java.annotation", "java.xml.bind", "java.xml.soap", "java.ws.rs")

// Java platform modules that were officially removed.
// https://www.oracle.com/java/technologies/javase/jdk-11-relnote.html#JDK-8190378
val removedJavaModules = Set(
"java.xml.ws",
"java.xml.bind",
"java.activation",
"java.xml.ws.annotation",
"java.corba",
"java.transaction",
"java.se.ee",
"jdk.xml.ws",
"jdk.xml.bind"
)

val filteredModuleDeps = detectedModuleDeps
.filter { m =>
m.startsWith("jdk.") || m.startsWith("java.")
}
.filterNot(knownJakartaJavaModules.contains)
.filterNot(removedJavaModules.contains)

// We always want `java.base`, and `jlink` requires at least one module.
(filteredModuleDeps + "java.base").toSeq
Expand Down