gpt4 book ai didi

maven - 如何使用 Axis Tools-maven-plugin 将 WSDL 转换为 Java?

转载 作者:行者123 更新时间:2023-12-04 22:15:30 25 4
gpt4 key购买 nike

我配置axistools-maven-plugin如下:

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>axistools-maven-plugin</artifactId>
<version>1.4</version>
<configuration>
<wsdlDirectory>/src/main/resources</wsdlDirectory>
<wsdlFiles>
<wsdlFile>adjustment.wsdl</wsdlFile>
</wsdlFiles>
<keep>true</keep>
<allElements>true</allElements>
<outputDirectory>/src/main/java</outputDirectory>
<subPackageByFileName>true</subPackageByFileName>
<useEmitter>true</useEmitter>
<wsdlVersion>2</wsdlVersion>
</configuration>
<executions>
<execution>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>

但我的 wsdl 文件没有被正确引用。配置是否正确?

我总是收到以下信息消息
[INFO] Nothing to generate. All WSDL files are up to date.

最佳答案

对我来说,它是目录参数名称。不是<wsdlDirectory>但是 <sourceDirectory> .无论如何,这是我的工作配置:

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>axistools-maven-plugin</artifactId>
<version>1.4</version>
<configuration>
<!-- A directory where the WSDL files reside: -->
<sourceDirectory>${basedir}/src/main/resources/</sourceDirectory>
<!-- The list of WSDL files: -->
<wsdlFiles>
<wsdlFile>services.wsdl</wsdlFile>
</wsdlFiles>
<allElements>true</allElements>
<!-- Where you want the generated files: -->
<outputDirectory>${basedir}/src/main/java</outputDirectory>
<subPackageByFileName>true</subPackageByFileName>
<useEmitter>false</useEmitter>
<verbose>true</verbose>
</configuration>
<executions>
<execution>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>

关于maven - 如何使用 Axis Tools-maven-plugin 将 WSDL 转换为 Java?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7793501/

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