Closed johnpoth closed 6 years ago
To make the setting project specific I used ${maven.projectBasedir}/.mvn/jvm.config
. I needed an additional module, so it looks as follows:
--add-modules java.activation,java.xml.bind
--add-exports java.xml/com.sun.org.apache.xml.internal.resolver=ALL-UNNAMED
--add-exports java.xml/com.sun.org.apache.xml.internal.resolver.tools=ALL-UNNAMED
This is really just a workaround - I think the plugin should allow to be run in its own process so that JVM arguments can be passed to it.
Yep, same exception here. Any plans when we will see this resolved?
@johnpoth @nicolaiparlog @ptahchiev
Sorry guys, I have no knowledge of Java 9 module system and no idea what's happening here and how to fix it. No idea, no plans, sorry.
I believe what's happening is you depend on:
<jaxb22.version>2.2.11</jaxb22.version>
but there's already a 2.3.0 version of JAXB which ships a jaxb-jxc-jdk9 module:
http://repo1.maven.org/maven2/org/glassfish/jaxb/jaxb-jxc-jdk9/
I believe what you should do is create a new branch of the maven plugin which declares the jdk9 dependencies and release a new version that supports jdk9.
Anything to get this resolved soon, would be much appreciated. People are trying to migrate to Java9 and actually Java10 now.
I moved to org.apache.cxf:cxf-xjc-plugin, some headache with configuration and it works fine for me
I hear you, but, as said above have zero Java 9 exp so far.
as far as I understand(correct me if I'm wrong) the fix for it is already in java-9 branch according to discussion there -> https://github.com/highsource/maven-jaxb2-plugin/issues/120 so question is what blocks us to relase it ?
@nicolaiparlog @dzmitryh @hendriks73 @ptahchiev
Hi everyone,
I've just added the maven-jaxb23-plugin
on the java-9
branch. With this plugin, the tests/java-9
by @nicolaiparlog more or less works. You still have to turn off episode generation, but schema bindings are considered.
Could you please give it a try on your projects. Thank you.
Best wishes, Alexey
Does that mean the additional --add-exports
and --add-modules
are no longer necessary? I went looking for the jvm.config
file I created, but couldn't find it. I assume that means it's not needed anymore. That would be great! :)
(Will give the new version a try this week or next.)
@nicolaiparlog To be honest, I have no idea. The java-9
test worked on my machine under Java 9 as it is. If don't know if this is due to my setup or it generally works. This is why I'm asking you to please give it a try.
Please also check if maven-jaxb23-plugin
works under Java 8 for you. I would like to know if there are compatibility issues, would there be a need for Java <= 8 version of maven-jaxb23-plugin
and Java >=9 version maven-jaxb23-plugin
or would one variant suffice.
I summarized my observations and answers to some of your questions in this comment on #120.
As I see it, this issue can be closed.
java9 branch tested at work. It works fine (with episode generation set to off) Any idea of when it could be released ?
@SamSuffit See #120 let's continue the discussion there.
Great! Now get to fixing jaxb2-basics :)
+1
Thanks a lot !
@nicolaiparlog @ptahchiev @dzmitryh @hendriks73 et al.
I've just released maven-jaxb2-plugin
version 0.14.0 to the Central Maven Repo. Will appear there in an hour or so.
Please test it. maven-jaxb2-plugin
or maven-jaxb23-plugin
should work under Java 9 as well as 1.7 and 1.8.
maven-jaxb20-plugin
, maven-jaxb22-plugin
, maven-jaxb22-plugin
should work under 1.7 and 1.8.
Java 1.6 is no longer supported.
Thanks a lot !
Well done guys!
When using Java 9 build 156 and v0.13.1 of the plugin on Apache Camel I get:
Work around is to set
which works. The plugin doesn't seem to support forking so I don't see another workaround.
Thanks!