From 72dada3d215468d0f1f992597d36b0dbf6117c08 Mon Sep 17 00:00:00 2001 From: Herve Boutemy Date: Sat, 12 May 2012 15:23:34 +0000 Subject: [PATCH] added documentation, with the same example as Mojo Javadoc Tags git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1337568 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/site/apt/index.apt | 103 ++++++++++++++++++ .../src/site/site.xml | 31 ++++++ 2 files changed, 134 insertions(+) create mode 100644 maven-plugin-tools-annotations/src/site/apt/index.apt create mode 100644 maven-plugin-tools-annotations/src/site/site.xml diff --git a/maven-plugin-tools-annotations/src/site/apt/index.apt b/maven-plugin-tools-annotations/src/site/apt/index.apt new file mode 100644 index 0000000..815c474 --- /dev/null +++ b/maven-plugin-tools-annotations/src/site/apt/index.apt @@ -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 = "" ) is the minimal required annotation. + * @since + * @deprecated + */ +@Mojo( name = "", + aggregator = , + configurator = "", + executionStrategy = "", + inheritByDefault = , + instantiationStrategy = "", + defaultPhase = "", + requiresDependencyResolution = "", + requiresDependencyCollection = "", // (since Maven 3.0) + requiresDirectInvocation = , + requiresOnline = , + requiresProject = , + requiresReports = , // (unsupported since Maven 3.0) + threadSafe = ) // (since Maven 3.0) +@Execute( goal = "", + phase = LifecyclePhase. + lifecycle = "" ) +public class MyMojo + extends AbstractMojo +{ + /** + * @since + * @deprecated + */ + @Parameter( alias = "myAlias", + expression = "${aSystemProperty}", + defaultValue = "${anExpression}", + readonly = + required = ) + private String parameter; + + /** + * @since + * @deprecated + */ + @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}} diff --git a/maven-plugin-tools-annotations/src/site/site.xml b/maven-plugin-tools-annotations/src/site/site.xml new file mode 100644 index 0000000..aa167ff --- /dev/null +++ b/maven-plugin-tools-annotations/src/site/site.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + +