domingo, 16 de junio de 2013

Wsdl2Java Maven Goal

<properties>
  <cxf.version.boolean>2.6.0</cxf.version.boolean> 
  <cxf.version>2.5.1</cxf.version>
</properties>

<build>
  <plugins>
    <!-- CXF Code generation -->
    <plugin>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-codegen-plugin</artifactId>
      <version>${cxf.version}</version>
      <executions>
        <execution>
          <phase>generate-sources</phase>          
          <goals>
            <goal>wsdl2java</goal>
          </goals>
          <configuration>
            <wsdlOptions>
              <wsdlOption>
                <wsdl>${basedir}/src/main/resources/wsdl/WebAPI.wsdl</wsdl>
                <autoNameResolution>true</autoNameResolution>
                <extraargs>
                  <!-- Package Destination -->
                  <extraarg>-p</extraarg>
                  <extraarg>org.gustavoalberola</extraarg>
                  <extraarg>-xjc-Xbg</extraarg>
                  <extraarg>-xjc-Xcollection-setter-injector</extraarg>
                  <!-- Binding directory -->
                  <extraarg>-b</extraarg>
                  <extraarg>${basedir}/src/main/resources/wsdl/binding.xml</extraarg> 
                </extraargs>
              </wsdlOption>
            </wsdlOptions>
          </configuration>
        </execution>
      </executions>
      <dependencies>
        <!-- Boolean getters -->
        <dependency>
          <groupId>org.apache.cxf.xjcplugins</groupId>
          <artifactId>cxf-xjc-boolean</artifactId>
          <version>${cxf.version.boolean}</version>
        </dependency>
        <!-- Collection Setters -->
        <dependency>
          <groupId>net.java.dev.vcc.thirdparty</groupId>
          <artifactId>collection-setter-injector</artifactId>
          <version>0.5.0-1</version>
        </dependency>
      </dependencies>
    </plugin>
  </plugins>
</build>

0 comentarios:

Publicar un comentario