dev@wadl.java.net

WADL Maven Plugin

From: Wilfred Springer <wilfred_at_agilejava.com>
Date: Fri, 13 Oct 2006 15:39:51 +0200

All,

Find a first crude version of a Maven plugin included in the enclosed
tar file. (Unzip this file in the root of the SVN checkout.)

The pom.xml file below illustrates how to use the Maven plugin. This
example assumes that the Yahoo WADL and XSD files are located in
src/main/wadl. By default, the plugin will scan this directory for
*.wadl files, but you can override both the source directory as well as
the include patterns. Since the plugin is bound to the generate-sources
phase by default, it will automatically kick in before the compilation
phase. The plugin will make sure that the new source files will be
included in compilation.

<?xml version="1.0"?>
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>wadl</groupId>
  <artifactId>wadl2java-sample</artifactId>
  <version>1.0-SNAPSHOT</version>
  <name>WADL2Java Sample</name>
  <description>
    A simple example, illustrating how to use the Maven plugin.
  </description>
  <dependencies>
    <dependency>
      <groupId>wadl</groupId>
      <artifactId>wadl2java</artifactId>
      <version>1.0-SNAPSHOT</version>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>wadl</groupId>
        <artifactId>wadl2java-maven-plugin</artifactId>
        <version>1.0-SNAPSHOT</version>
        <executions>
          <execution>
            <goals>
              <goal>generate</goal>
            </goals>
            <configuration>
              <packageName>com.agilejava.yahoo</packageName>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>


Cheers,

Wilfred