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

xml-apis dependency causes build failure in JDT when migrating to JDK 11 #655

Open
Treehopper opened this issue Apr 24, 2020 · 4 comments
Open

Comments

@Treehopper
Copy link

I checked if it would be possible to migrate to JDK, and ran into this issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=536928
I learned that JDT is correctly reporting an error, whereas the Maven build incorrectly passes because of this JDK bug: https://bugs.openjdk.java.net/browse/JDK-8215739

I'd suggest to migrate to 11 now, and remove the xml-apis dependency.
Apart from the benefits of a modern JDK, I'd argue that more such problems will accumulate over time, making migration only harder in the future.

@fbricon
Copy link
Contributor

fbricon commented Apr 24, 2020

What do you mean by migrate to JDK 11? The project can build and run fine with JDK 11, produce a distribution perfectly working with Java 8

@Treehopper
Copy link
Author

I can confirm your observation. I'm compiling it with 14 myself.
This is less an immediate issue, and more of a "timebomb".

Steps to reproduce the issue:

  • set maven-compiler-plugin configuration to use source and target 11
  • $ mvn clean compile #=> works because of bug JDK-8215739
  • remove existing .classpath files
  • import projects into eclipse (e.g. via m2e)
    => compile errors: "The package javax.xml.* is accessible from more than one module: javax.xml, "

Some day JDK-8215739 will be fixed, possibly in a patch-release of the JDK, then also the Maven build for this project breaks.

The immediate issue is that JDK 11 is simply more fun to work with. :-)

@fbricon
Copy link
Contributor

fbricon commented May 5, 2020

Unfortunately, "more fun to work with" is not a compelling reason to require Java 11 at the moment, given that a majority of users are still stuck with Java 8.
I'm not to worried about the migration to Java 11, once we reach that point though, it'll be a matter of removing one dependency.
So I'll keep this issue on the backburner, hopefully not for too long, until we decide it's time to move on.

@datho7561
Copy link
Contributor

See eclipse-lsp4j/lsp4j#547. Once we move to lsp4j 0.13.0, we will need to support Java 11 properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants