Skip to main content
JAX-WS Maven plugin –

Using xjc plugins

<project>
  ...
  <dependencies>
      ...
    <dependency>
      <groupId>com.sun.xml.ws</groupId>
      <artifactId>jaxws-rt</artifactId>
      <version>3.0.0</version>
    </dependency>
    <!-- to compile xjc-generated sources -->
    <dependency>
      <groupId>org.jvnet.jaxb2_commons</groupId>
      <artifactId>jaxb2-basics-runtime</artifactId>
      <version>0.6.4</version>
    </dependency>
    ...
  </dependencies>
  ...
  <build>
    ...
    <plugins>
      ...
      <plugin>
        <groupId>com.sun.xml.ws</groupId>
        <artifactId>jaxws-maven-plugin</artifactId>
        <version>3.0.0</version>
        <dependencies>
          <!-- put xjc-plugins on the jaxws-maven-plugin's classpath -->
          <dependency>
            <groupId>org.jvnet.jaxb2_commons</groupId>
            <artifactId>jaxb2-basics</artifactId>
            <version>0.6.4</version>
          </dependency>
        </dependencies>
        <configuration>
          <!-- tell Eclipse Implementation of JAXB to actually use xjc-plugins -->
          <xjcArgs>
            <xjcArg>-Xequals</xjcArg>
            <xjcArg>-XtoString</xjcArg>
          </xjcArgs>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>wsimport</goal>
            </goals>
          </execution>
          <configuration>
            <wsdlUrls>
              <wsdlUrl>http://footballpool.dataaccess.eu/data/info.wso?WSDL</wsdlUrl>
            </wsdlUrls>
          </configuration>
        </executions>
      </plugin>
      ...
    </plugins>
    ...
  <build>
  ...
</project>

Back to the top