------ Introduction ------ Vincent Siveton Hervé Boutemy ------ 2011-10-23 ------ ~~ 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 Java Annotated with Mojo Javadoc Tags The Maven Plugin Tool for Java is the Java impl of {{{../maven-plugin-tools-api/index.html}maven-plugin-tools-api}} to extract descriptors for plugins written in Java annotated with Mojo Javadoc Tags. * Supported Mojo Javadoc Tags +---------+ import org.apache.maven.execution.MavenSession; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecution; import org.apache.maven.plugin.descriptor.PluginDescriptor; import org.apache.maven.project.MavenProject; import org.apache.maven.settings.Settings; /** * Mojo Description: goal is the only required annotation. * * @goal * @aggregator * @configurator * @execute phase="" lifecycle="" goal="" * @executionStrategy * @inheritByDefault * @instantiationStrategy * @phase * @requiresDependencyResolution * @requiresDependencyCollection (since Maven 3.0) * @requiresDirectInvocation * @requiresOnline * @requiresProject * @requiresReports (unsupported since Maven 3.0) * @threadSafe (since Maven 3.0) * @since * @deprecated */ public class MyMojo extends AbstractMojo { /** * @parameter alias="myAlias" implementation="" property="aProperty" default-value="${anExpression}" * @readonly * @required * @since * @deprecated */ private String parameter; /** * @component role="..." roleHint="..." */ private Component component; /** * @component */ private MavenSession session; /** * @component */ private MavenProject project; /** * @component */ private MojoExecution mojo; /** * @component */ private PluginDescriptor plugin; /** * @component */ private Settings settings; public void execute() { ... } } +---------+ <>: before 3.0, <<>> was replaced by <<>>, with <<<${ }>>> required (<<>>), but starting with 3.0, you can omit it (<<>>), or preferably use <<>>. * See also * {{{/developers/mojo-api-specification.html#The_Descriptor_and_Annotations}Mojo API Specification}} * {{{/ref/current/maven-plugin-api/plugin.html}<<>> plugin descriptor}}