I am using netbeans with maven 3. When I try to compile with jaxws-maven-plugin, I get the following error.
Here is my pom
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<executions>
<execution>
<id>teamWS</id>
<goals>
<goal>wsgen</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<resourceDestDir>${project.build.directory}/classes/wsdl</resourceDestDir>
<sei>xyz.timerserver.server.TimeServer</sei>
<genWsdl>true</genWsdl>
<keep>true</keep>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
</dependency>
<dependency>
<groupId>javax.jws</groupId>
<artifactId>jsr181-api</artifactId>
<version>1.0-MR1</version>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
</dependency>
</dependencies>
This is the error message that I get. I tried to add tools.jar using system scope dependency but still no luck
Failed to execute goal org.codehaus.mojo:jaxws-maven-plugin:1.10:wsgen (teamWS) on project JWSServer: Failed to execute wsgen: com/sun/mirror/apt/AnnotationProcessorFactory: com.sun.mirror.apt.AnnotationProcessorFactory -> [Help 1]
As a first step, ensure that you're running maven with a correct java version -- jaxws:wsgen (1.12) appears to malfunction with java 7, in such a case use java 6, i.e.:
export JAVA_HOME=/path/to/java/6
-vm /path/to/java/6
For me, this solved the Failed to execute wsgen
caused by com.sun.xml.bind.v2.runtime.IllegalAnnotationsException
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With