maven-plugins/jellydoc/plugin.jelly
jstrachan 75b0cb84d3 Patch to fix the jellydoc plugin so that it actually works on other projects :-).
This patch not only removes the oodles of wraning messages that jellydoc was causing but also it now manages to find some tags now! :-)
The main issue was that the Jelly library wasn't on the classpath and so the tag inheritence/interface implementation couldn't be found and so no tags were found.
Now fixed


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@112859 13f79535-47bb-0310-9956-ffa450edef68
2003-02-08 11:40:25 +00:00

92 lines
3.0 KiB
XML

<?xml version="1.0"?>
<project
xmlns:j="jelly:core"
xmlns:maven="jelly:maven"
xmlns:m="maven">
<!-- ================================================================== -->
<!-- GENERATE THE XML DOCUMENTATION -->
<!-- ================================================================== -->
<goal name="jellydoc" prereqs="jellydoc:doclet"
description="Generates the tag documentation">
<mkdir dir="${maven.build.dir}/generated-xdocs"/>
<j:file name="${maven.build.dir}/generated-xdocs/tags.xml">
<!-- the following should be way easier - j:include should support files -->
<j:new var="file" className="java.io.File">
<j:arg value="${plugin.resources}/${plugin.artifactId}.jelly"/>
</j:new>
<!--
<echo>About to include ${file.toURL()}</echo>
-->
<j:include uri="${file.toURL().toString()}"/>
</j:file>
</goal>
<!-- runs the Tag doclet -->
<goal name="jellydoc:doclet" prereqs="jellydoc:init"
description="A doclet which outputs all the Jelly tag related metadata as XML">
<j:if test="${context.getVariable('maven.jellydoc.packages') == null}">
<j:set var="maven.jellydoc.packages" value="${pom.package}.*"/>
</j:if>
<echo>Generating jellydoc for packages ${maven.jellydoc.packages}</echo>
<mkdir dir="target"/>
<echo>Source directory is ${basedir}/${pom.build.sourceDirectory}</echo>
<javadoc
sourcepath="${basedir}/${pom.build.sourceDirectory}"
packagenames="${maven.jellydoc.packages}"
classpathref="doclet.classpath"
docletpathref="doclet.classpath"
doclet="org.apache.maven.jellydoc.TagXMLDoclet">
</javadoc>
<!-- if ran inside the reactor then lets copy the generated file -->
<copy tofile="${maven.build.dir}/taglib.xml" file="${user.dir}/target/taglib.xml"/>
</goal>
<!-- runs the XML doclet -->
<goal name="jellydoc:xml-doclet" prereqs="jellydoc:init"
description="Creates an XML representation of the doclet information">
<javadoc
sourcepath="${basedir}/${pom.build.sourceDirectory}"
packagenames="${pom.package}.*"
classpathref="doclet.classpath"
docletpathref="doclet.classpath"
doclet="org.apache.maven.jellydoc.XMLDoclet">
</javadoc>
</goal>
<!-- sets the classpath used for doclet invocations -->
<goal name="jellydoc:init">
<!-- just in case this is ran before a compile -->
<mkdir dir="${maven.build.dir}"/>
<path id="doclet.classpath">
<path refid="maven.dependency.classpath"/>
<pathelement path="${plugin.dir}"/>
<pathelement path="${plugin.getDependencyPath('javadoc')}"/>
<pathelement path="${plugin.getDependencyPath('nekohtml')}"/>
<pathelement path="${plugin.getDependencyPath('dom4j')}"/>
<pathelement path="${plugin.getDependencyPath('xerces')}"/>
<pathelement path="${plugin.getDependencyPath('xml-apis')}"/>
<pathelement path="${plugin.getDependencyPath('commons-jelly')}"/>
</path>
</goal>
</project>