After tried several thing as posted by me on :
Unable to do wsdl generation by maven plugin
I find the below issue after trying with several versions of mojo jaxws plugin which is already discussed in a site:
Get "java.lang.NoClassDefFoundError" though the class is in the classpath
So as per the suggestion I tried to add the tools jar in the plugin section just above org.codehaus.mojo. I think this what it is suggested and one of the guy find the solution.
<plugin>
<dependencies>
<dependency>
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
<version>1.7</version>
<scope>system</scope>
<systemPath>${JAVA_HOME}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>${jaxws-maven-plugin.version}</version>
</plugin>
But trying that ended up having the below issue: Please provide any suggestion , if I am going wrong anywhere.
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) jdk.tools:jdk.tools:jar:1.7
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=jdk.tools -DartifactId=jdk.tools -Dversion=1.7 -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=jdk.tools -DartifactId=jdk.tools -Dversion=1.7 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) org.codehaus.mojo:jaxws-maven-plugin:maven-plugin:1.9
2) jdk.tools:jdk.tools:jar:1.7
----------
1 required artifact is missing.
for artifact:
org.codehaus.mojo:jaxws-maven-plugin:maven-plugin:1.9
from the specified remote repositories:
releases (https://dsnexus.us.hibm.hex:8081/nexus/content/repositories/releases),
dsnexus-snapshots (https://dsnexus.us.hibm.hex:8081/nexus/content/repositories/snapshots),
R2 (http://dsnexus.us.hibm.hex:8081/nexus/content/groups/public),
snapshots (https://dsnexus.us.hibm.hex:8081/nexus/content/repositories/snapshots),
jboss (http://repository.jboss.org/nexus/content/groups/public-jboss),
dsnexus (https://dsnexus.us.hibm.hex:8081/nexus/content/groups/prd)
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Missing: