[英]Maven JAX-WS WSGEN “Class not found error”
当我尝试编译我的程序时。 我收到以下错误消息:
Failed to execute goal org.jvnet.jax-ws-commons:jaxws-maven-plugin:2.2:wsgen (generate-wsdl) on project SimpleWebServices: Error executing: wsgen [-keep, -s, etc..........
因此,我开始四处寻找错误,并看到以下错误:
Class not found: "com.test.ws.services.SimpleServiceImpl"
似乎由于某种原因,WSGEN无法找到我的价值。 有人有什么想法吗?
如果有兴趣,这是我的POM ...
<plugin>
<groupId>org.jvnet.jax-ws-commons</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>generate-wsdl</id>
<phase>process-classes</phase>
<goals>
<goal>wsgen</goal>
</goals>
<configuration>
<sei>com.test.ws.services.SimpleServiceImpl</sei>
<genWsdl>true</genWsdl>
<verbose>true</verbose>
</configuration>
</execution>
</executions>
</plugin>
用户编辑:我想我明白了(基于@Thomas的建议)。 看来我没有在POM Build区域中指定源文件夹。 结果我的源代码没有被编译。
新增:
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
为我做了把戏。
@Thomas如果您发布答案,我很乐意为您提供答案。
感谢您的回复,
只是使用
mvn clean compile jaxws:wsgen
代替
mvn clean jaxws:wsgen
问题是,没有可用的编译版本。 wsgen
可用于带有ByteCode的JAR之类的类路径。
sourceDirectory
${project.basedir}/src/main/java
是maven的默认设置,因此您不必进行必要设置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.