> It would be nice if there was an example of this that did not depend on
> maven.
I did something like this in the ant file:
<target name="-pre-dist">
<path id="project.classpath"
path="${javac.classpath}:${j2ee.platform.classpath}"/>
<javadoc access="public" classpathref="project.classpath">
<fileset dir="${src.dir}" defaultexcludes="yes">
<include name="**/*.java" />
</fileset>
<fileset dir="${project.ReservationPortalLib}/src"
defaultexcludes="yes">
<include name="**/*.java" />
</fileset>
<doclet name="com.sun.jersey.wadl.resourcedoc.ResourceDoclet"
pathref="project.classpath">
<param name="-output"
value="/media/MAGAZYN/netbeans_projects/R24/${build.classes.dir}/resourcedoc.xml"
/>
</doclet>
</javadoc>
</target>
And this in the web.xml:
<filter>
<filter-name>Jersey Filter</filter-name>
<filter-class>com.sun.jersey.spi.container.servlet.ServletContainer</filter-class>
<init-param>
<param-name>com.sun.jersey.config.feature.Redirect</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>rpb.service;rpb.util.rs</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.property.WebPageContentRegex</param-name>
<param-value>/(img|css|jsp|js|files)/.*</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.property.WadlGeneratorConfig</param-name>
<param-value>rpb.util.rs.DocWadlGeneratorConfig</param-value>
</init-param>
</filter>
And the config class:
public class DocWadlGeneratorConfig extends WadlGeneratorConfig {
@Override
public List<WadlGeneratorDescription> configure() {
return generator( WadlGeneratorApplicationDoc.class )
.prop( "applicationDocsStream", "application-doc.xml" )
.generator( WadlGeneratorGrammarsSupport.class )
.prop( "grammarsStream", "application-grammars.xml" )
.generator( WadlGeneratorResourceDocSupport.class )
.prop( "resourceDocStream", "resourcedoc.xml" )
.descriptions();
}
}
--
Adam Walczak
www.adamwalczak.info
+48 604 188 992