donaldp 2002/09/14 18:42:30
Modified: info/src/java/org/apache/avalon/framework/tools/xdoclet
AvalonXDoclet.java
info/src/xdocs index.xml menu.xml tasks.xml
Added: info/src/xdocs doclet.xml
Log:
Start filling out more content regarding tasks.
Also rework the XDoclet task such that it does not require that the user
specify that they want to generate componentinfo as it is assumed that they
always want it.
Revision Changes Path
1.2 +5 -7
jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/tools/xdoclet/AvalonXDoclet.java
Index: AvalonXDoclet.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/info/src/java/org/apache/avalon/framework/tools/xdoclet/AvalonXDoclet.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AvalonXDoclet.java 31 Aug 2002 08:17:01 -0000 1.1
+++ AvalonXDoclet.java 15 Sep 2002 01:42:30 -0000 1.2
@@ -8,6 +8,7 @@
package org.apache.avalon.framework.tools.xdoclet;
import xdoclet.DocletTask;
+import org.apache.tools.ant.BuildException;
/**
* A simple XDoclet task that generates the .xinfo files for
@@ -19,13 +20,10 @@
public class AvalonXDoclet
extends DocletTask
{
- private ComponentInfoSubTask m_componentInfoSubTask;
-
- public ComponentInfoSubTask createComponentInfo()
+ protected void start() throws BuildException
{
- m_componentInfoSubTask = new ComponentInfoSubTask();
- addTemplate( m_componentInfoSubTask );
- return m_componentInfoSubTask;
+ super.start();
+ addTemplate( new ComponentInfoSubTask() );
}
}
1.2 +1 -1 jakarta-avalon-excalibur/info/src/xdocs/index.xml
Index: index.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/info/src/xdocs/index.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- index.xml 31 Aug 2002 08:17:01 -0000 1.1
+++ index.xml 15 Sep 2002 01:42:30 -0000 1.2
@@ -2,7 +2,7 @@
<document>
<properties>
- <title>Excalibur Info - Overview</title>
+ <title>Overview</title>
<author email="peter at apache.org">Peter Donald</author>
</properties>
<body>
1.5 +1 -0 jakarta-avalon-excalibur/info/src/xdocs/menu.xml
Index: menu.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/info/src/xdocs/menu.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- menu.xml 14 Sep 2002 08:20:02 -0000 1.4
+++ menu.xml 15 Sep 2002 01:42:30 -0000 1.5
@@ -16,6 +16,7 @@
</menu>
<menu name="Tools">
<item name="Ant Tasks" href="/tasks.html"/>
+ <item name="Doclet Markup" href="/doclet.html"/>
</menu>
</body>
</project>
1.2 +121 -9 jakarta-avalon-excalibur/info/src/xdocs/tasks.xml
Index: tasks.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/info/src/xdocs/tasks.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- tasks.xml 14 Sep 2002 08:20:02 -0000 1.1
+++ tasks.xml 15 Sep 2002 01:42:30 -0000 1.2
@@ -7,27 +7,139 @@
</properties>
<body>
<section name="Introduction">
- <p>The Info toolkit has a number of Ant (and <a
href="xdoclet.html">
- XDoclet</a>) tasks associated with it to ease development.
- The Ant tasks include;</p>
+ <p>The Info toolkit has a number of Ant tasks associated
+ with it to ease development. The tasks include;</p>
<ul>
- <li><a href="#serialize">serialize-info</a>: a task used
+ <li><a href="#infodoclet">infodoclet</a>: a task used
+ to generate the Avalon Info descriptor from the source
+ code of component that has been marked using javadoc
+ tags.</li>
+ <li><a href="#serialize-info">serialize-info</a>: a task used
to compile xml descriptors into a binary format. This is
useful in containers where the overhead of xml descriptors
is not justified.</li>
- <li><a href="#verify">component-verify</a>: a task used
+ <li><a href="#component-verify">component-verify</a>: a task
used
to verify a component class is valid and conforms to its
descriptor.</li>
</ul>
</section>
<section name="Tasks">
+ <subsection name="infodoclet">
+ <p>A task to parse source files and generate Info
+ descriptors based on the way the source files are marked
+ up. The mechanism for marking up source is documented in
+ the <a href="doclet.html">Doclet</a> section.</p>
+ <table>
+ <tr>
+ <th>Attribute</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>destDir</td>
+ <td>This specifies the directory into which all the
generated
+ info descriptors will be placed.</td>
+ </tr>
+ <tr>
+ <td>force</td>
+ <td>A boolean flag indicating whether all info files
+ should be generated even if the info file has been
+ generated after last time source file was
modified.</td>
+ </tr>
+ </table>
+ <p>The <code>infodoclet</code> task also accepts a
+ <code>fileset</code> element via which you define
+ the source files which will be processed to generate the
+ info descriptors.</p>
+
+ <p>Example that generates descriptors for all relevent java
+ files in the <code>src/</code> directory and places them
+ in the <code>target/info</code> directory.</p>
+ <source>
+<![CDATA[
+<taskdef name="infodoclet"
+ classname="org.apache.avalon.framework.tools.xdoclet.AvalonXDoclet">
+ <classpath>
+ <path refid="project.class.path"/>
+ </classpath>
+</taskdef>
+
+<infodoclet destDir="target/info">
+ <fileset dir="src">
+ <include name="**/*.java"/>
+ </fileset>
+</infodoclet>
+]]></source>
+ </subsection>
<subsection name="serialize-info">
- <a name="serialize" />
- <p>TODO: Describe example usage here</p>
+ <p>Compile specified xml descriptors into a binary format
+ that is optimized for loading.</p>
+ <table>
+ <tr>
+ <th>Attribute</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>destDir</td>
+ <td>This specifies the directory into which all
compiled descriptors
+ will be placed. If not specified it defaults to base
directory of the
+ project file.</td>
+ </tr>
+ </table>
+ <p>The <code>serialize-info</code> task also accepts a
+ <code>fileset</code> element via which you define
+ the xml descriptors that will be compiled into the binary
format.</p>
+ <p>Example that compiles all descriptors in <code>src/</code>
+ directory to binary descriptors in the
<code>target/info</code> directory.</p>
+ <source>
+<![CDATA[
+<taskdef name="serialize-info"
+ classname="org.apache.avalon.framework.tools.ant.ComponentVerifierTask">
+ <classpath>
+ <path refid="project.class.path"/>
+ </classpath>
+</taskdef>
+
+<serialize-info destDir="target/info">
+ <fileset dir="src">
+ <include name="**/*-info.xml"/>
+ </fileset>
+</serialize-info>
+]]></source>
</subsection>
<subsection name="component-verify">
- <a name="verify" />
- <p>TODO: Describe example usage here</p>
+ <p>Verify a Component is valid and conforms to its info
+ descriptor.</p>
+ <table>
+ <tr>
+ <th>Attribute</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>classname</td>
+ <td>This defines the name of the component you wish
to verify.</td>
+ </tr>
+ </table>
+ <p>The <code>component-verify</code> task also accepts a
+ <code>classpath</code> element via which you can define
+ the classpath that component is loaded from.</p>
+ <p>Example that verifies component
"org.realityforge.ModelCompiler"</p>
+ <source>
+<![CDATA[
+<taskdef name="info-verify"
+ classname="org.apache.avalon.framework.tools.ant.ComponentVerifierTask">
+ <classpath>
+ <path refid="project.class.path"/>
+ </classpath>
+</taskdef>
+
+<info-verify classname="org.realityforge.ModelCompiler">
+ <classpath>
+ <fileset dir="lib">
+ <include name="**/*.jar"/>
+ </fileset>
+ </classpath>
+</info-verify>
+]]></source>
</subsection>
</section>
</body>
1.1 jakarta-avalon-excalibur/info/src/xdocs/doclet.xml
Index: doclet.xml
===================================================================
<?xml version="1.0"?>
<document>
<properties>
<title>Doclet</title>
<author email="peter at apache.org">Peter Donald</author>
</properties>
<body>
<section name="Introduction">
<p>The Info toolkit allows you to mark up your java source files
using javadoc tags. This markup will then be read by the
<a href="tasks.html#infodoclet"><code>infodoclet</code></a>
task and used to generate the Info descriptors.</p>
</section>
<section name="Doclet Tag Types">
</section>
</body>
</document>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>