-
Notifications
You must be signed in to change notification settings - Fork 37
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
Plugin dont work on java 9 #54
Comments
@ingwarsw I was able to compile with JDK9 (Oracle and Eclipse OpenJ9) by using the following maven plugins.
|
It doesn't work. I tried with madduci configuration but I get the error all the same : Processing: file:/C:/Users/amoscatelli/Documents/NetBeansProjects/SS730pClient/src/wsdl/InvioTelematicoSpeseSanitarie730p.wsdl |
This a pom project you can use for testing the issue. Please let me know if you can help |
@amoscatelli you can disable the compilation of WSDL files and let maven-compiler-plugin do the job for you. You will need to use jdeps to generate a module-info.java based on what jaxws-plugin generates. it works perfectly |
Do you mean this ? http://www.mojohaus.org/jaxws-maven-plugin/wsimport-mojo.html#xnocompile I am already using xnocompile true, as you can see in the attachment. So what do you mean ? |
Ran into this issue today - seems like if you add in an explicit executable to the JDK 9 wsimport, you can get it to work:
It's annoying, but at least seems like a plausible workaround until this bug gets fixed. |
I can confirm that @strmer15 workaround works for me. For future reference, the executable tag goes into plugin configuration section. |
I used this:
And then in the plugin:
|
I have the same problem. |
@highsource Add |
@byrash No. |
@highsource yes it works, with both Oracle JDK 9 and 10 |
@madduci Could you please point me to an example of using |
@madduci @byrash Here's my example: jaxb2-basics-sample-jaxws-maven-with-xjc-plugins.zip Which does not work due to:
The problem is explained here: With So from my point of view this does not work. But if it does, it must be very easy to prove. Just show an example of |
I am getting:
.. like classes that are part of jre 10 are missing that is really strange. |
Since JDK11 is lacking of wsimport: Is a JDK11 capable version of this plugin planned in the future? |
Indeed wsimport is already removed http://openjdk.java.net/jeps/320 Maybe is possible to add wsimport from another source? AFAIK wsimport was the only option for top-down (WSDL to Java Code) web service generation |
There is |
Just don't call |
In the
Thus I'm always sure which XJC I'm invoking and there are no problems with XJC plugins. Calling |
this works on both JDK 9 and JDK 10 under Linux: tool.wsimport points to JDK_HOME/bin/wsimport <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<executions>
<execution>
<id>wsdl-to-java</id>
<phase>validate</phase>
<goals>
<goal>wsimport</goal>
</goals>
<configuration>
<executable>${tool.wsimport}</executable>
<wsdlDirectory>${wsdl.directory}</wsdlDirectory>
<wsdlFiles>
<wsdlFile>file1.wsdl</wsdlFile>
<wsdlFile>file2.wsdl</wsdlFile>
<wsdlFile>file3.wsdl</wsdlFile>
</wsdlFiles>
<destDir>${project.build.directory}/generated-sources</destDir>
<sourceDestDir>${wsdl.generated.sources}</sourceDestDir>
<destDir>${wsdl.generated.compiled}</destDir>
<target>${jaxws.version}</target>
<useJdkToolchainExecutable>false</useJdkToolchainExecutable>
<xnocompile>false</xnocompile>
<encoding>${encoding}</encoding>
<verbose>false</verbose>
<quiet>true</quiet>
<!-- Enable access to local DTD files -->
<args>
<arg>-J-Djavax.xml.accessExternalDTD=file</arg>
</args>
</configuration>
</execution>
</executions>
</plugin> |
@madduci This does not work with XJC plugins like JAXB2 Basics. |
@highsource i do not use them |
@madduci A lot of people do. And this is advertised as a feature of https://www.mojohaus.org/jaxws-maven-plugin/examples/using-jaxb-plugins.html Which effectively does not work with Java 9 then. |
Any updates on support for this OpenJDK v11 ? |
Just to mention it... |
@Knut-Fjellheim |
Hi @Knut-Fjellheim, http://www.mojohaus.org/jaxws-maven-plugin/examples/using-wstools-from-jdk.html Please check this web page to solve your heterogenous developer environnements problem. Mickael |
@jonnybecker |
@RobotWizard93 |
Has anyone found a workaround for this? |
Hi, Did you know this plugin is available in the official repository of JAXWS => https://github.com/eclipse-ee4j/metro-jax-ws? As you can see, the jaxws-maven-plugin is proposed with the JAXWS implementation => https://github.com/eclipse-ee4j/metro-jax-ws/tree/master/jaxws-ri/jaxws-maven-plugin However, two dependencies are missing com.sun.xml.ws:jaxws-tools-bundle:jar:2.3.1 and com.sun.xml.ws:jaxws-tools-bundle:jar:sources:2.3.1. To fix this problem follow this issue => javaee/metro-jax-ws#1251 (comment) Mickael |
Hi, I created a fork at https://github.com/phax/jaxws-maven-plugin that contains the changes from #71 and works with Java 8 and 11 (hopefully also 9 and 10). It is also available on Maven Central at http://repo2.maven.org/maven2/com/helger/maven/jaxws-maven-plugin/2.6/jaxws-maven-plugin-2.6.pom and acts as a drop-in replacement. Please note the changed Maven group, so it's easy to switch back, once this plugin gets updated. hth, Edit: here are the Maven coordinates in a nicer way: <plugin>
<groupId>com.helger.maven</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>2.6</version>
<configuration>
...
</configuration>
</plugin> |
@phax thanks for your work! Just gave the fork a spin and it seems to behave as advertised 👍 |
…tched: com.helger.maven) to silently moved, but maintained com.sun.xml.ws.jaxws-maven-plugin - which also runs on all major JDKs. This also resolves mojohaus/jaxws-maven-plugin#54 completely
Thanks @phax for your work on the drop-in replacement. For me it worked on JDK 9, 11 & 12 - but sadly not on JDK 8. But throughout digging deeper into the problem I realized, what was already clear somehow: this plugin here is simply NOT maintained anymore - and many thanks to @mickaelbaron for pointing that out: the sources moved over to the JAX-WS reference implementation inside the eclipse-ee4j/metro-jax-ws project under: https://github.com/eclipse-ee4j/metro-jax-ws/tree/master/jaxws-ri/jaxws-maven-plugin To use the maintained version of this plugin, simply replace the old dependency in your OLD!
NEW!
Nevermind the 'lower' version number, the sources have a newer date and adhere to the rest of the JAX-WS sourcecode. |
Hi, <dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>2.3.2</version>
</dependency> works in Java 8 to 12 for my projects. It seems like the plugin follows the versioning scheme of JAX-WS itself. <dependency>
<groupId>com.helger.maven</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>2.6.1</version>
</dependency> since I'm running it without issues on OpenJDK. Do you eventually have something in your endorsed path? |
I'am using the jaxws-maven-plugin inside the wrapper project called https://github.com/codecentric/cxf-spring-boot-starter-maven-plugin - there I execute the plugin with the help of the https://github.com/TimMoore/mojo-executor, which isn't kind of a standard way I guess. Inside the BootCxfMojo.java class (not inside the current version though, since I switched to
Here's the build log: https://travis-ci.org/codecentric/cxf-spring-boot-starter-maven-plugin/builds/548073656?utm_source=github_status&utm_medium=notification For me I sounds like that adding |
Ah okay - Gradle is tricky here, because it doesn't support JDK version based profile activation. Since jaxws-tools 2.3.2 requires Java 9 or later this doesn't work. |
I don't understand. I get this error : Error injecting: private org.eclipse.aether.spi.log.Logger org.apache.maven.repository.internal.DefaultVersionRangeResolver.logger |
Well, maybe your Eclipse version is too old - no idea. Nevertheless if |
I am not using Eclipse, I am using Netbeans what's why I can't understand where this dependency comes from. Something requires that logger and the version is not aligned correctly ... |
… incompatibilty with old JDK8 versions (see mojohaus/jaxws-maven-plugin#54 (comment) and http://www.rultor.com/t/19307-1). So let's try to use yegor256/rultor as a workaround, until we shift away from rultor somewhere in the future.
See pull request #71 for a solution of this issue |
Just use this fork: https://github.com/phax/jaxws-maven-plugin. It works with Java 9-13. I'm using it with Java 13 right now and is all good! |
… incompatibilty with old JDK8 versions (see mojohaus/jaxws-maven-plugin#54 (comment) and http://www.rultor.com/t/19307-1). So let's try to use yegor256/rultor as a workaround, until we shift away from rultor somewhere in the future.
Because using of unsupported option:
-Xbootclasspath/p is no longer a supported option.
Usage:
jaxws-maven-plugin/src/main/java/org/codehaus/mojo/jaxws/AbstractJaxwsMojo.java
Line 442 in 3f61d07
In java 9 there is option to replace those: https://bugs.openjdk.java.net/browse/JDK-8061972
But it need module name not jar so will be hard to use it.
Is this endorse mechanizm needed?
The text was updated successfully, but these errors were encountered: