私の仕事では、コード生成のためにjaxws-maven-pluginを使用しました。 私は「おおまかに以下の構造:異なるディレクトリのXSDとWSDL
app/
common/
resource/
some.xsd
client/
resource/
some.wsdl
は、どのように私は、プロジェクト内のWSDLからクラスを生成することができます。 『二つのプロジェクトは、「一般的」であり、「」クライアントの持っている『共通』プロジェクトからXSDを使用して、』クライアントを?
のpom.xml:あなたがリソースをsrc/main/resources/
ディレクトリを使用し、Mavenの規則に固執する必要があり、すべての
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>wsimport</goal>
</goals>
<configuration>
<verbose>true</verbose>
<bindingFiles>
<bindingFile>${project.parent.basedir}/common/resource/some.xsd</bindingFile>
</bindingFiles>
<wsdlFiles>
<wsdlFile>/resource/some.wsdl</wsdlFile>
</wsdlFiles>
</configuration>
</execution>
</executions>
</plugin>
ありがとうございました!私はちょうどすべての相対的な道を通過しようとしています。 –
このリンクに従って、maven wsimportプラグインが使用するデフォルトの場所はsrc/wsdlです。私は、.wsdlはsrc/main/resourcesに保存すべきではないと推測しています。 https://jax-ws-commons.java.net/jaxws-maven-plugin/wsimport-mojo.html – RuntimeException
$ {schema.location}ディレクトリに展開するときにWSDLのXSDをどのように参照しますか? WSDLはXSDの場所をどのように知っていますか? –