简体   繁体   English

为什么 jaxws-maven-plugin 忽略 my.WSDL 文件?

[英]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.

相关问题 jaxws-maven-plugin 解析相对于类位置的 WSDL 位置,为什么? - jaxws-maven-plugin resolving WSDL location relative to class location, why? 为什么当我从 jaxws-maven-plugin 生成 wsdl 类时,由于缺少 ProviderImpl,它们无法在运行时运行? - Why when I generate wsdl classes from jaxws-maven-plugin they fail to run at runtime because of missing ProviderImpl? jaxws-maven-plugin或jaxb2-maven-plugin从WSDL创建Java类 - jaxws-maven-plugin or jaxb2-maven-plugin to create java classes from WSDL JAXWS:为什么要通过jaxws-maven-plugin在maven内生成客户端代码? - JAXWS: Why would one generate the client code within maven through jaxws-maven-plugin? jaxws-maven-plugin 多次执行不起作用 - jaxws-maven-plugin multiple executions not working 使用带有 -clientjar 选项的 jaxws-maven-plugin - Using jaxws-maven-plugin with -clientjar option 运行 jaxws-maven-plugin 时出现 MojoExecutionException - MojoExecutionException while run jaxws-maven-plugin 通过HTTPS使用WSDL中的jaxws-maven-plugin生成源代码 - Generating source code with jaxws-maven-plugin from WSDL over HTTPS 连接被拒绝 - jaxws 目录与 jaxws-maven-plugin 结合使用 - Connection refused - jaxws catalog in combination with jaxws-maven-plugin jaxws-maven-plugin,maven-uncunciate-plugin示例? - jaxws-maven-plugin, maven-enunciate-plugin example?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM