gpt4 book ai didi

java - Maven JAX-WS WSGEN "Class not found error"

转载 作者:行者123 更新时间:2023-12-01 15:28:41 25 4
gpt4 key购买 nike

当我尝试编译我的程序时。我收到以下错误消息:

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默认的,所以你不必设置它。

关于java - Maven JAX-WS WSGEN "Class not found error",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9844938/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com