Some patches so that the plugin works inside the reactor

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@112855 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
jstrachan 2003-02-07 17:10:26 +00:00
parent 01cbf95200
commit 23bfa613b7
3 changed files with 18 additions and 4 deletions

View File

@ -38,13 +38,23 @@
<echo>Generating jellydoc for packages ${maven.jellydoc.packages}</echo> <echo>Generating jellydoc for packages ${maven.jellydoc.packages}</echo>
<mkdir dir="target"/>
<echo>Source directory is ${basedir}/${pom.build.sourceDirectory}</echo>
<javadoc <javadoc
sourcepath="${pom.build.sourceDirectory}" sourcepath="${basedir}/${pom.build.sourceDirectory}"
packagenames="${maven.jellydoc.packages}" packagenames="${maven.jellydoc.packages}"
docletpathref="doclet.classpath" docletpathref="doclet.classpath"
doclet="org.apache.maven.jellydoc.TagXMLDoclet"> doclet="org.apache.maven.jellydoc.TagXMLDoclet">
</javadoc> </javadoc>
<!-- if ran inside the reactor then lets copy the generated file -->
<j:new var="file" className="java.io.File">
<j:arg value="target/taglib.xml"/>
</j:new>
<copy tofile="${maven.build.dir}/taglib.xml" file="${user.dir}/target/taglib.xml"/>
</goal> </goal>
<!-- runs the XML doclet --> <!-- runs the XML doclet -->
@ -52,7 +62,7 @@
description="Creates an XML representation of the doclet information"> description="Creates an XML representation of the doclet information">
<javadoc <javadoc
sourcepath="${pom.build.sourceDirectory}" sourcepath="${basedir}/${pom.build.sourceDirectory}"
packagenames="${pom.package}.*" packagenames="${pom.package}.*"
docletpathref="doclet.classpath" docletpathref="doclet.classpath"
doclet="org.apache.maven.jellydoc.XMLDoclet"> doclet="org.apache.maven.jellydoc.XMLDoclet">

View File

@ -1,5 +1,5 @@
/* /*
* /home/cvs/maven-plugins/jellydoc/src/main/org/apache/maven/jellydoc/TagXMLDoclet.java,v 1.1 2003/02/07 12:10:44 jstrachan Exp * /home/cvs/jakarta-turbine-maven/src/plugins-build/jellydoc/src/main/org/apache/maven/jellydoc/TagXMLDoclet.java,v 1.1 2003/02/07 12:10:44 jstrachan Exp
* 1.1 * 1.1
* 2003/02/07 12:10:44 * 2003/02/07 12:10:44
* *
@ -107,6 +107,10 @@ public class TagXMLDoclet extends Doclet {
private Attributes emptyAtts = new AttributesImpl(); private Attributes emptyAtts = new AttributesImpl();
public TagXMLDoclet (RootDoc root) throws Exception { public TagXMLDoclet (RootDoc root) throws Exception {
System.err.println( "basedir: " + System.getProperty("basedir"));
System.err.println( "user.dir: " + System.getProperty("user.dir"));
FileOutputStream writer = new FileOutputStream(targetFileName); FileOutputStream writer = new FileOutputStream(targetFileName);
OutputFormat format = OutputFormat.createPrettyPrint(); OutputFormat format = OutputFormat.createPrettyPrint();
XMLWriter xmlWriter = new XMLWriter(writer, format); XMLWriter xmlWriter = new XMLWriter(writer, format);

View File

@ -5,7 +5,7 @@
xmlns:jsl="jelly:jsl"> xmlns:jsl="jelly:jsl">
<j:new var="file" className="java.io.File"> <j:new var="file" className="java.io.File">
<j:arg value="target/taglib.xml"/> <j:arg value="${maven.build.dir}/taglib.xml"/>
</j:new> </j:new>
<x:parse var="doc" xml="${file}"/> <x:parse var="doc" xml="${file}"/>