Java jaxws:wsgen:goal不生成存根
我正在尝试构建一个web服务客户端。我正在使用maven 3.0.5来管理我的项目,我想使用wsimport目标来生成我的客户机存根。我已经阅读了如何配置pom以实现这一点的示例。当我运行mvn清理安装时,不会生成存根。下面是我的pom和运行mvn-X clean install的输出摘录。我尝试使用org.jvnet.jax-ws-commons版本的插件,因为org.codehaus.mojo版本很旧。有人能告诉我我做错了什么吗?多谢各位 这是我的pom:Java jaxws:wsgen:goal不生成存根,java,web-services,maven,wsimport,Java,Web Services,Maven,Wsimport,我正在尝试构建一个web服务客户端。我正在使用maven 3.0.5来管理我的项目,我想使用wsimport目标来生成我的客户机存根。我已经阅读了如何配置pom以实现这一点的示例。当我运行mvn清理安装时,不会生成存根。下面是我的pom和运行mvn-X clean install的输出摘录。我尝试使用org.jvnet.jax-ws-commons版本的插件,因为org.codehaus.mojo版本很旧。有人能告诉我我做错了什么吗?多谢各位 这是我的pom: <project xmlns
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.group.app</groupId>
<artifactId>ProjectName</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>ProjectName Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.2.8</version>
</dependency>
</dependencies>
<build>
<finalName>ProjectName</finalName>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.jvnet.jax-ws-commons</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>basic</id>
<phase>generate-sources</phase>
<goals>
<goal>wsimport</goal>
</goals>
</execution>
</executions>
<configuration>
<packageName>src/main/webapp/WEB-INF/classes/client_support</packageName>
<wsdlLocation>http://localhost:8080/wsdlLocation</wsdlLocation>
<destDir>src/main/webapp/WEB-INF/classes/</destDir>
<verbose>true</verbose>
<target>2.1</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
下面是我尝试部署服务时tomcat日志文件的摘录
Jun 18, 2014 11:47:28 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class com.sun.xml.ws.transport.http.servlet.WSServletContextListener
com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11: failed to parse runtime descriptor: runtime modeler error:
Wrapper class path.to.jaxws.FaultBean is not found. Have you run APT to generate them? at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:118)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4701)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5204)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5199)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: com.sun.xml.ws.model.RuntimeModelerException: runtime modeler error:
Wrapper class path.to.jaxws.FaultBean is not found. Have you run APT to generate them?
at com.sun.xml.ws.model.RuntimeModeler.getClass(RuntimeModeler.java:287)
at com.sun.xml.ws.model.RuntimeModeler.processExceptions(RuntimeModeler.java:1006)
at com.sun.xml.ws.model.RuntimeModeler.processRpcMethod(RuntimeModeler.java:969)
at com.sun.xml.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:546)
at com.sun.xml.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:371)
at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:258)
at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:322)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:188)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptor Parser.java:253)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.j ava:147)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServlet ContextListener.java:108)
... 7 more
但是,在运行mvn-X clean install之后,项目构建成功,既没有创建支持存根,也没有创建包含它的包。谢谢你的帮助
Jun 18, 2014 11:47:28 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class com.sun.xml.ws.transport.http.servlet.WSServletContextListener
com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11: failed to parse runtime descriptor: runtime modeler error:
Wrapper class path.to.jaxws.FaultBean is not found. Have you run APT to generate them? at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:118)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4701)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5204)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5199)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: com.sun.xml.ws.model.RuntimeModelerException: runtime modeler error:
Wrapper class path.to.jaxws.FaultBean is not found. Have you run APT to generate them?
at com.sun.xml.ws.model.RuntimeModeler.getClass(RuntimeModeler.java:287)
at com.sun.xml.ws.model.RuntimeModeler.processExceptions(RuntimeModeler.java:1006)
at com.sun.xml.ws.model.RuntimeModeler.processRpcMethod(RuntimeModeler.java:969)
at com.sun.xml.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:546)
at com.sun.xml.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:371)
at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:258)
at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:322)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:188)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptor Parser.java:253)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.j ava:147)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServlet ContextListener.java:108)
... 7 more