[英]Why is jaxws-maven-plugin ignoring my .WSDL file?
I am using the jaxws-maven-plugin from MojoHaus to generate Java classes from a.WSDL file in my repository following the example here .我正在使用 MojoHaus 的 jaxws-maven-plugin 从我的存储库中的 a.WSDL 文件生成 Java 类,遵循此处的示例。
pom.xml: pom.xml:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<goals>
<goal>wsimport</goal>
</goals>
</execution>
</executions>
<configuration>
<wsdlDirectory>resources</wsdlDirectory>
<wsdlFiles>
<wsdlFile>my.wsdl</wsdlFile>
</wsdlFiles>
<keep>true</keep>
<packageName>my.package.name</packageName>
<sourceDestDir>src</sourceDestDir>
<extension>true</extension>
</configuration>
</plugin>
However, when I build the project, I see:但是,当我构建项目时,我看到:
[INFO] --- jaxws-maven-plugin:2.6:wsimport (default) @ MY_PROJECT ---
[INFO] Ignoring: file/path/here/resources/my.wsdl
Why is wsimport ignoring the file I deliberately specified?为什么wsimport会忽略我特意指定的文件? Note that if I do this the "wrong" way by using the <wsdlUrl> tag instead, the files are generated successfully (although the annotations have absolute file paths referencing my machine, which is why I changed it).请注意,如果我通过使用 <wsdlUrl> 标记以“错误”的方式执行此操作,则会成功生成文件(尽管注释具有引用我的机器的绝对文件路径,这就是我更改它的原因)。
The solution is to edit and save the.WSDL file.解决方法是编辑并保存.WSDL文件。 wsimport will not generate the classes if the.WSDL file has not changed since the last time it did so.如果 .WSDL 文件自上次更改后未更改,则 wsimport 将不会生成类。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.