Skip to content

Commit 804abb6

Browse files
committed
#27 Move from deprecated and org.codehaus.mojo.jaxws-maven-plugin (patched: 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
1 parent f31cbf4 commit 804abb6

File tree

2 files changed

+29
-17
lines changed

2 files changed

+29
-17
lines changed

README.md

+26-10
Original file line numberDiff line numberDiff line change
@@ -104,27 +104,43 @@ Therefore we add the JAX-WS runtime to our pom.xml:
104104
</dependency>
105105
```
106106

107-
Sadly the jaxws-maven-plugin [isn't JDK11 (nor JDK9) compatible](https://github.com/mojohaus/jaxws-maven-plugin/issues/54) atm! Therefore we use the a drop-in replacement inside our [BootCxfMojo](cxf-spring-boot-starter-maven-plugin/src/main/java/de/codecentric/cxf/BootCxfMojo.java), where this is fixed until the plugin gets released:
107+
Sadly the jaxws-maven-plugin [isn't JDK11 (nor JDK9) compatible](https://github.com/mojohaus/jaxws-maven-plugin/issues/54) atm!
108+
109+
__BUT__: Thanks so much to [mickaelbaron](https://github.com/mojohaus/jaxws-maven-plugin/issues/54#issuecomment-434323813) for stating, that the [mojohaus/jaxws-maven-plugin](https://github.com/mojohaus/jaxws-maven-plugin) is just deprecated and moved silently to [eclipse-ee4j/metro-jax-ws/jaxws-ri/jaxws-maven-plugin/](https://github.com/eclipse-ee4j/metro-jax-ws/tree/master/jaxws-ri/jaxws-maven-plugin)!!!
108110

109111
```
110112
plugin(
111-
groupId("com.helger.maven"),
113+
groupId("com.sun.xml.ws"),
112114
artifactId("jaxws-maven-plugin"),
113-
version("2.6"),
115+
version("2.3.2"),
114116
dependencies(
115117
dependency(
116118
"org.jvnet.jaxb2_commons",
117119
"jaxb2-namespace-prefix",
118-
"1.3"),
119-
dependency(
120-
"com.sun.xml.ws",
121-
"jaxws-tools",
122-
"2.3.2"))
120+
"1.3"))
123121
),
124122
```
125123

126-
This also needs the `com.sun.xml.ws.jaxws-tools` to be on the classpath, so we add this as a dependency too.
124+
With this maintained version of [com.sun.xml.ws.jaxws-maven-plugin](https://mvnrepository.com/artifact/com.sun.xml.ws/jaxws-maven-plugin) we are also able to run on all major JDK versions like a charm!
125+
126+
127+
##### Build on multiple JDKs locally
128+
129+
On our local machine in most situations we only have one JDK installation. There are solutions like [jenv](https://www.jenv.be/), but as I really like Docker, we can also run our builds with it:
130+
131+
```
132+
# OpenJDK 13 (latest version)
133+
docker run --rm -v "$PWD":/build/our/plugin -w /build/our/plugin maven:3-jdk-13 bash -c "mvn clean install"
134+
135+
# OpenJDK 12 (latest version)
136+
docker run --rm -v "$PWD":/build/our/plugin -w /build/our/plugin maven:3-jdk-12 bash -c "mvn clean install"
137+
138+
# OpenJDK 11 (latest version)
139+
docker run --rm -v "$PWD":/build/our/plugin -w /build/our/plugin maven:3-jdk-11 bash -c "mvn clean install"
127140
141+
# OpenJDK 8 (latest version)
142+
docker run --rm -v "$PWD":/build/our/plugin -w /build/our/plugin maven:3-jdk-8 bash -c "mvn clean install"
143+
```
128144

129145
### Integration testing the plugin
130146

@@ -515,7 +531,7 @@ public class CxfSpringBootStarterMavenPluginIntegrationTest {
515531

516532

517533
[cxf-spring-boot-starter]:https://github.com/codecentric/cxf-spring-boot-starter
518-
[jaxws-maven-plugin]:http://www.mojohaus.org/jaxws-maven-plugin/
534+
[jaxws-maven-plugin]:https://github.com/eclipse-ee4j/metro-jax-ws/tree/master/jaxws-ri/jaxws-maven-plugin
519535
[mojo-executor]:https://github.com/TimMoore/mojo-executor
520536
[stackoverflow:eclipse-m2e-lifecycle]:http://stackoverflow.com/a/26447353/4964553
521537
[bipro.net]:https://www.bipro.net/

cxf-spring-boot-starter-maven-plugin/src/main/java/de/codecentric/cxf/BootCxfMojo.java

+3-7
Original file line numberDiff line numberDiff line change
@@ -95,18 +95,14 @@ private void generateJaxbClassFiles(File wsdl, String jaxwsMavenPluginGoal, Stri
9595
* in 2015, where it is developed further: https://github.com/mojohaus/jaxws-maven-plugin
9696
*/
9797
plugin(
98-
groupId("com.helger.maven"),
98+
groupId("com.sun.xml.ws"),
9999
artifactId("jaxws-maven-plugin"),
100-
version("2.6"),
100+
version("2.3.2"),
101101
dependencies(
102102
dependency(
103103
"org.jvnet.jaxb2_commons",
104104
"jaxb2-namespace-prefix",
105-
"1.3"),
106-
dependency(
107-
"com.sun.xml.ws",
108-
"jaxws-tools",
109-
"2.3.2"))
105+
"1.3"))
110106
),
111107
goal(jaxwsMavenPluginGoal),
112108
configuration(

0 commit comments

Comments
 (0)