I am working on a project and trying to migrate from compiler ver. from JDK 1.7 to 1.8. I have received the below error on one of the modules during build and I am not able to solve it.
Failed to execute goal org.codehaus.mojo:jaxws-maven-plugin:2.6:wsimport (default) on project wae-client-jar: Invocation of com.sun.tools.ws.wscompile.WsimportTool failed - check output
I am using IntelliJ
and my Maven
version is 3.6.3
.
Here is the related part of my pom.xml:
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<goals>
<goal>wsimport</goal>
</goals>
</execution>
</executions>
<configuration>
<wsdlDirectory>src/main/wsdl</wsdlDirectory>
<packageName>com.company.wae.client.ebif.eps.sopi.wsdl</packageName>
</configuration>
<dependencies>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.2.10</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.1.6</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-xjc</artifactId>
<version>2.1.6</version>
</dependency>
<dependency>
<groupId>com.company.wae.base</groupId>
<artifactId>wae-jboss-lib</artifactId>
<version>9.8.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
So far I have tried,
-Updating plugin configuration as below
<configuration>
<wsdlDirectory>src/main/wsdl</wsdlDirectory>
<packageName>com.company.wae.client.ebif.eps.sopi.wsdl</packageName>
<vmArgs>
<vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
</vmArgs>
</configuration>
-Changing the version of jaxws-maven-plugin to 2.4.1 and adding below dep. to the plugin
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-tools</artifactId>
<version>2.2.10</version>
</dependency>
-Building the not only that module but whole project as well.
-Deleting jaxws-maven-plugin and jaxws-tools folders from local repo m2.
-Checked the JAVA_HOME path to see if points to JDK1.8. Checked the project SDK (JDK 1.8)
which were all mainly mentioned here.
None of these help.
I was able to solve this issue by fixing the errors when mvn install -e
is used.
First of all I upgraded the jaxb-impl
and jaxb-xjc
versions from 2.1.6
to 2.2.10
.
I added below jaxb-core
and jaxws-tools
dependencies.
Here is the updated part of my pom.xml:
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<goals>
<goal>wsimport</goal>
</goals>
</execution>
</executions>
<configuration>
<wsdlDirectory>src/main/wsdl</wsdlDirectory>
<packageName>com.company.wae.client.ebif.eps.sopi.wsdl</packageName>
</configuration>
<dependencies>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.2.10</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2.10</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-xjc</artifactId>
<version>2.2.10</version>
</dependency>
<dependency>
<groupId>com.company.wae.base</groupId>
<artifactId>wae-jboss-lib</artifactId>
<version>9.8.0</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.3.0.1</version>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-tools</artifactId>
<version>2.2.10</version>
</dependency>
</dependencies>
</plugin>
</plugins>