You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2012/05/12 17:23:35 UTC

svn commit: r1337568 - in /maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/site: ./ apt/ apt/index.apt site.xml

Author: hboutemy
Date: Sat May 12 15:23:34 2012
New Revision: 1337568

URL: http://svn.apache.org/viewvc?rev=1337568&view=rev
Log:
added documentation, with the same example as Mojo Javadoc Tags

Added:
    maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/site/
    maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/site/apt/
    maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/site/apt/index.apt   (with props)
    maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/site/site.xml   (with props)

Added: maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/site/apt/index.apt?rev=1337568&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/site/apt/index.apt (added)
+++ maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/site/apt/index.apt Sat May 12 15:23:34 2012
@@ -0,0 +1,103 @@
+ ------
+ Introduction
+ ------
+ Hervé Boutemy
+ ------
+ 2012-05-12
+ ------
+
+~~ 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/doxia/references/apt-format.html
+
+Maven Plugin Tool for Annotations
+
+ The Maven Plugin Tool for Annotations is the impl of {{{../maven-plugin-tools-api/index.html}maven-plugin-tools-api}}
+ to extract descriptors from plugins written in Java with
+ {{{../maven-plugin-annotations/index.html}Maven Plugin Tools Java 5 Annotations}}.
+
+* Supported Mojo Javadoc Tags
+
++---------+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugins.annotations.Execute;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+
+/**
+ * Mojo Description. @Mojo( name = "<goalName>" ) is the minimal required annotation.
+ * @since <since-text>
+ * @deprecated <deprecated-text>
+ */
+@Mojo( name = "<goalName>",
+       aggregator = <false|true>, 
+       configurator = "<roleHint>",
+       executionStrategy = "<once-per-session|always>",
+       inheritByDefault = <true|false>,
+       instantiationStrategy = "<per-lookup|singleton|keep-alive|poolable>",
+       defaultPhase = "<phaseName>",
+       requiresDependencyResolution = "<compile|runtime|compile+runtime|test>",
+       requiresDependencyCollection = "<compile|runtime|compile+runtime|test>", // (since Maven 3.0)
+       requiresDirectInvocation = <false|true>,
+       requiresOnline = <false|true>,
+       requiresProject = <true|false>,
+       requiresReports = <false|true>, // (unsupported since Maven 3.0)
+       threadSafe = <false|true> ) // (since Maven 3.0)
+@Execute( goal = "<goalName>",
+          phase = LifecyclePhase.<phase>
+          lifecycle = "<lifecycleId>" )
+public class MyMojo
+    extends AbstractMojo
+{
+    /**
+     * @since <since-text>
+     * @deprecated <deprecated-text>
+     */
+    @Parameter( alias = "myAlias",
+                expression = "${aSystemProperty}",
+                defaultValue = "${anExpression}",
+                readonly = <false|true>
+                required = <false|true> )
+    private String parameter;
+
+    /**
+     * @since <since-text>
+     * @deprecated <deprecated-text>
+     */
+    @Component( role = "...",
+                roleHint="..." )
+     // @readonly
+     // @required
+    private MyComponent component;
+
+    public void execute()
+    {
+        ...
+    }
+}
++---------+
+
+* See also
+
+ * {{{../maven-plugin-annotations/index.html}Maven Plugin Tools Java 5 Annotations}}
+
+ * {{{/developers/mojo-api-specification.html#The_Descriptor_and_Annotations}Mojo API Specification}}
+
+ * {{{/ref/current/maven-plugin-api/plugin.html}META-INF/maven/plugin.xml plugin descriptor}}

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/site/apt/index.apt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/site/apt/index.apt
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/site/site.xml?rev=1337568&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/site/site.xml (added)
+++ maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/site/site.xml Sat May 12 15:23:34 2012
@@ -0,0 +1,31 @@
+<?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/DECORATION/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd">
+  <body>
+    <menu name="Overview">
+      <item name="Introduction" href="index.html"/>
+      <item name="JavaDocs" href="apidocs/index.html"/>
+      <item name="Source Xref" href="xref/index.html"/>
+      <!--item name="FAQ" href="faq.html"/-->
+    </menu>
+  </body>
+</project>

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/site/site.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/site/site.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: maven/plugin-tools/trunk/maven-plugin-tools-annotations/src/site/site.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain