Here's a configuration that works for me:
<plugin>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>maven-wadl-plugin</artifactId>
<version>${jersey.version}</version>
<executions>
<execution>
<id>generate</id>
<goals>
<goal>generate</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>
<configuration>
<wadlFile>${project.build.outputDirectory}/application.wadl</wadlFile>
<formatWadlFile>true</formatWadlFile>
<baseUri>
http://factorlab.com/factorlab</baseUri>
<packagesResourceConfig>
<param>com.factorlab.ws</param>
</packagesResourceConfig>
<wadlGenerators>
<wadlGeneratorDescription>
<className>com.sun.jersey.server.wadl.generators.WadlGeneratorApplicationDoc</className>
<properties>
<property>
<name>applicationDocsFile</name>
<value>${basedir}/src/main/doc/application-doc.xml</value>
</property>
</properties>
</wadlGeneratorDescription>
<wadlGeneratorDescription>
<className>com.sun.jersey.server.wadl.generators.WadlGeneratorGrammarsSupport</className>
<properties>
<property>
<name>grammarsFile</name>
<value>${basedir}/src/main/doc/application-grammars.xml</value>
</property>
</properties>
</wadlGeneratorDescription>
<wadlGeneratorDescription>
<className>com.sun.jersey.server.wadl.generators.resourcedoc.WadlGeneratorResourceDocSupport</className>
<properties>
<property>
<name>resourceDocFile</name>
<value>${project.build.outputDirectory}/resourcedoc.xml</value>
</property>
</properties>
</wadlGeneratorDescription>
</wadlGenerators>
</configuration>
</plugin>
Obviously, some specifics may vary (baseUri and packagesResourceConfig), but that's easy to change.
I also included this in the pom to be able to find the plugin and it's dependencies:
<pluginRepositories>
<pluginRepository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net Repository for Maven</name>
<url>
http://download.java.net/maven/2/</url>
<layout>default</layout>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net Repository for Maven</name>
<url>
http://download.java.net/maven/2/</url>
<layout>default</layout>
</repository>
<repository>
<id>glassfish-repository</id>
<name>Java.net Repository for Glassfish</name>
<url>
http://download.java.net/maven/glassfish</url>
</repository>
</repositories>
I don't think the glassfish-repository is necessary for this, but I have it in mine for other reasons.
On Dec 23, 2010, at 8:43 AM, Christopher Piggott wrote:
> This might be a hint:
>
> Downloading: http://repo1.maven.org/maven2/com/sun/jersey/jersey-server/1.4/jersey-server-1.4.bundle
> Unable to find resource 'com.sun.jersey:jersey-server:bundle:1.4' in
> repository central (http://repo1.maven.org/maven2)
>
>
> I don't understand what it means by jer-server-1.4.bundle :(