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-beans doesn't compile with Java 11 #1
Comments
Hello chevalleyc. Is there a fix for this xml-beans compile error against Java 11 or are you still using the workaround? The error I am getting is: |
To be able to use the xmlbeans-maven-plugin with Java 11, add the following configuration element:
|
When I added 1.8, the source did not have the List methods. |
Have you evaluated migrating to EHRbase? EHRbase 1.0 (early April 21) will support FLAT json format along with canonical JSON and XML. There has been a tremendous development effort on this platform since 1 1/2 year. I would recommend you give it a try if not already done. Cheers! |
There has been recent activity in the XmlBeans project, but I was unable to successfully use the Apparently one of the changes in XmlBeans 5 is its own Maven plugin, which seems like the long-term solution, but I'm not prepared to make the switch just yet. However, I've actually found an interim workaround to stick with the older XmlBeans 2.x library, by combining the following two options:
In this configuration, XmlBeans will generate its binary information, along with its Java 1.5-compatible source (including List<...> methods). Meanwhile, the
In my configuration, the generated source code is attached as a source directory that is processed by the standard |
@robbytx could you share your pom.xml since I don't know how to include the bean files that is needed for compilation. |
Sorry @mpet, I've changed companies since my comment and I no longer have access to the project where this was in use. I believe the POM at the top of this issue shows how to generate the sources using the older plugin. Many Maven plugins that generate source code will automatically "attach" the generated source code directory to the project so that it will be included in compilation. If that's not happening for you, then you can use the build-helper-maven-plugin to explicitly add the directory where XmlBeans emits its sources. Hope that helps. |
Hi, can anyone help me regarding this matter I was trying to update my code to java 11 but can't able to build due to this XML beans The error I am getting Error: bootstrap class path not set in conjunction with - source 1.4 Org.codehaus.mojo.xmlbeans.xmlbeansexception: compile failed |
@himukk did you try adding |
It worked |
Thank you |
The workaround is for now to force using java 8 in pom.xml as follows:
the
compiler
parameter should specify an alternative path to a java 8 compiler.The text was updated successfully, but these errors were encountered: