logo Apache CXF Code Generation Maven2 Plugins

homepage: cxf.apache.org
fresh index:
last release: 1 month ago, first release: 1 decade ago
packaging: maven-plugin
get this artifact from: central jboss nuxeo
see this artifact on: search.maven.org


Display vulnerabilities (snyk): Vulnerability check

This chart shows how much is this artifact used as a dependency in other Maven artifacts in Central repository and GitHub:


select version:

Add this snippet into pom.xml inside tag <project><build><plugins>:




Switch to artifact.
goals:
cxf-codegen:help

Display help information on cxf-codegen-plugin. Call mvn cxf-codegen:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.

cxf-codegen:wsdl2java (phase: generate-sources)
cxf-codegen:wsdl2js (phase: generate-sources)

Often used code snippets:

<plugin>
  <groupId>org.apache.cxf</groupId>
  <artifactId>cxf-codegen-plugin</artifactId>
  <executions>
    <execution>
      <id>generate-sources</id>
      <phase>generate-sources</phase>
      <configuration>
        <wsdlOptions>
          <wsdlOption>
            <extraargs>
              <extraarg>-p</extraarg>
                                                                    Note: be careful when changing this - must be in sync for all schemas generations in this namespace!
                                        
              
              <extraarg>
                                            urn:riv13606:v1.1=se.rivta.en13606.ehrextract.v11
                                        </extraarg>
            </extraargs>
            <wsdl>${basedir}/interactions/ehr_extract/RIV13606.wsdl</wsdl>
          </wsdlOption>
          <wsdlOption>
            <wsdl>${basedir}/interactions/npo/NPO_1.1.2.wsdl</wsdl>
          </wsdlOption>
          <wsdlOption>
            <wsdl>${basedir}/interactions/care_system/CARE_SYSTEM_1.1.2.wsdl</wsdl>
          </wsdlOption>
        </wsdlOptions>
      </configuration>
      <goals>
        <goal>wsdl2java</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.apache.cxf</groupId>
  <artifactId>cxf-codegen-plugin</artifactId>
  <executions>
    <execution>
      <id>generate-sources</id>
      <phase>generate-sources</phase>
      <configuration>
        <wsdlOptions>
          <wsdlOption>
            <wsdl>${basedir}/schemas/sokvagval-info-v2.wsdl</wsdl>
          </wsdlOption>
        </wsdlOptions>
      </configuration>
      <goals>
        <goal>wsdl2java</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.apache.cxf</groupId>
  <artifactId>cxf-codegen-plugin</artifactId>
  <executions>
    <execution>
      <id>generate-test-sources</id>
      <phase>generate-test-sources</phase>
      <configuration>
        <wsdlOptions>
          <wsdlOption>
            <wsdl>${basedir}/src/test/resources/wsdl/CustomerService.wsdl</wsdl>
            <bindingFiles>
              <bindingFile>${basedir}/src/test/resources/wsdl/binding.xml</bindingFile>
            </bindingFiles>
          </wsdlOption>
        </wsdlOptions>
        <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
      </configuration>
      <goals>
        <goal>wsdl2java</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.apache.cxf</groupId>
  <artifactId>cxf-codegen-plugin</artifactId>
  <executions>
    <execution>
      <id>generate-sources</id>
      <phase>generate-sources</phase>
      <configuration>
        <wsdlOptions>
          <wsdlOption>
            <wsdl>${basedir}/src/main/resources/wsdl/MonitoringService_v1.wsdl</wsdl>
          </wsdlOption>
        </wsdlOptions>
        <disableDirectoryScan>true</disableDirectoryScan>
        <fork>once</fork>
      </configuration>
      <goals>
        <goal>wsdl2java</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<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>
        <fork>once</fork>
        <wsdlOptions>
          <wsdlOption>
            <wsdl>${basedir}/src/main/resources/model/LocatorService.wsdl</wsdl>
            <extraargs>
              <extraarg>-client</extraarg>
            </extraargs>
          </wsdlOption>
        </wsdlOptions>
      </configuration>
      <goals>
        <goal>wsdl2java</goal>
      </goals>
    </execution>
  </executions>
</plugin>

© Jiri Pinkas 2015 - 2022. All rights reserved! Admin login To submit bugs / feature requests please use this github page
related: JavaVids | Top Java Blogs | Java školení
Apache and Apache Maven are trademarks of the Apache Software Foundation. The Central Repository is a service mark of Sonatype, Inc.