2013-10-16 47 views
0

我想用CXF使用maven代。我如何設置包含所有wsdl文件的sourceroot目錄,然後告訴maven只需選擇任何wsdl併爲發現的任何wsdl創建一個客戶端?如何在maven中使用帶有通配符的CXF wsdl客戶端?

到目前爲止,它只有直接指定例如FooService纔有效。但我不希望在pom.xml手動添加像20個服務:

<plugin> 
    <groupId>org.apache.cxf</groupId> 
    <artifactId>cxf-codegen-plugin</artifactId> 
    <version>${cxf.version}</version> 
    <executions> 
     <execution> 
      <id>generate-sources</id> 
      <phase>generate-sources</phase> 
      <configuration> 
       <sourceRoot>${project.build.directory}/generated-sources/cxf</sourceRoot> 
       <wsdlOptions> 
        <wsdlOption> 
         <!-- How can I use wildcards here??? --> 
         <wsdl>${project.basedir}/src/main/resources/wsdl/FooService.wsdl</wsdl> 
        </wsdlOption> 
       </wsdlOptions> 
      </configuration> 
      <goals> 
       <goal>wsdl2java</goal> 
      </goals> 
     </execution> 
    </executions> 
</plugin> 

回答