maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r632196 [1/3] - in /maven/plugin-tools/trunk/maven-plugin-tools-javadoc: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/maven/ src/main/java/org/apache/maven/tools/ src/main/java/org/a...
Date Fri, 29 Feb 2008 01:35:28 GMT
Author: vsiveton
Date: Thu Feb 28 17:35:16 2008
New Revision: 632196

URL: http://svn.apache.org/viewvc?rev=632196&view=rev
Log:
MPLUGIN-81: Handle Mojo annotations as Javadoc taglets to make better javadoc

o added new project

Added:
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/pom.xml   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoFieldTaglet.java   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoTaglet.java   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoTypeTaglet.java   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoAggregatorTypeTaglet.java   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoComponentFieldTaglet.java   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoConfiguratorTypeTaglet.java   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoExecuteTypeTaglet.java   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoExecutionStrategyTypeTaglet.java   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoGoalTypeTaglet.java   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoInheritByDefaultTypeTaglet.java   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoInstantiationStrategyTypeTaglet.java   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoParameterFieldTaglet.java   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoPhaseTypeTaglet.java   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoReadOnlyFieldTaglet.java   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiredFieldTaglet.java   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiresDependencyResolutionTypeTaglet.java   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiresDirectInvocationTypeTaglet.java   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiresOnLineTypeTaglet.java   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiresProjectTypeTaglet.java   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoRequiresReportsTypeTaglet.java   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/javadoc/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/javadoc/org/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/javadoc/org/apache/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/javadoc/org/apache/maven/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/javadoc/org/apache/maven/tools/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/javadoc/org/apache/maven/tools/plugin/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/javadoc/org/apache/maven/tools/plugin/javadoc/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/javadoc/org/apache/maven/tools/plugin/javadoc/package.html   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/site/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/site/apt/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/site/apt/index.apt   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/site/apt/screenshots.apt   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/site/apt/usage.apt   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/site/resources/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/site/resources/images/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/site/resources/images/javadoc.png   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/site/site.xml   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/test/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/test/java/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/test/java/org/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/test/java/org/apache/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/test/java/org/apache/maven/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/test/java/org/apache/maven/tools/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/test/java/org/apache/maven/tools/plugin/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/test/java/org/apache/maven/tools/plugin/javadoc/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/test/java/org/apache/maven/tools/plugin/javadoc/JavadocReportTest.java   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/test/java/org/apache/maven/tools/plugin/javadoc/stubs/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/test/java/org/apache/maven/tools/plugin/javadoc/stubs/DefaultMavenProjectStub.java   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/test/resources/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/test/resources/unit/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/test/resources/unit/javadoc/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/test/resources/unit/javadoc/javadoc-plugin-config.xml   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/test/resources/unit/javadoc/src/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/test/resources/unit/javadoc/src/main/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/test/resources/unit/javadoc/src/main/java/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/test/resources/unit/javadoc/src/main/java/org/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/test/resources/unit/javadoc/src/main/java/org/apache/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/test/resources/unit/javadoc/src/main/java/org/apache/maven/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/test/resources/unit/javadoc/src/main/java/org/apache/maven/plugin/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/test/resources/unit/javadoc/src/main/java/org/apache/maven/plugin/my/
    maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/test/resources/unit/javadoc/src/main/java/org/apache/maven/plugin/my/MyMojo.java   (with props)

Added: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-javadoc/pom.xml?rev=632196&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-javadoc/pom.xml (added)
+++ maven/plugin-tools/trunk/maven-plugin-tools-javadoc/pom.xml Thu Feb 28 17:35:16 2008
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <artifactId>maven-plugin-tools</artifactId>
+    <groupId>org.apache.maven</groupId>
+    <version>2.2-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>maven-plugin-tools-javadoc</artifactId>
+  <name>Maven Plugin Tools Javadoc</name>
+  <version>1.0-SNAPSHOT</version>
+  <inceptionYear>2008</inceptionYear>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-tools-java</artifactId>
+    </dependency>
+  </dependencies>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <artifactId>maven-javadoc-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <artifactId>maven-jxr-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </reporting>
+
+  <profiles>
+    <profile>
+      <id>default-tools.jar</id>
+      <activation>
+        <property>
+          <name>java.vendor</name>
+          <value>Sun Microsystems Inc.</value>
+       </property>
+     </activation>
+      <dependencies>
+        <dependency>
+          <groupId>com.sun</groupId>
+          <artifactId>tools</artifactId>
+          <version>1.4.2</version>
+          <scope>system</scope>
+          <systemPath>${java.home}/../lib/tools.jar</systemPath>
+       </dependency>
+     </dependencies>
+   </profile>
+    <profile>
+      <id>integration-tests</id>
+      <activation>
+        <property>
+          <name>maven.test.skip</name>
+          <value>!true</value>
+        </property>
+      </activation>
+
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-javadoc-plugin</artifactId>
+          <version>2.3</version>
+          <scope>test</scope>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.maven.shared</groupId>
+          <artifactId>maven-plugin-testing-harness</artifactId>
+          <version>1.1</version>
+          <scope>test</scope>
+        </dependency>
+        <dependency>
+          <groupId>org.codehaus.plexus</groupId>
+          <artifactId>plexus-container-default</artifactId>
+          <version>1.0-alpha-9</version>
+          <scope>test</scope>
+        </dependency>
+      </dependencies>
+
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-jar-plugin</artifactId>
+            <executions>
+               <execution>
+                  <id>it-test</id>
+                  <phase>process-test-classes</phase>
+                  <goals>
+                     <goal>jar</goal>
+                  </goals>
+               </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-install-plugin</artifactId>
+            <version>2.2</version>
+            <executions>
+              <execution>
+                <id>it-test</id>
+                <phase>process-test-classes</phase>
+                <goals>
+                  <goal>install-file</goal>
+                </goals>
+                <configuration>
+                  <file>${project.build.directory}/${project.build.finalName}.jar</file>
+                  <groupId>${project.groupId}</groupId>
+                  <artifactId>${project.artifactId}</artifactId>
+                  <version>${project.version}</version>
+                  <packaging>${project.packaging}</packaging>
+                  <pomFile>${basedir}/pom.xml</pomFile>
+                  <createChecksum>true</createChecksum>
+                  <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+                  <localRepositoryId>it-local-repo</localRepositoryId>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+   </profile>
+ </profiles>
+</project>

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoFieldTaglet.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoFieldTaglet.java?rev=632196&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoFieldTaglet.java (added)
+++ maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoFieldTaglet.java Thu Feb 28 17:35:16 2008
@@ -0,0 +1,93 @@
+package org.apache.maven.tools.plugin.javadoc;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Abstract <code>Taglet</code> for annotations specified at the Mojo parameter level.
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ */
+public abstract class AbstractMojoFieldTaglet
+    extends AbstractMojoTaglet
+{
+    /**
+     * @return <code>false</code> since this annotation can <b>NOT</b> be used in constructor documentation.
+     * @see com.sun.tools.doclets.Taglet#inConstructor()
+     */
+    public final boolean inConstructor()
+    {
+        return false;
+    }
+
+    /**
+     * @return <code>true</code> since this annotation can <b>NOT</b> be used in field documentation.
+     * @see com.sun.tools.doclets.Taglet#inField()
+     */
+    public final boolean inField()
+    {
+        return true;
+    }
+
+    /**
+     * @return <code>false</code> since this annotation can <b>NOT</b> be used in method documentation.
+     * @see com.sun.tools.doclets.Taglet#inMethod()
+     */
+    public final boolean inMethod()
+    {
+        return false;
+    }
+
+    /**
+     * @return <code>false</code> since this annotation can <b>NOT</b> be used in overview documentation.
+     * @see com.sun.tools.doclets.Taglet#inOverview()
+     */
+    public final boolean inOverview()
+    {
+        return false;
+    }
+
+    /**
+     * @return <code>false</code> since this annotation can <b>NOT</b> be used in package documentation.
+     * @see com.sun.tools.doclets.Taglet#inPackage()
+     */
+    public final boolean inPackage()
+    {
+        return false;
+    }
+
+    /**
+     * @return <code>false</code> since this annotation can be used in type documentation.
+     * @see com.sun.tools.doclets.Taglet#inType()
+     */
+    public final boolean inType()
+    {
+        return false;
+    }
+
+    /**
+     * @return <code>false</code> since this annotation can <b>NOT</b> be used in inline tag.
+     * @see com.sun.tools.doclets.Taglet#isInlineTag()
+     */
+    public final boolean isInlineTag()
+    {
+        return false;
+    }
+}

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoFieldTaglet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoFieldTaglet.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoTaglet.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoTaglet.java?rev=632196&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoTaglet.java (added)
+++ maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoTaglet.java Thu Feb 28 17:35:16 2008
@@ -0,0 +1,425 @@
+package org.apache.maven.tools.plugin.javadoc;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import javax.swing.text.AttributeSet;
+import javax.swing.text.MutableAttributeSet;
+import javax.swing.text.SimpleAttributeSet;
+
+import com.sun.javadoc.Tag;
+import com.sun.tools.doclets.Taglet;
+
+/**
+ * Abstract <code>Taglet</code> for <a href="http://maven.codehaus.org/"/>Maven</a> Mojo annotations.
+ * <br/>
+ * A Mojo annotation is defined like the following:
+ * <pre>
+ * &#64;annotation &lt;annotationValue&gt; &lt;parameterName="parameterValue"&gt;
+ * </pre>
+ *
+ * @see <a href="package-summary.html#package_description">package-summary.html</a>
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ */
+public abstract class AbstractMojoTaglet
+    implements Taglet
+{
+    /** {@inheritDoc} */
+    public String toString( Tag tag )
+    {
+        if ( tag == null )
+        {
+            return null;
+        }
+
+        String tagValue = getTagValue( tag );
+        MutableAttributeSet tagAttributes = getTagAttributes( tag );
+
+        StringBuffer sb = new StringBuffer();
+
+        appendTag( sb, tag, tagAttributes, tagValue );
+
+        return sb.toString();
+    }
+
+    /** {@inheritDoc} */
+    public String toString( Tag[] tags )
+    {
+        if ( tags.length == 0 )
+        {
+            return null;
+        }
+
+        StringBuffer sb = new StringBuffer();
+        for ( int i = 0; i < tags.length; i++ )
+        {
+            String tagValue = getTagValue( tags[i] );
+            MutableAttributeSet tagAttributes = getTagAttributes( tags[i] );
+
+            appendTag( sb, tags[i], tagAttributes, tagValue );
+        }
+
+        return sb.toString();
+    }
+
+    /**
+     * @return the header, i.e. the message, to display
+     */
+    public abstract String getHeader();
+
+    /**
+     * @return the given annotation value, or <code>null</code> if the given Mojo annotation/tag does't allow
+     * annotation value.
+     * <br/>
+     * <b>Note</b>: the value could be a pattern value, i.e.: <code>*</code> for every values, <code>a|b|c</code>
+     * for <code>a OR b OR c</code>.
+     */
+    public abstract String getAllowedValue();
+
+    /**
+     * @return an array of the allowed parameter names for the given Mojo annotation/tag, or <code>null</code>
+     * if the annotation/tag doesn't allow parameter.
+     */
+    public abstract String[] getAllowedParameterNames();
+
+    /**
+     * @return <code>true</code> if taglet has annotation value, <code>false</code> otherwise.
+     * @see #getAllowedValue()
+     */
+    public boolean hasAnnotationValue()
+    {
+        return getAllowedValue() != null;
+    }
+
+    /**
+     * @return <code>true</code> if taglet has parameters, <code>false</code> otherwise.
+     * @see #getAllowedParameterNames()
+     */
+    public boolean hasAnnotationParameters()
+    {
+        return getAllowedParameterNames() != null;
+    }
+
+    /**
+     * @param tag not null.
+     * @return a not null String or <code>null</code> if no annotation value was found.
+     */
+    private String getTagValue( Tag tag )
+    {
+        if ( tag == null )
+        {
+            throw new IllegalArgumentException( "tag should be not null" );
+        }
+
+        String text = tag.text();
+        if ( isEmpty( text ) )
+        {
+            // using pattern: @annotation
+            return null;
+        }
+
+        String tagValue = null;
+        StringTokenizer token = new StringTokenizer( text, " " );
+        while ( token.hasMoreTokens() )
+        {
+            String nextToken = token.nextToken();
+
+            if ( nextToken.indexOf( "=" ) == -1 )
+            {
+                // using pattern: @annotation <annotationValue>
+                tagValue = nextToken;
+            }
+        }
+
+        return tagValue;
+    }
+
+    /**
+     * @param tag not null.
+     * @return a not null MutableAttributeSet.
+     */
+    private MutableAttributeSet getTagAttributes( Tag tag )
+    {
+        if ( tag == null )
+        {
+            throw new IllegalArgumentException( "tag should be not null" );
+        }
+
+        String text = tag.text();
+
+        StringTokenizer token = new StringTokenizer( text, " " );
+        MutableAttributeSet tagAttributes = new SimpleAttributeSet();
+        while ( token.hasMoreTokens() )
+        {
+            String nextToken = token.nextToken();
+
+            if ( nextToken.indexOf( "=" ) == -1 )
+            {
+                // using pattern: @annotation <annotationValue>
+                continue;
+            }
+
+            StringTokenizer token2 = new StringTokenizer( nextToken, "=" );
+            if ( token2.countTokens() != 2 )
+            {
+                System.err.println( "The annotation '" + tag.name() + "' has no name/value pairs parameter: "
+                    + tag.name() + " " + text + " (" + tag.position().file() + ":" + tag.position().line() + ":"
+                    + tag.position().column() + ")" );
+                tagAttributes.addAttribute( token2.nextToken(), "" );
+                continue;
+            }
+
+            String name = token2.nextToken();
+            String value = token2.nextToken().replace( "\"", "" );
+
+            if ( getAllowedParameterNames() != null && !Arrays.asList( getAllowedParameterNames() ).contains( name ) )
+            {
+                System.err.println( "The annotation '" + tag.name() + "' has wrong parameter name: " + tag.name() + " "
+                    + text + " (" + tag.position().file() + ":" + tag.position().line() + ":" + tag.position().column()
+                    + ")" );
+            }
+
+            tagAttributes.addAttribute( name, value );
+        }
+
+        return tagAttributes;
+    }
+
+    /**
+     * Append a tag
+     *
+     * @param sb
+     * @param tag
+     * @param tagAttributes
+     * @param tagValue
+     */
+    private void appendTag( StringBuffer sb, Tag tag, MutableAttributeSet tagAttributes, String tagValue )
+    {
+        if ( !hasAnnotationParameters() )
+        {
+            if ( tagAttributes.getAttributeCount() > 0 )
+            {
+                System.err.println( "The annotation '@" + getName() + "' should have no attribute ("
+                    + tag.position().file() + ":" + tag.position().line() + ":" + tag.position().column() + ")" );
+            }
+
+            if ( hasAnnotationValue() )
+            {
+                sb.append( "<DT><B>" ).append( getHeader() ).append( ":</B></DT>" );
+                if ( isEveryValues( getAllowedValue() ) )
+                {
+                    if ( isNotEmpty( tagValue ) )
+                    {
+                        sb.append( "<DD>" ).append( tagValue ).append( "</DD>" );
+                    }
+                    else
+                    {
+                        System.err.println( "The annotation '@" + getName() + "' is specified to have a value but "
+                            + "no value is defined (" + tag.position().file() + ":" + tag.position().line() + ":"
+                            + tag.position().column() + ")" );
+                        sb.append( "<DD>" ).append( "NOT DEFINED" ).append( "</DD>" );
+                    }
+                }
+                else
+                {
+                    List l = getOnlyValues( getAllowedValue() );
+                    if ( isNotEmpty( tagValue ) )
+                    {
+                        if ( l.contains( tagValue ) )
+                        {
+                            sb.append( "<DD>" ).append( tagValue ).append( "</DD>" );
+                        }
+                        else
+                        {
+                            System.err.println( "The annotation '@" + getName() + "' is specified to be a value of "
+                                + l + " (" + tag.position().file() + ":" + tag.position().line() + ":"
+                                + tag.position().column() + ")" );
+                            sb.append( "<DD>" ).append( tagValue ).append( "</DD>" );
+                        }
+                    }
+                    else
+                    {
+                        sb.append( "<DD>" ).append( l.get( 0 ) ).append( "</DD>" );
+                    }
+                }
+            }
+            else
+            {
+                if ( isNotEmpty( tagValue ) )
+                {
+                    System.err.println( "The annotation '@" + getName() + "' should have no value ("
+                        + tag.position().file() + ":" + tag.position().line() + ":" + tag.position().column() + ")" );
+                }
+                sb.append( "<DT><B>" ).append( getHeader() ).append( "</B></DT>" );
+                sb.append( "<DD></DD>" );
+            }
+        }
+        else
+        {
+            if ( hasAnnotationValue() )
+            {
+                sb.append( "<DT><B>" ).append( getHeader() ).append( ":</B></DT>" );
+                if ( isEveryValues( getAllowedValue() ) )
+                {
+                    if ( isNotEmpty( tagValue ) )
+                    {
+                        sb.append( "<DD>" ).append( tagValue );
+                    }
+                    else
+                    {
+                        System.err.println( "The annotation '@" + getName() + "' is specified to have a value but "
+                            + "no value is defined (" + tag.position().file() + ":" + tag.position().line() + ":"
+                            + tag.position().column() + ")" );
+                        sb.append( "<DD>" ).append( "NOT DEFINED" );
+                    }
+                }
+                else
+                {
+                    List l = getOnlyValues( getAllowedValue() );
+                    if ( isNotEmpty( tagValue ) )
+                    {
+                        if ( l.contains( tagValue ) )
+                        {
+                            sb.append( "<DD>" ).append( tagValue );
+                        }
+                        else
+                        {
+                            System.err.println( "The annotation '@" + getName() + "' is specified to be a value in "
+                                + l + " (" + tag.position().file() + ":" + tag.position().line() + ":"
+                                + tag.position().column() + ")" );
+                            sb.append( "<DD>" ).append( tagValue );
+                        }
+                    }
+                    else
+                    {
+                        sb.append( "<DD>" ).append( l.get( 0 ) );
+                    }
+                }
+            }
+            else
+            {
+                if ( isNotEmpty( tagValue ) )
+                {
+                    System.err.println( "The annotation '@" + getName() + "' should have no value ("
+                        + tag.position().file() + ":" + tag.position().line() + ":" + tag.position().column() + ")" );
+                }
+                sb.append( "<DT><B>" ).append( getHeader() ).append( ":</B></DT>" );
+                sb.append( "<DD>" );
+            }
+
+            appendAnnotationParameters( sb, tagAttributes );
+            sb.append( "</DD>" );
+        }
+    }
+
+    /**
+     * Append the annotation parameters as a definition list.
+     *
+     * @param sb not null
+     * @param att not null
+     */
+    private static void appendAnnotationParameters( StringBuffer sb, MutableAttributeSet att )
+    {
+        sb.append( "<DL>" );
+
+        Enumeration names = att.getAttributeNames();
+        while ( names.hasMoreElements() )
+        {
+            Object key = names.nextElement();
+            Object value = att.getAttribute( key );
+
+            if ( value instanceof AttributeSet )
+            {
+                // ignored
+            }
+            else
+            {
+                sb.append( "<DT><B>" ).append( key ).append( ":</B></DT>" );
+                sb.append( "<DD>" ).append( value ).append( "</DD>" );
+            }
+        }
+
+        sb.append( "</DL>" );
+    }
+
+    /**
+     * @param text not null
+     * @return <code>true</code> if text contains <code>*</code>, <code>false</code> otherwise.
+     */
+    private static boolean isEveryValues( String text )
+    {
+        return text.trim().equals( "*" );
+    }
+
+    /**
+     * Splits the provided text into a array, using pipe as the separator.
+     *
+     * @param text not null
+     * @return a list of parsed Strings or <code>Collections.EMPTY_LIST</code>. By convention, the default value is the first element.
+     */
+    private static List getOnlyValues( String text )
+    {
+        if ( text.indexOf( "|" ) == -1 )
+        {
+            return Collections.EMPTY_LIST;
+        }
+
+        List l = new ArrayList();
+        StringTokenizer token = new StringTokenizer( text, "|" );
+        while ( token.hasMoreTokens() )
+        {
+            l.add( token.nextToken() );
+        }
+
+        return l;
+    }
+
+    /**
+     * <p>Checks if a String is non <code>null</code> and is
+     * not empty (<code>length > 0</code>).</p>
+     *
+     * @param str the String to check
+     * @return true if the String is non-null, and not length zero
+     */
+    private static boolean isNotEmpty( String str )
+    {
+        return ( str != null && str.length() > 0 );
+    }
+
+    /**
+     * <p>Checks if a (trimmed) String is <code>null</code> or empty.</p>
+     *
+     * @param str the String to check
+     * @return <code>true</code> if the String is <code>null</code>, or
+     *  length zero once trimmed
+     */
+    private static boolean isEmpty( String str )
+    {
+        return ( str == null || str.trim().length() == 0 );
+    }
+}

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoTaglet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoTaglet.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoTypeTaglet.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoTypeTaglet.java?rev=632196&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoTypeTaglet.java (added)
+++ maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoTypeTaglet.java Thu Feb 28 17:35:16 2008
@@ -0,0 +1,93 @@
+package org.apache.maven.tools.plugin.javadoc;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Abstract <code>Taglet</code> for annotations specified at the Mojo class level.
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ */
+public abstract class AbstractMojoTypeTaglet
+    extends AbstractMojoTaglet
+{
+    /**
+     * @return <code>false</code> since this annotation can <b>NOT</b> be used in constructor documentation.
+     * @see com.sun.tools.doclets.Taglet#inConstructor()
+     */
+    public final boolean inConstructor()
+    {
+        return false;
+    }
+
+    /**
+     * @return <code>false</code> since this annotation can <b>NOT</b> be used in field documentation.
+     * @see com.sun.tools.doclets.Taglet#inField()
+     */
+    public final boolean inField()
+    {
+        return false;
+    }
+
+    /**
+     * @return <code>false</code> since this annotation can <b>NOT</b> be used in method documentation.
+     * @see com.sun.tools.doclets.Taglet#inMethod()
+     */
+    public final boolean inMethod()
+    {
+        return false;
+    }
+
+    /**
+     * @return <code>false</code> since this annotation can <b>NOT</b> be used in overview documentation.
+     * @see com.sun.tools.doclets.Taglet#inOverview()
+     */
+    public final boolean inOverview()
+    {
+        return false;
+    }
+
+    /**
+     * @return <code>false</code> since this annotation can <b>NOT</b> be used in package documentation.
+     * @see com.sun.tools.doclets.Taglet#inPackage()
+     */
+    public final boolean inPackage()
+    {
+        return false;
+    }
+
+    /**
+     * @return <code>true</code> since this annotation can be used in type documentation.
+     * @see com.sun.tools.doclets.Taglet#inType()
+     */
+    public final boolean inType()
+    {
+        return true;
+    }
+
+    /**
+     * @return <code>false</code> since this annotation can <b>NOT</b> be used in inline tag.
+     * @see com.sun.tools.doclets.Taglet#isInlineTag()
+     */
+    public final boolean isInlineTag()
+    {
+        return false;
+    }
+}

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoTypeTaglet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/AbstractMojoTypeTaglet.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoAggregatorTypeTaglet.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoAggregatorTypeTaglet.java?rev=632196&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoAggregatorTypeTaglet.java (added)
+++ maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoAggregatorTypeTaglet.java Thu Feb 28 17:35:16 2008
@@ -0,0 +1,116 @@
+package org.apache.maven.tools.plugin.javadoc;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.Map;
+
+import org.apache.maven.tools.plugin.extractor.java.JavaMojoAnnotation;
+
+import com.sun.tools.doclets.Taglet;
+
+/**
+ * The <tt>@aggregator</tt> tag is used to aggregate the Maven project and its child modules and
+ * has no parameter.
+ * <br/>
+ * The following is a sample declaration:
+ * <pre>
+ * &#x2f;&#x2a;&#x2a;
+ * &#x20;&#x2a; Dummy Mojo.
+ * &#x20;&#x2a;
+ * &#x20;&#x2a; &#64;aggregator
+ * &#x20;&#x2a; ...
+ * &#x20;&#x2a;&#x2f;
+ * public class MyMojo extends AbstractMojo{}
+ * </pre>
+ * To use it, calling the <code>Javadoc</code> tool with the following:
+ * <pre>
+ * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoAggregatorTypeTaglet'
+ * </pre>
+ * <b>Note</b>: This taglet is similar to call the <code>Javadoc</code> tool with the following:
+ * <pre>
+ * javadoc ... -tag 'aggregator:t:Aggregates the Maven project and its child modules.'
+ * </pre>
+ *
+ * @see <a href="package-summary.html#package_description">package-summary.html</a>
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ */
+public class MojoAggregatorTypeTaglet
+    extends AbstractMojoTypeTaglet
+{
+    private static final String NAME = JavaMojoAnnotation.AGGREGATOR;
+
+    protected static final String HEADER = "Aggregates the Maven project and its child modules.";
+
+    /**
+     * @return By default, return the string defined in {@linkplain #HEADER}.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
+     * @see #HEADER
+     */
+    public String getHeader()
+    {
+        return HEADER;
+    }
+
+    /**
+     * @return <code>null</code> since <code>@aggregator</code> has no value.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
+     */
+    public String getAllowedValue()
+    {
+        return null;
+    }
+
+    /**
+     * @return <code>null</code> since <code>@aggregator</code> has no parameter.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
+     */
+    public String[] getAllowedParameterNames()
+    {
+        return null;
+    }
+
+    /**
+     * @return By default, return the name of this taglet.
+     * @see com.sun.tools.doclets.Taglet#getName()
+     * @see MojoAggregatorTypeTaglet#NAME
+     */
+    public String getName()
+    {
+        return NAME;
+    }
+
+    /**
+     * Register this Taglet.
+     *
+     * @param tagletMap the map to register this tag to.
+     */
+    public static void register( Map tagletMap )
+    {
+        MojoAggregatorTypeTaglet tag = new MojoAggregatorTypeTaglet();
+        Taglet t = (Taglet) tagletMap.get( tag.getName() );
+        if ( t != null )
+        {
+            tagletMap.remove( tag.getName() );
+        }
+        tagletMap.put( tag.getName(), tag );
+    }
+}

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoAggregatorTypeTaglet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoAggregatorTypeTaglet.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoComponentFieldTaglet.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoComponentFieldTaglet.java?rev=632196&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoComponentFieldTaglet.java (added)
+++ maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoComponentFieldTaglet.java Thu Feb 28 17:35:16 2008
@@ -0,0 +1,118 @@
+package org.apache.maven.tools.plugin.javadoc;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.Map;
+
+import org.apache.maven.tools.plugin.extractor.java.JavaMojoAnnotation;
+
+import com.sun.tools.doclets.Taglet;
+
+/**
+ * The <tt>@parameter</tt> tag is used to populate Plexus component and has annotation parameters.
+ * <br/>
+ * The following is a sample declaration:
+ * <pre>
+ * public class MyMojo extends AbstractMojo
+ * {
+ *   &#x2f;&#x2a;&#x2a;
+ *   &#x20;&#x2a; Dummy parameter.
+ *   &#x20;&#x2a;
+ *   &#x20;&#x2a; &#64;component &lt;role="..."&gt; &lt;roleHint="..."&gt;
+ *   &#x20;&#x2a; ...
+ *   &#x20;&#x2a;&#x2f;
+ *   private Object parameterName;
+ * }
+ * </pre>
+ * To use it, calling the <code>Javadoc</code> tool with the following:
+ * <pre>
+ * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoComponentFieldTaglet'
+ * </pre>
+ *
+ * @see <a href="package-summary.html#package_description">package-summary.html</a>
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ */
+public class MojoComponentFieldTaglet
+    extends AbstractMojoFieldTaglet
+{
+    private static final String NAME = JavaMojoAnnotation.COMPONENT;
+
+    private static final String[] COMPONENTS_NAME = {
+        JavaMojoAnnotation.COMPONENT_ROLE,
+        JavaMojoAnnotation.COMPONENT_ROLEHINT };
+
+    protected static final String HEADER = "Is a Plexus component defined by";
+
+    /**
+     * @return By default, return the string defined in {@linkplain #HEADER}.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
+     * @see #HEADER
+     */
+    public String getHeader()
+    {
+        return HEADER;
+    }
+
+    /**
+     * @return <code>null</code> since <code>@component</code> has no value.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
+     */
+    public String getAllowedValue()
+    {
+        return null;
+    }
+
+    /**
+     * @return <code>MojoComponentFieldTaglet#COMPONENTS_NAME</code> since <code>@component</code> has parameters.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
+     */
+    public String[] getAllowedParameterNames()
+    {
+        return COMPONENTS_NAME;
+    }
+
+    /**
+     * @return By default, return the name of this taglet.
+     * @see com.sun.tools.doclets.Taglet#getName()
+     * @see MojoComponentFieldTaglet#NAME
+     */
+    public String getName()
+    {
+        return NAME;
+    }
+
+    /**
+     * Register this Taglet.
+     *
+     * @param tagletMap the map to register this tag to.
+     */
+    public static void register( Map tagletMap )
+    {
+        MojoComponentFieldTaglet tag = new MojoComponentFieldTaglet();
+        Taglet t = (Taglet) tagletMap.get( tag.getName() );
+        if ( t != null )
+        {
+            tagletMap.remove( tag.getName() );
+        }
+        tagletMap.put( tag.getName(), tag );
+    }
+}

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoComponentFieldTaglet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoComponentFieldTaglet.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoConfiguratorTypeTaglet.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoConfiguratorTypeTaglet.java?rev=632196&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoConfiguratorTypeTaglet.java (added)
+++ maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoConfiguratorTypeTaglet.java Thu Feb 28 17:35:16 2008
@@ -0,0 +1,115 @@
+package org.apache.maven.tools.plugin.javadoc;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.Map;
+
+import org.apache.maven.tools.plugin.extractor.java.JavaMojoAnnotation;
+
+import com.sun.tools.doclets.Taglet;
+
+/**
+ * The <tt>@configurator</tt> tag is used to inject parameter values into the Mojo and has annotation parameter.
+ * <br/>
+ * The following is a sample declaration:
+ * <pre>
+ * &#x2f;&#x2a;&#x2a;
+ * &#x20;&#x2a; Dummy Mojo.
+ * &#x20;&#x2a;
+ * &#x20;&#x2a; &#64;configurator &lt;roleHint&gt;
+ * &#x20;&#x2a; ...
+ * &#x20;&#x2a;&#x2f;
+ * public class MyMojo extends AbstractMojo{}
+ * </pre>
+ * To use it, calling the <code>Javadoc</code> tool with the following:
+ * <pre>
+ * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoConfiguratorTypeTaglet'
+ * </pre>
+ * <b>Note</b>: This taglet is similar to call the <code>Javadoc</code> tool with the following:
+ * <pre>
+ * javadoc ... -tag 'configurator:t:Is configured to the role hint:'
+ * </pre>
+ *
+ * @see <a href="package-summary.html#package_description">package-summary.html</a>
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ */
+public class MojoConfiguratorTypeTaglet
+    extends AbstractMojoTypeTaglet
+{
+    private static final String NAME = JavaMojoAnnotation.CONFIGURATOR;
+
+    protected static final String HEADER = "Is configured to the role hint";
+
+    /**
+     * @return By default, return the string defined in {@linkplain #HEADER}.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
+     * @see #HEADER
+     */
+    public String getHeader()
+    {
+        return HEADER;
+    }
+
+    /**
+     * @return <code>"*"</code> since <code>@configurator</code> has a value.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
+     */
+    public String getAllowedValue()
+    {
+        return "*";
+    }
+
+    /**
+     * @return <code>null</code> since <code>@configurator</code> has no parameter.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
+     */
+    public String[] getAllowedParameterNames()
+    {
+        return null;
+    }
+
+    /**
+     * @return By default, return the name of this taglet.
+     * @see com.sun.tools.doclets.Taglet#getName()
+     * @see MojoConfiguratorTypeTaglet#NAME
+     */
+    public String getName()
+    {
+        return NAME;
+    }
+
+    /**
+     * Register this Taglet.
+     *
+     * @param tagletMap the map to register this tag to.
+     */
+    public static void register( Map tagletMap )
+    {
+        MojoConfiguratorTypeTaglet tag = new MojoConfiguratorTypeTaglet();
+        Taglet t = (Taglet) tagletMap.get( tag.getName() );
+        if ( t != null )
+        {
+            tagletMap.remove( tag.getName() );
+        }
+        tagletMap.put( tag.getName(), tag );
+    }
+}

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoConfiguratorTypeTaglet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoConfiguratorTypeTaglet.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoExecuteTypeTaglet.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoExecuteTypeTaglet.java?rev=632196&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoExecuteTypeTaglet.java (added)
+++ maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoExecuteTypeTaglet.java Thu Feb 28 17:35:16 2008
@@ -0,0 +1,121 @@
+package org.apache.maven.tools.plugin.javadoc;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.Map;
+
+import org.apache.maven.tools.plugin.extractor.java.JavaMojoAnnotation;
+
+import com.sun.tools.doclets.Taglet;
+
+/**
+ * The <tt>@execute</tt> tag is used to reference the invocation way of the Mojo and has parameters.
+ * <br/>
+ * The following is a sample declaration:
+ * <pre>
+ * &#x2f;&#x2a;&#x2a;
+ * &#x20;&#x2a; Dummy Mojo.
+ * &#x20;&#x2a;
+ * &#x20;&#x2a; &#64;execute phase="..." lifecycle="..."
+ * &#x20;&#x2a; &lt;OR&gt;
+ * &#x20;&#x2a; &#64;execute phase="..."
+ * &#x20;&#x2a; &lt;OR&gt;
+ * &#x20;&#x2a; &#64;execute goal="..."
+ * &#x20;&#x2a; ...
+ * &#x20;&#x2a;&#x2f;
+ * public class MyMojo extends AbstractMojo{}
+ * </pre>
+ * To use it, calling the <code>Javadoc</code> tool with the following:
+ * <pre>
+ * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoExecuteTypeTaglet'
+ * </pre>
+ *
+ * @see <a href="package-summary.html#package_description">package-summary.html</a>
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ */
+public class MojoExecuteTypeTaglet
+    extends AbstractMojoTypeTaglet
+{
+    private static final String NAME = JavaMojoAnnotation.EXECUTE;
+
+    private static final String[] PARAMETERS_NAME = {
+        JavaMojoAnnotation.EXECUTE_PHASE,
+        JavaMojoAnnotation.EXECUTE_LIFECYCLE,
+        JavaMojoAnnotation.EXECUTE_GOAL };
+
+    protected static final String HEADER = "Is defined to be executed in";
+
+    /**
+     * @return By default, return the string defined in {@linkplain #HEADER}.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
+     * @see #HEADER
+     */
+    public String getHeader()
+    {
+        return HEADER;
+    }
+
+    /**
+     * @return <code>null</code> since <code>@execute</code> has no value.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
+     */
+    public String getAllowedValue()
+    {
+        return null;
+    }
+
+    /**
+     * @return <code>MojoExecuteTypeTaglet#PARAMETERS_NAME</code> since <code>@execute</code> has parameters.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
+     * @see #PARAMETERS_NAME
+     */
+    public String[] getAllowedParameterNames()
+    {
+        return PARAMETERS_NAME;
+    }
+
+    /**
+     * @return By default, return the name of this taglet.
+     * @see com.sun.tools.doclets.Taglet#getName()
+     * @see MojoExecuteTypeTaglet#NAME
+     */
+    public String getName()
+    {
+        return NAME;
+    }
+
+    /**
+     * Register this Taglet.
+     *
+     * @param tagletMap the map to register this tag to.
+     */
+    public static void register( Map tagletMap )
+    {
+        MojoExecuteTypeTaglet tag = new MojoExecuteTypeTaglet();
+        Taglet t = (Taglet) tagletMap.get( tag.getName() );
+        if ( t != null )
+        {
+            tagletMap.remove( tag.getName() );
+        }
+        tagletMap.put( tag.getName(), tag );
+    }
+}

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoExecuteTypeTaglet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoExecuteTypeTaglet.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoExecutionStrategyTypeTaglet.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoExecutionStrategyTypeTaglet.java?rev=632196&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoExecutionStrategyTypeTaglet.java (added)
+++ maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoExecutionStrategyTypeTaglet.java Thu Feb 28 17:35:16 2008
@@ -0,0 +1,115 @@
+package org.apache.maven.tools.plugin.javadoc;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.Map;
+
+import org.apache.maven.tools.plugin.extractor.java.JavaMojoAnnotation;
+
+import com.sun.tools.doclets.Taglet;
+
+/**
+ * The <tt>@executionStrategy</tt> tag is used to specify the instantiation strategy and has has parameter.
+ * <br/>
+ * The following is a sample declaration:
+ * <pre>
+ * &#x2f;&#x2a;&#x2a;
+ * &#x20;&#x2a; Dummy Mojo.
+ * &#x20;&#x2a;
+ * &#x20;&#x2a; &#64;executionStrategy &lt;always&gt;
+ * &#x20;&#x2a; ...
+ * &#x20;&#x2a;&#x2f;
+ * public class MyMojo extends AbstractMojo{}
+ * </pre>
+ * To use it, calling the <code>Javadoc</code> tool with the following:
+ * <pre>
+ * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoExecutionStrategyTypeTaglet'
+ * </pre>
+ * <b>Note</b>: This taglet is similar to call the <code>Javadoc</code> tool with the following:
+ * <pre>
+ * javadoc ... -tag 'executionStrategy:t:Is executed with the strategy:'
+ * </pre>
+ *
+ * @see <a href="package-summary.html#package_description">package-summary.html</a>
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ */
+public class MojoExecutionStrategyTypeTaglet
+    extends AbstractMojoTypeTaglet
+{
+    private static final String NAME = JavaMojoAnnotation.EXECUTION_STATEGY;
+
+    protected static final String HEADER = "Is executed with the strategy";
+
+    /**
+     * @return By default, return the string defined in {@linkplain #HEADER}.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
+     * @see #HEADER
+     */
+    public String getHeader()
+    {
+        return HEADER;
+    }
+
+    /**
+     * @return <code>"*"</code> since <code>@executionStrategy</code> has a value.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
+     */
+    public String getAllowedValue()
+    {
+        return "*";
+    }
+
+    /**
+     * @return <code>null</code> since <code>@executionStrategy</code> has no parameter.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
+     */
+    public String[] getAllowedParameterNames()
+    {
+        return null;
+    }
+
+    /**
+     * @return By default, return the name of this taglet.
+     * @see com.sun.tools.doclets.Taglet#getName()
+     * @see MojoExecutionStrategyTypeTaglet#NAME
+     */
+    public String getName()
+    {
+        return NAME;
+    }
+
+    /**
+     * Register this Taglet.
+     *
+     * @param tagletMap the map to register this tag to.
+     */
+    public static void register( Map tagletMap )
+    {
+        MojoExecutionStrategyTypeTaglet tag = new MojoExecutionStrategyTypeTaglet();
+        Taglet t = (Taglet) tagletMap.get( tag.getName() );
+        if ( t != null )
+        {
+            tagletMap.remove( tag.getName() );
+        }
+        tagletMap.put( tag.getName(), tag );
+    }
+}

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoExecutionStrategyTypeTaglet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoExecutionStrategyTypeTaglet.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoGoalTypeTaglet.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoGoalTypeTaglet.java?rev=632196&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoGoalTypeTaglet.java (added)
+++ maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoGoalTypeTaglet.java Thu Feb 28 17:35:16 2008
@@ -0,0 +1,115 @@
+package org.apache.maven.tools.plugin.javadoc;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.Map;
+
+import org.apache.maven.tools.plugin.extractor.java.JavaMojoAnnotation;
+
+import com.sun.tools.doclets.Taglet;
+
+/**
+ * The <tt>@goal</tt> tag is used to reference the goal name of the Mojo and has annotation parameter.
+ * <br/>
+ * The following is a sample declaration:
+ * <pre>
+ * &#x2f;&#x2a;&#x2a;
+ * &#x20;&#x2a; Dummy Mojo.
+ * &#x20;&#x2a;
+ * &#x20;&#x2a; &#64;goal &lt;goalName&gt;
+ * &#x20;&#x2a; ...
+ * &#x20;&#x2a;&#x2f;
+ * public class MyMojo extends AbstractMojo{}
+ * </pre>
+ * To use it, calling the <code>Javadoc</code> tool with the following:
+ * <pre>
+ * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoGoalTypeTaglet'
+ * </pre>
+ * <b>Note</b>: This taglet is similar to call the <code>Javadoc</code> tool with the following:
+ * <pre>
+ * javadoc ... -tag 'goal:t:Is defined by the goal name:'
+ * </pre>
+ *
+ * @see <a href="package-summary.html#package_description">package-summary.html</a>
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ */
+public class MojoGoalTypeTaglet
+    extends AbstractMojoTypeTaglet
+{
+    private static final String NAME = JavaMojoAnnotation.GOAL;
+
+    protected static final String HEADER = "Is defined by the goal name";
+
+    /**
+     * @return By default, return the string defined in {@linkplain #HEADER}.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
+     * @see #HEADER
+     */
+    public String getHeader()
+    {
+        return HEADER;
+    }
+
+    /**
+     * @return <code>"*"</code> since <code>@goal</code> has a value.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
+     */
+    public String getAllowedValue()
+    {
+        return "*";
+    }
+
+    /**
+     * @return <code>null</code> since <code>@goal</code> has no parameter.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
+     */
+    public String[] getAllowedParameterNames()
+    {
+        return null;
+    }
+
+    /**
+     * @return By default, return the name of this taglet.
+     * @see com.sun.tools.doclets.Taglet#getName()
+     * @see MojoGoalTypeTaglet#NAME
+     */
+    public String getName()
+    {
+        return NAME;
+    }
+
+    /**
+     * Register this Taglet.
+     *
+     * @param tagletMap the map to register this tag to.
+     */
+    public static void register( Map tagletMap )
+    {
+        MojoGoalTypeTaglet tag = new MojoGoalTypeTaglet();
+        Taglet t = (Taglet) tagletMap.get( tag.getName() );
+        if ( t != null )
+        {
+            tagletMap.remove( tag.getName() );
+        }
+        tagletMap.put( tag.getName(), tag );
+    }
+}

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoGoalTypeTaglet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoGoalTypeTaglet.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoInheritByDefaultTypeTaglet.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoInheritByDefaultTypeTaglet.java?rev=632196&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoInheritByDefaultTypeTaglet.java (added)
+++ maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoInheritByDefaultTypeTaglet.java Thu Feb 28 17:35:16 2008
@@ -0,0 +1,116 @@
+package org.apache.maven.tools.plugin.javadoc;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.Map;
+
+import org.apache.maven.tools.plugin.extractor.java.JavaMojoAnnotation;
+
+import com.sun.tools.doclets.Taglet;
+
+/**
+ * The <tt>@inheritByDefault</tt> tag is used to run this Mojo inside of a project
+ * and has annotation parameter.
+ * <br/>
+ * The following is a sample declaration:
+ * <pre>
+ * &#x2f;&#x2a;&#x2a;
+ * &#x20;&#x2a; Dummy Mojo.
+ * &#x20;&#x2a;
+ * &#x20;&#x2a; &#64;inheritByDefault &lt;true|false&gt;
+ * &#x20;&#x2a; ...
+ * &#x20;&#x2a;&#x2f;
+ * public class MyMojo extends AbstractMojo{}
+ * </pre>
+ * To use it, calling the <code>Javadoc</code> tool with the following:
+ * <pre>
+ * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoInheritByDefaultTypeTaglet'
+ * </pre>
+ * <b>Note</b>: This taglet is similar to call the <code>Javadoc</code> tool with the following:
+ * <pre>
+ * javadoc ... -tag 'inheritByDefault:t:Is this Mojo inherited'
+ * </pre>
+ *
+ * @see <a href="package-summary.html#package_description">package-summary.html</a>
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ */
+public class MojoInheritByDefaultTypeTaglet
+    extends AbstractMojoTypeTaglet
+{
+    private static final String NAME = JavaMojoAnnotation.INHERIT_BY_DEFAULT;
+
+    protected static final String HEADER = "Is this Mojo inherited";
+
+    /**
+     * @return By default, return the string defined in {@linkplain #HEADER}.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
+     * @see #HEADER
+     */
+    public String getHeader()
+    {
+        return HEADER;
+    }
+
+    /**
+     * @return <code>"true|false"</code> since <code>@inheritByDefault</code> has specified values.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
+     */
+    public String getAllowedValue()
+    {
+        return "true|false";
+    }
+
+    /**
+     * @return <code>null</code> since <code>@inheritByDefault</code> has no parameter.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
+     */
+    public String[] getAllowedParameterNames()
+    {
+        return null;
+    }
+
+    /**
+     * @return By default, return the name of this taglet.
+     * @see com.sun.tools.doclets.Taglet#getName()
+     * @see MojoInheritByDefaultTypeTaglet#NAME
+     */
+    public String getName()
+    {
+        return NAME;
+    }
+
+    /**
+     * Register this Taglet.
+     *
+     * @param tagletMap the map to register this tag to.
+     */
+    public static void register( Map tagletMap )
+    {
+        MojoInheritByDefaultTypeTaglet tag = new MojoInheritByDefaultTypeTaglet();
+        Taglet t = (Taglet) tagletMap.get( tag.getName() );
+        if ( t != null )
+        {
+            tagletMap.remove( tag.getName() );
+        }
+        tagletMap.put( tag.getName(), tag );
+    }
+}

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoInheritByDefaultTypeTaglet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoInheritByDefaultTypeTaglet.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoInstantiationStrategyTypeTaglet.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoInstantiationStrategyTypeTaglet.java?rev=632196&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoInstantiationStrategyTypeTaglet.java (added)
+++ maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoInstantiationStrategyTypeTaglet.java Thu Feb 28 17:35:16 2008
@@ -0,0 +1,115 @@
+package org.apache.maven.tools.plugin.javadoc;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.Map;
+
+import org.apache.maven.tools.plugin.extractor.java.JavaMojoAnnotation;
+
+import com.sun.tools.doclets.Taglet;
+
+/**
+ * The <tt>@instantiationStrategy</tt> tag is used to specify the instantiation strategy and has has parameter.
+ * <br/>
+ * The following is a sample declaration:
+ * <pre>
+ * &#x2f;&#x2a;&#x2a;
+ * &#x20;&#x2a; Dummy Mojo.
+ * &#x20;&#x2a;
+ * &#x20;&#x2a; &#64;instantiationStrategy &lt;per-lookup&gt;
+ * &#x20;&#x2a; ...
+ * &#x20;&#x2a;&#x2f;
+ * public class MyMojo extends AbstractMojo{}
+ * </pre>
+ * To use it, calling the <code>Javadoc</code> tool with the following:
+ * <pre>
+ * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoInstantiationStrategyTypeTaglet'
+ * </pre>
+ * <b>Note</b>: This taglet is similar to call the <code>Javadoc</code> tool with the following:
+ * <pre>
+ * javadoc ... -tag 'instantiationStrategy:t:Is instantiated with the strategy:'
+ * </pre>
+ *
+ * @see <a href="package-summary.html#package_description">package-summary.html</a>
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ */
+public class MojoInstantiationStrategyTypeTaglet
+    extends AbstractMojoTypeTaglet
+{
+    private static final String NAME = JavaMojoAnnotation.INSTANTIATION_STRATEGY;
+
+    protected static final String HEADER = "Is instantiated with the strategy";
+
+    /**
+     * @return By default, return the string defined in {@linkplain #HEADER}.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
+     * @see #HEADER
+     */
+    public String getHeader()
+    {
+        return HEADER;
+    }
+
+    /**
+     * @return <code>"*"</code> since <code>@instantiationStrategy</code> has value.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
+     */
+    public String getAllowedValue()
+    {
+        return "*";
+    }
+
+    /**
+     * @return <code>null</code> since <code>@instantiationStrategy</code> has no parameter.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
+     */
+    public String[] getAllowedParameterNames()
+    {
+        return null;
+    }
+
+    /**
+     * @return By default, return the name of this taglet.
+     * @see com.sun.tools.doclets.Taglet#getName()
+     * @see MojoInstantiationStrategyTypeTaglet#NAME
+     */
+    public String getName()
+    {
+        return NAME;
+    }
+
+    /**
+     * Register this Taglet.
+     *
+     * @param tagletMap the map to register this tag to.
+     */
+    public static void register( Map tagletMap )
+    {
+        MojoInstantiationStrategyTypeTaglet tag = new MojoInstantiationStrategyTypeTaglet();
+        Taglet t = (Taglet) tagletMap.get( tag.getName() );
+        if ( t != null )
+        {
+            tagletMap.remove( tag.getName() );
+        }
+        tagletMap.put( tag.getName(), tag );
+    }
+}

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoInstantiationStrategyTypeTaglet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoInstantiationStrategyTypeTaglet.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoParameterFieldTaglet.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoParameterFieldTaglet.java?rev=632196&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoParameterFieldTaglet.java (added)
+++ maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoParameterFieldTaglet.java Thu Feb 28 17:35:16 2008
@@ -0,0 +1,122 @@
+package org.apache.maven.tools.plugin.javadoc;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.Map;
+
+import org.apache.maven.tools.plugin.extractor.java.JavaMojoAnnotation;
+
+import com.sun.tools.doclets.Taglet;
+
+/**
+ * The <tt>@parameter</tt> tag is used to define a Mojo parameter and has annotation parameter.
+ * <br/>
+ * The following is a sample declaration:
+ * <pre>
+ * public class MyMojo extends AbstractMojo
+ * {
+ *   &#x2f;&#x2a;&#x2a;
+ *   &#x20;&#x2a; Dummy parameter.
+ *   &#x20;&#x2a;
+ *   &#x20;&#x2a; &#64;parameter &lt;alias="..."&gt; &lt;default-value="..."&gt; &lt;expression="..."&gt;
+ *   &#x20;&#x2a; &lt;implementation="..."&gt; &lt;property="..."&gt;
+ *   &#x20;&#x2a; ...
+ *   &#x20;&#x2a;&#x2f;
+ *   private Object parameterName;
+ * }
+ * </pre>
+ * To use it, calling the <code>Javadoc</code> tool with the following:
+ * <pre>
+ * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoParameterFieldTaglet'
+ * </pre>
+ *
+ * @see <a href="package-summary.html#package_description">package-summary.html</a>
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ */
+public class MojoParameterFieldTaglet
+    extends AbstractMojoFieldTaglet
+{
+    private static final String NAME = JavaMojoAnnotation.PARAMETER;
+
+    private static final String[] PARAMETERS_NAME = {
+        JavaMojoAnnotation.PARAMETER_ALIAS,
+        JavaMojoAnnotation.PARAMETER_DEFAULT_VALUE,
+        JavaMojoAnnotation.PARAMETER_EXPRESSION,
+        JavaMojoAnnotation.PARAMETER_IMPLEMENTATION,
+        JavaMojoAnnotation.PARAMETER_PROPERTY };
+
+    protected static final String HEADER = "Is defined by";
+
+    /**
+     * @return By default, return the string defined in {@linkplain #HEADER}.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
+     * @see #HEADER
+     */
+    public String getHeader()
+    {
+        return HEADER;
+    }
+
+    /**
+     * @return <code>null</code> since <code>@parameter</code> has no value.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
+     */
+    public String getAllowedValue()
+    {
+        return null;
+    }
+
+    /**
+     * @return <code>MojoParameterFieldTaglet#PARAMETERS_NAME</code> since <code>@parameter</code> has parameters.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
+     */
+    public String[] getAllowedParameterNames()
+    {
+        return PARAMETERS_NAME;
+    }
+
+    /**
+     * @return By default, return the name of this taglet.
+     * @see com.sun.tools.doclets.Taglet#getName()
+     * @see MojoParameterFieldTaglet#NAME
+     */
+    public String getName()
+    {
+        return NAME;
+    }
+
+    /**
+     * Register this Taglet.
+     *
+     * @param tagletMap the map to register this tag to.
+     */
+    public static void register( Map tagletMap )
+    {
+        MojoParameterFieldTaglet tag = new MojoParameterFieldTaglet();
+        Taglet t = (Taglet) tagletMap.get( tag.getName() );
+        if ( t != null )
+        {
+            tagletMap.remove( tag.getName() );
+        }
+        tagletMap.put( tag.getName(), tag );
+    }
+}

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoParameterFieldTaglet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoParameterFieldTaglet.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoPhaseTypeTaglet.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoPhaseTypeTaglet.java?rev=632196&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoPhaseTypeTaglet.java (added)
+++ maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoPhaseTypeTaglet.java Thu Feb 28 17:35:16 2008
@@ -0,0 +1,115 @@
+package org.apache.maven.tools.plugin.javadoc;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.Map;
+
+import org.apache.maven.tools.plugin.extractor.java.JavaMojoAnnotation;
+
+import com.sun.tools.doclets.Taglet;
+
+/**
+ * The <tt>@phase</tt> tag is used to reference the binded phase name of the Mojo and has has parameter.
+ * <br/>
+ * The following is a sample declaration:
+ * <pre>
+ * &#x2f;&#x2a;&#x2a;
+ * &#x20;&#x2a; Dummy Mojo.
+ * &#x20;&#x2a;
+ * &#x20;&#x2a; &#64;phase &lt;phaseName&gt;
+ * &#x20;&#x2a; ...
+ * &#x20;&#x2a;&#x2f;
+ * public class MyMojo extends AbstractMojo{}
+ * </pre>
+ * To use it, calling the <code>Javadoc</code> tool with the following:
+ * <pre>
+ * javadoc ... -taglet 'org.apache.maven.tools.plugin.javadoc.MojoPhaseTypeTaglet'
+ * </pre>
+ * <b>Note</b>: This taglet is similar to call the <code>Javadoc</code> tool with the following:
+ * <pre>
+ * javadoc ... -tag 'phase:t:Is binded to the specified phase of the standard build lifecycle:'
+ * </pre>
+ *
+ * @see <a href="package-summary.html#package_description">package-summary.html</a>
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ */
+public class MojoPhaseTypeTaglet
+    extends AbstractMojoTypeTaglet
+{
+    private static final String NAME = JavaMojoAnnotation.PHASE;
+
+    protected static final String HEADER = "Is binded to the specified phase of the standard build lifecycle";
+
+    /**
+     * @return By default, return the string defined in {@linkplain #HEADER}.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getHeader()
+     * @see #HEADER
+     */
+    public String getHeader()
+    {
+        return HEADER;
+    }
+
+    /**
+     * @return <code>"*"</code> since <code>@phase</code> has value.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedValue()
+     */
+    public String getAllowedValue()
+    {
+        return "*";
+    }
+
+    /**
+     * @return <code>null</code> since <code>@phase</code> has no parameter.
+     * @see org.apache.maven.tools.plugin.javadoc.AbstractMojoTaglet#getAllowedParameterNames()
+     */
+    public String[] getAllowedParameterNames()
+    {
+        return null;
+    }
+
+    /**
+     * @return By default, return the name of this taglet.
+     * @see com.sun.tools.doclets.Taglet#getName()
+     * @see MojoPhaseTypeTaglet#NAME
+     */
+    public String getName()
+    {
+        return NAME;
+    }
+
+    /**
+     * Register this Taglet.
+     *
+     * @param tagletMap the map to register this tag to.
+     */
+    public static void register( Map tagletMap )
+    {
+        MojoPhaseTypeTaglet tag = new MojoPhaseTypeTaglet();
+        Taglet t = (Taglet) tagletMap.get( tag.getName() );
+        if ( t != null )
+        {
+            tagletMap.remove( tag.getName() );
+        }
+        tagletMap.put( tag.getName(), tag );
+    }
+}

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoPhaseTypeTaglet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-javadoc/src/main/java/org/apache/maven/tools/plugin/javadoc/MojoPhaseTypeTaglet.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"



Mime
View raw message