You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2015/04/09 14:10:46 UTC

svn commit: r1672305 - in /maven/plugins/trunk/maven-eclipse-plugin: ./ src/main/java/org/apache/maven/plugin/eclipse/ src/main/java/org/apache/maven/plugin/ide/

Author: khmarbaise
Date: Thu Apr  9 12:10:45 2015
New Revision: 1672305

URL: http://svn.apache.org/r1672305
Log:
[MECLIPSE-758] Use mojo annotations
 Patch of Joseph Walton applied.

Modified:
    maven/plugins/trunk/maven-eclipse-plugin/pom.xml
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/AbstractWorkspaceMojo.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/ConfigureWorkspaceMojo.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseCleanMojo.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseToMavenMojo.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/InstallPluginsMojo.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/MyEclipseCleanMojo.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/MyEclipsePlugin.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadCleanMojo.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadPlugin.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RemoveCacheMojo.java
    maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java

Modified: maven/plugins/trunk/maven-eclipse-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/pom.xml?rev=1672305&r1=1672304&r2=1672305&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/pom.xml Thu Apr  9 12:10:45 2015
@@ -77,6 +77,11 @@ under the License.
       <version>${mavenVersion}</version>
     </dependency>
     <dependency>
+      <groupId>org.apache.maven.plugin-tools</groupId>
+      <artifactId>maven-plugin-annotations</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-model</artifactId>
       <version>${mavenVersion}</version>
@@ -282,10 +287,9 @@ under the License.
     </pluginManagement>
     <plugins>
       <plugin>
-        <!-- lock down to old version as newer version aborts build upon no mojos as required during ITs, see FIXME below -->
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-plugin-plugin</artifactId>
-        <version>2.4.3</version>
+        <version>3.4</version>
       </plugin>
       <plugin>
         <artifactId>maven-enforcer-plugin</artifactId>

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/AbstractWorkspaceMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/AbstractWorkspaceMojo.java?rev=1672305&r1=1672304&r2=1672305&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/AbstractWorkspaceMojo.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/AbstractWorkspaceMojo.java Thu Apr  9 12:10:45 2015
@@ -20,27 +20,19 @@ package org.apache.maven.plugin.eclipse;
 
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugins.annotations.Parameter;
 
-/**
- * @requiresProject true
- */
 public abstract class AbstractWorkspaceMojo
     extends AbstractMojo
 {
 
     /**
      * Directory location of the <code>Eclipse</code> workspace.
-     * 
-     * @parameter expression="${eclipse.workspace}"
-     * @required
      */
+    @Parameter( property = "eclipse.workspace", required = true )
     private String workspace;
 
-    /**
-     * @parameter expression="${localRepository}"
-     * @required
-     * @readonly
-     */
+    @Parameter( property = "localRepository", required = true, readonly = true )
     private ArtifactRepository localRepository;
 
     public ArtifactRepository getLocalRepository()

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/ConfigureWorkspaceMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/ConfigureWorkspaceMojo.java?rev=1672305&r1=1672304&r2=1672305&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/ConfigureWorkspaceMojo.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/ConfigureWorkspaceMojo.java Thu Apr  9 12:10:45 2015
@@ -20,6 +20,8 @@ import java.net.URL;
 
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.eclipse.writers.workspace.EclipseWorkspaceWriter;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
 
 /**
  * Configures The following Eclipse Workspace features:
@@ -27,26 +29,22 @@ import org.apache.maven.plugin.eclipse.w
  * <li>Adds the classpath variable MAVEN_REPO to Eclipse.</li>
  * <li>Optionally load Eclipse code style file via a URL.</li>
  * </ul>
- * 
- * @goal configure-workspace
- * @requiresProject false
  */
+@Mojo( name = "configure-workspace", requiresProject = false )
 public class ConfigureWorkspaceMojo
     extends AbstractWorkspaceMojo
 {
     /**
      * Point to a URL containing code styles content.
-     * 
-     * @parameter expression="${eclipse.workspaceCodeStylesURL}"
      */
+    @Parameter( property = "eclipse.workspaceCodeStylesURL" )
     private String workspaceCodeStylesURL;
 
     /**
      * Name of a profile in <code>workspaceCodeStylesURL</code> to activate. Default is the first profile name in the
      * code style file in <code>workspaceCodeStylesURL</code>
-     * 
-     * @parameter expression="${eclipse.workspaceActiveCodeStyleProfileName}"
      */
+    @Parameter( property = "eclipse.workspaceActiveCodeStyleProfileName" )
     private String workspaceActiveCodeStyleProfileName;
 
     public void execute()

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseCleanMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseCleanMojo.java?rev=1672305&r1=1672304&r2=1672305&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseCleanMojo.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseCleanMojo.java Thu Apr  9 12:10:45 2015
@@ -22,14 +22,15 @@ import org.apache.maven.plugin.AbstractM
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.eclipse.writers.workspace.EclipseWorkspaceWriter;
 import org.apache.maven.plugin.ide.IdeUtils;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
 
 import java.io.File;
 
 /**
  * Deletes the .project, .classpath, .wtpmodules files and .settings folder used by Eclipse.
- *
- * @goal clean
  */
+@Mojo( name = "clean" )
 public class EclipseCleanMojo
     extends AbstractMojo
 {
@@ -51,30 +52,26 @@ public class EclipseCleanMojo
 
     /**
      * Packaging for the current project.
-     *
-     * @parameter expression="${project.packaging}"
      */
+    @Parameter( property = "project.packaging" )
     private String packaging;
 
     /**
      * The root directory of the project
-     *
-     * @parameter expression="${basedir}"
      */
+    @Parameter( property = "basedir" )
     private File basedir;
 
     /**
      * Skip the operation when true.
-     *
-     * @parameter expression="${eclipse.skip}" default-value="false"
      */
+    @Parameter( property = "eclipse.skip", defaultValue = "false" )
     private boolean skip;
 
     /**
      * additional generic configuration files for eclipse
-     *
-     * @parameter
      */
+    @Parameter
     private EclipseConfigFile[] additionalConfig;
 
     /**

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java?rev=1672305&r1=1672304&r2=1672305&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java Thu Apr  9 12:10:45 2015
@@ -56,6 +56,11 @@ import org.apache.maven.plugin.ide.Abstr
 import org.apache.maven.plugin.ide.IdeDependency;
 import org.apache.maven.plugin.ide.IdeUtils;
 import org.apache.maven.plugin.ide.JeeUtils;
+import org.apache.maven.plugins.annotations.Component;
+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;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.settings.MavenSettingsBuilder;
 import org.apache.maven.settings.Proxy;
@@ -84,13 +89,13 @@ import org.codehaus.plexus.util.xml.pull
  * </ul>
  * If this goal is run on a multiproject root, dependencies between modules will be configured as direct project
  * dependencies in Eclipse (unless <code>useProjectReferences</code> is set to <code>false</code>).
- * 
+ *
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @author <a href="mailto:fgiust@apache.org">Fabrizio Giustina</a>
  * @version $Id$
- * @goal eclipse
- * @execute phase="generate-resources"
  */
+@Mojo( name = "eclipse" )
+@Execute( phase = LifecyclePhase.GENERATE_RESOURCES )
 public class EclipsePlugin
     extends AbstractIdeSupportMojo
 {
@@ -162,52 +167,49 @@ public class EclipsePlugin
     /**
      * List of eclipse project natures. By default the <code>org.eclipse.jdt.core.javanature</code> nature plus the
      * needed WTP natures are added. Natures added using this property <strong>replace</strong> the default list.
-     * 
+     *
      * <pre>
      * &lt;projectnatures&gt;
      *    &lt;projectnature&gt;org.eclipse.jdt.core.javanature&lt;/projectnature&gt;
      *    &lt;projectnature&gt;org.eclipse.wst.common.modulecore.ModuleCoreNature&lt;/projectnature&gt;
      * &lt;/projectnatures&gt;
      * </pre>
-     * 
-     * @parameter
      */
+    @Parameter
     private List projectnatures;
 
     /**
-     * List of artifacts, represented as <code>groupId:artifactId</code>, to exclude from the eclipse classpath, 
+     * List of artifacts, represented as <code>groupId:artifactId</code>, to exclude from the eclipse classpath,
      * being provided by some eclipse classPathContainer.
      *
      * @see http://jira.codehaus.org/browse/MECLIPSE-79
      * @since 2.5
-     * @parameter
      */
+    @Parameter
     private List excludes;
 
     /**
      * List of eclipse project natures to be added to the default ones.
-     * 
+     *
      * <pre>
      * &lt;additionalProjectnatures&gt;
      *    &lt;projectnature&gt;org.springframework.ide.eclipse.core.springnature&lt;/projectnature&gt;
      * &lt;/additionalProjectnatures&gt;
      * </pre>
-     * 
-     * @parameter
      */
+    @Parameter
     private List additionalProjectnatures;
 
     /**
      * List of eclipse project facets to be added to the default ones.
-     * 
+     *
      * <pre>
      * &lt;additionalProjectFacets&gt;
      *    &lt;jst.jsf&gt;1.1&lt;jst.jsf/&gt;
      * &lt;/additionalProjectFacets&gt;
      * </pre>
-     * 
-     * @parameter
      */
+    @Parameter
     private Map additionalProjectFacets;
 
     /**
@@ -225,9 +227,8 @@ public class EclipsePlugin
      * </pre>
      * 
      * For new style, see <code>additionalBuildCommands</code>.
-     * 
-     * @parameter
      */
+    @Parameter
     private List buildcommands;
 
     /**
@@ -255,9 +256,8 @@ public class EclipsePlugin
      * 
      * Note the difference between <code>build<strong>c</strong>ommand</code> and
      * <code>build<strong>C</strong>ommand</code>. You can mix and match old and new-style configuration entries.
-     * 
-     * @parameter
      */
+    @Parameter
     private List additionalBuildcommands;
 
     /**
@@ -271,58 +271,49 @@ public class EclipsePlugin
      *    &lt;classpathContainer&gt;org.eclipse.jst.j2ee.internal.web.container/artifact&lt;/classpathContainer&gt;
      * &lt;/classpathContainers&gt;
      * </pre>
-     * 
-     * @parameter
      */
+    @Parameter
     private List classpathContainers;
 
     /**
      * Enables/disables the downloading of source attachments. Defaults to false. DEPRECATED - use downloadSources
-     * 
-     * @parameter expression="${eclipse.downloadSources}"
+     *
      * @deprecated use downloadSources
      */
+    @Parameter( property = "eclipse.downloadSources" )
     private boolean eclipseDownloadSources;
 
     /**
      * Eclipse workspace directory.
-     * 
-     * @parameter expression="${eclipse.projectDir}" alias="outputDir"
      */
+    @Parameter( property = "eclipse.projectDir", alias = "outputDir" )
     private File eclipseProjectDir;
 
     /**
      * When set to false, the plugin will not create sub-projects and instead reference those sub-projects using the
      * installed package in the local repository
-     * 
-     * @parameter expression="${eclipse.useProjectReferences}" default-value="true"
-     * @required
      */
+    @Parameter( property = "eclipse.useProjectReferences", defaultValue = "true", required = true )
     private boolean useProjectReferences;
 
     /**
      * The default output directory
-     * 
-     * @parameter expression="${outputDirectory}" alias="outputDirectory"
-     *            default-value="${project.build.outputDirectory}"
-     * @required
      */
+    @Parameter( property = "outputDirectory", alias = "outputDirectory", defaultValue = "${project.build.outputDirectory}", required = true )
     private File buildOutputDirectory;
 
     /**
      * The version of WTP for which configuration files will be generated. The default value is "none" (don't generate
      * WTP configuration), supported versions are "R7", "1.0", "1.5" and "2.0"
-     * 
-     * @parameter expression="${wtpversion}" default-value="none"
      */
+    @Parameter( property = "wtpversion", defaultValue = "none" )
     private String wtpversion;
 
     /**
      * JEE context name of the WTP module. ( ex. WEB context name ). You can use "ROOT" if you want to map the webapp
      * to the root context.
-     * 
-     * @parameter expression="${wtpContextName}"
      */
+    @Parameter( property = "wtpContextName" )
     private String wtpContextName;
 
     /**
@@ -332,9 +323,8 @@ public class EclipsePlugin
 
     /**
      * The relative path of the manifest file
-     * 
-     * @parameter expression="${eclipse.manifest}" default-value="${basedir}/META-INF/MANIFEST.MF"
      */
+    @Parameter( property = "eclipse.manifest", defaultValue = "${basedir}/META-INF/MANIFEST.MF" )
     private File manifest;
 
     /**
@@ -403,34 +393,30 @@ public class EclipsePlugin
      *  &lt;/dependencies&gt;
      * &lt;/plugin&gt;
      * </pre>
-     * 
-     * @parameter
      */
+    @Parameter
     private EclipseConfigFile[] additionalConfig;
 
     /**
      * If set to <code>true</code>, the version number of the artifact is appended to the name of the generated Eclipse
      * project. See projectNameTemplate for other options.
-     * 
-     * @parameter expression="${eclipse.addVersionToProjectName}" default-value="false"
      */
+    @Parameter( property = "eclipse.addVersionToProjectName", defaultValue = "false" )
     private boolean addVersionToProjectName;
 
     /**
      * If set to <code>true</code>, the groupId of the artifact is appended to the name of the generated Eclipse
      * project. See projectNameTemplate for other options.
-     * 
-     * @parameter expression="${eclipse.addGroupIdToProjectName}" default-value="false"
      */
+    @Parameter( property = "eclipse.addGroupIdToProjectName", defaultValue = "false" )
     private boolean addGroupIdToProjectName;
 
     /**
      * Allows configuring the name of the eclipse projects. This property if set wins over addVersionToProjectName and
      * addGroupIdToProjectName You can use <code>[groupId]</code>, <code>[artifactId]</code> and <code>[version]</code>
      * variables. eg. <code>[groupId].[artifactId]-[version]</code>
-     * 
-     * @parameter expression="${eclipse.projectNameTemplate}"
      */
+    @Parameter( property = "eclipse.projectNameTemplate" )
     private String projectNameTemplate;
 
     /**
@@ -445,52 +431,40 @@ public class EclipsePlugin
 
     /**
      * Must the manifest files be written for java projects so that that the jee classpath for wtp is correct.
-     * 
-     * @parameter expression="${eclipse.wtpmanifest}" default-value="false"
      */
+    @Parameter( property = "eclipse.wtpmanifest", defaultValue = "false" )
     private boolean wtpmanifest;
 
     /**
      * Must the application files be written for ear projects in a separate directory.
-     * 
-     * @parameter expression="${eclipse.wtpapplicationxml}" default-value="false"
      */
+    @Parameter( property = "eclipse.wtpapplicationxml", defaultValue = "false" )
     private boolean wtpapplicationxml;
 
     /**
      * What WTP defined server to use for deployment informations.
-     * 
-     * @parameter expression="${eclipse.wtpdefaultserver}"
      */
+    @Parameter( property = "eclipse.wtpdefaultserver" )
     private String wtpdefaultserver;
 
     private WorkspaceConfiguration workspaceConfiguration;
 
     /**
      * ResourceManager for getting additonalConfig files from resources
-     * 
-     * @component
-     * @required
-     * @readonly
      */
+    @Component
     private ResourceManager locator;
 
     /**
      * WagonManager for accessing internet resources.
-     *  
-     * @component
-     * @required
-     * @readonly
      */
+    @Component
     private WagonManager wagonManager;
-    
+
     /**
      * MavenSettingsBuilder for accessing settings.xml.
-     *  
-     * @component
-     * @required
-     * @readonly
      */
+    @Component
     private MavenSettingsBuilder mavenSettingsBuilder;
 
     /**
@@ -499,35 +473,33 @@ public class EclipsePlugin
      * settings as the reactor projects, but the project name template my differ. The pom's in the workspace projects
      * may not contain variables in the artefactId, groupId and version tags. If workspace is not defined, then an
      * attempt to locate it by checking up the directory hierarchy will be made.
-     * 
+     *
      * @since 2.5
-     * @parameter expression="${eclipse.workspace}"
      */
+    @Parameter( property = "eclipse.workspace" )
     protected File workspace;
 
     /**
      * Limit the use of project references to the current workspace. No project references will be created to projects
      * in the reactor when they are not available in the workspace.
-     * 
-     * @parameter expression="${eclipse.limitProjectReferencesToWorkspace}" default-value="false"
      */
+    @Parameter( property = "eclipse.limitProjectReferencesToWorkspace", defaultValue = "false" )
     protected boolean limitProjectReferencesToWorkspace;
 
     /**
      * The version of AJDT for which configuration files will be generated. The default value is "1.5", supported
      * versions are "none" (AJDT support disabled), "1.4", and "1.5".
-     * 
-     * @parameter expression="${eclipse.ajdtVersion}" default-value="none"
      */
+    @Parameter( property = "eclipse.ajdtVersion", defaultValue = "none" )
     private String ajdtVersion;
 
     /**
      * List of exclusions to add to the source directories on the classpath. Adds excluding="" to the classpathentry of
      * the eclipse .classpath file. [MECLIPSE-104]
-     * 
+     *
      * @since 2.6.1
-     * @parameter
      */
+    @Parameter
     private List sourceExcludes;
 
     /**
@@ -541,8 +513,8 @@ public class EclipsePlugin
      * [MECLIPSE-104]
      * 
      * @since 2.6.1
-     * @parameter
      */
+    @Parameter
     private List sourceIncludes;
 
     /**
@@ -574,8 +546,8 @@ public class EclipsePlugin
      * </pre>
      * 
      * @since 2.8
-     * @parameter
      */
+    @Parameter
     private List linkedResources;
     
     /**
@@ -584,8 +556,8 @@ public class EclipsePlugin
      * loaded after 3rd party jars, so enabling it is not suggested.
      * 
      * @since 2.9
-     * @parameter expression="${eclipse.classpathContainersLast}" default-value="false"
      */
+    @Parameter( property = "eclipse.classpathContainersLast", defaultValue = "false" )
     protected boolean classpathContainersLast;
     
     /**
@@ -597,8 +569,8 @@ public class EclipsePlugin
      * is no concept in eclipse of "phases" with different set of source dirs and dependencies like we have in maven.
      * 
      * @since 2.9
-     * @parameter expression="${eclipse.testSourcesLast}" default-value="false"
      */
+    @Parameter( property = "eclipse.testSourcesLast", defaultValue = "false" )
     protected boolean testSourcesLast;
     
     /**
@@ -619,8 +591,8 @@ public class EclipsePlugin
      * </table>
      * 
      * @since 2.9
-     * @parameter expression="${eclipse.jeeversion}"
      */
+    @Parameter( property = "eclipse.jeeversion" )
     protected String jeeversion;
 
     protected final boolean isJavaProject()

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseToMavenMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseToMavenMojo.java?rev=1672305&r1=1672304&r2=1672305&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseToMavenMojo.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipseToMavenMojo.java Thu Apr  9 12:10:45 2015
@@ -39,6 +39,9 @@ import org.apache.maven.plugin.MojoFailu
 import org.apache.maven.plugin.eclipse.osgiplugin.EclipseOsgiPlugin;
 import org.apache.maven.plugin.eclipse.osgiplugin.ExplodedPlugin;
 import org.apache.maven.plugin.eclipse.osgiplugin.PackagedPlugin;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.project.artifact.ProjectArtifactMetadata;
 import org.codehaus.plexus.PlexusConstants;
 import org.codehaus.plexus.PlexusContainer;
@@ -72,9 +75,8 @@ import java.util.regex.Pattern;
  * @author Fabrizio Giustina
  * @author <a href="mailto:carlos@apache.org">Carlos Sanchez</a>
  * @version $Id$
- * @goal to-maven
- * @requiresProject false
  */
+@Mojo( name = "to-maven", requiresProject = false )
 public class EclipseToMavenMojo
     extends AbstractMojo
     implements Contextualizable
@@ -97,53 +99,44 @@ public class EclipseToMavenMojo
 
     /**
      * Local maven repository.
-     *
-     * @parameter expression="${localRepository}"
-     * @required
-     * @readonly
      */
+    @Parameter( property = "localRepository", required = true, readonly = true )
     private ArtifactRepository localRepository;
 
     /**
      * ArtifactRepositoryFactory component.
-     *
-     * @component
      */
+    @Component
     private ArtifactRepositoryFactory artifactRepositoryFactory;
 
     /**
      * ArtifactFactory component.
-     *
-     * @component
      */
+    @Component
     private ArtifactFactory artifactFactory;
 
     /**
      * ArtifactInstaller component.
-     *
-     * @component
      */
+    @Component
     protected ArtifactInstaller installer;
 
     /**
      * ArtifactDeployer component.
-     *
-     * @component
      */
+    @Component
     private ArtifactDeployer deployer;
 
     /**
      * Eclipse installation dir. If not set, a value for this parameter will be asked on the command line.
-     *
-     * @parameter expression="${eclipseDir}"
      */
+    @Parameter( property = "eclipseDir" )
     private File eclipseDir;
 
     /**
      * Input handler, needed for comand line handling.
-     *
-     * @component
      */
+    @Component
     protected InputHandler inputHandler;
 
     /**
@@ -152,17 +145,15 @@ public class EclipseToMavenMojo
      * release <code>3.2</code> can be named <code>org.eclipse.core.filesystem_1.0.0.v20060603.jar</code>. It's usually
      * handy to not to include this qualifier when generating maven artifacts for major releases, while it's needed when
      * working with eclipse integration/nightly builds.
-     *
-     * @parameter expression="${stripQualifier}" default-value="false"
      */
+    @Parameter( property = "stripQualifier", defaultValue = "false" )
     private boolean stripQualifier;
 
     /**
      * Specifies a remote repository to which generated artifacts should be deployed to. If this property is specified,
      * artifacts are also deployed to the remote repo. The format for this parameter is <code>id::layout::url</code>
-     *
-     * @parameter expression="${deployTo}"
      */
+    @Parameter( property = "deployTo" )
     private String deployTo;
 
     /**

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/InstallPluginsMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/InstallPluginsMojo.java?rev=1672305&r1=1672304&r2=1672305&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/InstallPluginsMojo.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/InstallPluginsMojo.java Thu Apr  9 12:10:45 2015
@@ -34,6 +34,10 @@ import org.apache.maven.plugin.AbstractM
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugin.logging.Log;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.plugins.annotations.ResolutionScope;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.MavenProjectBuilder;
 import org.apache.maven.project.ProjectBuildingException;
@@ -47,11 +51,10 @@ import org.codehaus.plexus.util.FileUtil
 
 /**
  * Install plugins resolved from the Maven repository system into an Eclipse instance.
- * 
- * @goal install-plugins
+ *
  * @author jdcasey
- * @requiresDependencyResolution compile
  */
+@Mojo( name = "install-plugins", requiresDependencyResolution = ResolutionScope.COMPILE )
 public class InstallPluginsMojo
     extends AbstractMojo
 {
@@ -64,75 +67,61 @@ public class InstallPluginsMojo
 
     /**
      * This is the installed base directory of the Eclipse instance you want to modify.
-     * 
-     * @parameter expression="${eclipseDir}"
      */
+    @Parameter( property = "eclipseDir" )
     private File eclipseDir;
 
     /**
      * Determines whether this mojo leaves existing installed plugins as-is, or overwrites them.
-     * 
-     * @parameter expression="${overwrite}" default-value="false"
      */
+    @Parameter( property = "overwrite", defaultValue = "false" )
     private boolean overwrite;
 
     /**
      * The list of resolved dependencies from the current project. Since we're not resolving the dependencies by hand
      * here, the build will fail if some of these dependencies do not resolve.
-     * 
-     * @parameter default-value="${project.artifacts}"
-     * @required
-     * @readonly
      */
+    @Parameter( property = "project.artifacts", required = true, readonly = true )
     private Collection artifacts;
 
     /**
      * Comma-delimited list of dependency &lt;type/&gt; values which will be installed in the eclipse instance's plugins
      * directory.
-     * 
-     * @parameter expression="${pluginDependencyTypes}" default-value="jar"
      */
+    @Parameter( property = "pluginDependencyTypes", defaultValue = "jar" )
     private String pluginDependencyTypes;
 
     /**
      * The location of the Maven local repository, from which to install resolved dependency plugins.
-     * 
-     * @parameter default-value="${localRepository}"
-     * @required
-     * @readonly
      */
+    @Parameter( property = "localRepository", required = true, readonly = true )
     private ArtifactRepository localRepository;
 
     /**
      * Used to retrieve the project metadata (POM) associated with each plugin dependency, to help determine whether
      * that plugin should be installed as a jar, or expanded into a directory.
-     * 
-     * @component
      */
+    @Component
     private MavenProjectBuilder projectBuilder;
 
     /**
      * Used to configure and retrieve an appropriate tool for extracting each resolved plugin dependency. It is
      * conceivable that some resolved dependencies could be zip files, jar files, or other types, so the manager
      * approach is a convenient way to provide extensibility here.
-     * 
-     * @component
      */
+    @Component
     private ArchiverManager archiverManager;
 
     /**
      * Input handler, needed for comand line handling.
-     * 
-     * @component
      */
+    @Component
     private InputHandler inputHandler;
 
     // calculated below. Value will be ${eclipseDir}/plugins.
     private File pluginsDir;
 
-    /**
-     * @component
-     */
+    @Component
     private Maven2OsgiConverter maven2OsgiConverter;
 
     public InstallPluginsMojo()

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/MyEclipseCleanMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/MyEclipseCleanMojo.java?rev=1672305&r1=1672304&r2=1672305&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/MyEclipseCleanMojo.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/MyEclipseCleanMojo.java Thu Apr  9 12:10:45 2015
@@ -23,15 +23,16 @@ package org.apache.maven.plugin.eclipse;
 import java.io.File;
 
 import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
 
 /**
  * Deletes configuration files used by MyEclipse
- * 
+ *
  * @author Olivier Jacob
- * @goal myeclipse-clean
  * @since 2.5
- * @phase
  */
+@Mojo( name = "myeclipse-clean", defaultPhase = LifecyclePhase.NONE )
 public class MyEclipseCleanMojo
     extends EclipseCleanMojo
 {

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/MyEclipsePlugin.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/MyEclipsePlugin.java?rev=1672305&r1=1672304&r2=1672305&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/MyEclipsePlugin.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/MyEclipsePlugin.java Thu Apr  9 12:10:45 2015
@@ -32,15 +32,19 @@ import org.apache.maven.plugin.eclipse.w
 import org.apache.maven.plugin.eclipse.writers.myeclipse.MyEclipseStrutsDataWriter;
 import org.apache.maven.plugin.ide.IdeUtils;
 import org.apache.maven.plugin.ide.JeeUtils;
+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;
 
 /**
  * Generates MyEclipse configuration files
- * 
+ *
  * @author <a href="mailto:olivier.jacob@gmail.com">Olivier Jacob</a>
- * @goal myeclipse
  * @since 2.5
- * @execute phase="generate-resources"
  */
+@Mojo( name = "myeclipse" )
+@Execute( phase = LifecyclePhase.GENERATE_RESOURCES )
 public class MyEclipsePlugin
     extends EclipsePlugin
 {
@@ -89,9 +93,8 @@ public class MyEclipsePlugin
      *     &lt;basedir&gt;src/main/resources&lt;/basedir&gt;
      *   &lt;/spring&gt;
      * </pre>
-     * 
-     * @parameter
      */
+    @Parameter
     private Map spring;
 
     /**
@@ -104,9 +107,8 @@ public class MyEclipsePlugin
      *     &lt;session-factory-id&gt;mySessionFactory&lt;/session-factory-id&gt;
      *   &lt;/hibernate&gt;
      * </pre>
-     * 
-     * @parameter
      */
+    @Parameter
     private Map hibernate;
 
     /**
@@ -121,9 +123,8 @@ public class MyEclipsePlugin
      *     &lt;base-package&gt;1.2.9&lt;/base-package&gt;
      *   &lt;/struts&gt;
      * </pre>
-     * 
-     * @parameter
      */
+    @Parameter
     private Map struts;
 
     /**

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadCleanMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadCleanMojo.java?rev=1672305&r1=1672304&r2=1672305&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadCleanMojo.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadCleanMojo.java Thu Apr  9 12:10:45 2015
@@ -23,25 +23,24 @@ import java.io.File;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.ide.IdeUtils;
 import org.apache.maven.plugin.ide.JeeUtils;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.util.FileUtils;
 
 /**
  * Deletes the config files used by Rad-6. the files .j2ee and the file .websettings
- * 
+ *
  * @author <a href="mailto:nir@cfc.at">Richard van Nieuwenhoven</a>
- * @goal rad-clean
  */
+@Mojo( name = "rad-clean" )
 public class RadCleanMojo
     extends EclipseCleanMojo
 {
     /**
      * The project whose project files to clean.
-     * 
-     * @parameter expression="${project}"
-     * @required
-     * @readonly
      */
+    @Parameter( property = "project", required = true, readonly = true )
     private MavenProject project;
 
     protected void cleanExtras()

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadPlugin.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadPlugin.java?rev=1672305&r1=1672304&r2=1672305&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadPlugin.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RadPlugin.java Thu Apr  9 12:10:45 2015
@@ -35,16 +35,20 @@ import org.apache.maven.plugin.eclipse.w
 import org.apache.maven.plugin.ide.IdeDependency;
 import org.apache.maven.plugin.ide.IdeUtils;
 import org.apache.maven.plugin.ide.JeeUtils;
+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;
 import org.apache.maven.project.MavenProject;
 
 /**
  * Generates the rad-6 configuration files.
- * 
+ *
  * @author Richard van Nieuwenhoven (patch submission)
  * @author jdcasey
- * @goal rad
- * @execute phase="generate-resources"
  */
+@Mojo( name = "rad" )
+@Execute( phase = LifecyclePhase.GENERATE_RESOURCES )
 public class RadPlugin
     extends EclipsePlugin
 {
@@ -94,17 +98,17 @@ public class RadPlugin
     /**
      * The context root of the webapplication. This parameter is only used when the current project is a war project,
      * else it will be ignored.
-     * 
-     * @parameter
      */
+    @Parameter
     private String warContextRoot;
 
     /**
      * Use this to specify a different generated resources folder than target/generated-resources/rad6. Set to "none" to
      * skip this folder generation.
-     * 
-     * @parameter expression="${generatedResourceDirName}" default-value="target/generated-resources/rad6" since="2.4"
+     *
+     * @since 2.4
      */
+    @Parameter( property = "generatedResourceDirName", defaultValue = "target/generated-resources/rad6" )
     private String generatedResourceDirName;
 
     /**

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RemoveCacheMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RemoveCacheMojo.java?rev=1672305&r1=1672304&r2=1672305&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RemoveCacheMojo.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/RemoveCacheMojo.java Thu Apr  9 12:10:45 2015
@@ -31,24 +31,23 @@ import org.apache.maven.plugin.AbstractM
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugin.ide.IdeUtils;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
 
 /**
  * Removes the not-available marker files from the repository.
- * 
+ *
  * @author <a href="mailto:baerrach@apache.org">Barrie Treloar</a>
  * @version $Id$
- * @goal remove-cache
  */
+@Mojo( name = "remove-cache" )
 public class RemoveCacheMojo
     extends AbstractMojo
 {
     /**
      * Local maven repository.
-     * 
-     * @parameter expression="${localRepository}"
-     * @required
-     * @readonly
      */
+    @Parameter( property = "localRepository", required = true, readonly = true )
     private ArtifactRepository localRepository;
 
     public void execute()

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java?rev=1672305&r1=1672304&r2=1672305&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/AbstractIdeSupportMojo.java Thu Apr  9 12:10:45 2015
@@ -59,6 +59,8 @@ import org.apache.maven.plugin.MojoExecu
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugin.eclipse.Constants;
 import org.apache.maven.plugin.eclipse.Messages;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.logging.LogEnabled;
 import org.codehaus.plexus.logging.Logger;
@@ -87,99 +89,71 @@ public abstract class AbstractIdeSupport
 
     /**
      * The project whose project files to create.
-     * 
-     * @parameter expression="${project}"
-     * @required
-     * @readonly
      */
+    @Parameter( property = "project", required = true, readonly = true )
     protected MavenProject project;
 
     /**
      * The currently executed project (can be a reactor project).
-     * 
-     * @parameter expression="${executedProject}"
-     * @readonly
      */
+    @Parameter( property = "executedProject", readonly = true )
     protected MavenProject executedProject;
 
     /**
      * The project packaging.
-     * 
-     * @parameter expression="${project.packaging}"
      */
+    @Parameter( property = "project.packaging" )
     protected String packaging;
 
     /**
      * Artifact factory, needed to download source jars for inclusion in classpath.
-     * 
-     * @component role="org.apache.maven.artifact.factory.ArtifactFactory"
-     * @required
-     * @readonly
      */
+    @Component( role = ArtifactFactory.class )
     protected ArtifactFactory artifactFactory;
 
     /**
      * Artifact resolver, needed to download source jars for inclusion in classpath.
-     * 
-     * @component role="org.apache.maven.artifact.resolver.ArtifactResolver"
-     * @required
-     * @readonly
      */
+    @Component( role = ArtifactResolver.class )
     protected ArtifactResolver artifactResolver;
 
     /**
      * Artifact collector, needed to resolve dependencies.
-     * 
-     * @component role="org.apache.maven.artifact.resolver.ArtifactCollector"
-     * @required
-     * @readonly
      */
+    @Component( role = ArtifactCollector.class )
     protected ArtifactCollector artifactCollector;
 
-    /**
-     * @component role="org.apache.maven.artifact.metadata.ArtifactMetadataSource" hint="maven"
-     */
+    @Component( role = ArtifactMetadataSource.class, hint = "maven" )
     protected ArtifactMetadataSource artifactMetadataSource;
 
     /**
      * The runtime information for Maven, used to retrieve Maven's version number.
-     * 
-     * @component
      */
+    @Component
     private RuntimeInformation runtimeInformation;
 
     /**
      * Remote repositories which will be searched for source attachments.
-     * 
-     * @parameter expression="${project.remoteArtifactRepositories}"
-     * @required
-     * @readonly
      */
+    @Parameter( property = "project.remoteArtifactRepositories", required = true, readonly = true )
     protected List remoteArtifactRepositories;
 
     /**
      * Local maven repository.
-     * 
-     * @parameter expression="${localRepository}"
-     * @required
-     * @readonly
      */
+    @Parameter( property = "localRepository", required = true, readonly = true )
     protected ArtifactRepository localRepository;
 
     /**
      * If the executed project is a reactor project, this will contains the full list of projects in the reactor.
-     * 
-     * @parameter expression="${reactorProjects}"
-     * @required
-     * @readonly
      */
+    @Parameter( property = "reactorProjects", required = true, readonly = true )
     protected List reactorProjects;
 
     /**
      * Skip the operation when true.
-     * 
-     * @parameter expression="${eclipse.skip}" default-value="false"
      */
+    @Parameter( property = "eclipse.skip", defaultValue = "false" )
     private boolean skip;
 
     /**
@@ -188,9 +162,8 @@ public abstract class AbstractIdeSupport
      * status cache is mantained. With versions 2.6+ of the plugin to reset this cache run
      * <code>mvn eclipse:remove-cache</code>, or use the <code>forceRecheck</code> option with versions. With older
      * versions delete the file <code>mvn-eclipse-cache.properties</code> in the target directory.
-     * 
-     * @parameter expression="${downloadSources}"
      */
+    @Parameter( property = "downloadSources" )
     protected boolean downloadSources;
 
     /**
@@ -199,9 +172,8 @@ public abstract class AbstractIdeSupport
      * a status cache is mantained. With versions 2.6+ of the plugin to reset this cache run
      * <code>mvn eclipse:remove-cache</code>, or use the <code>forceRecheck</code> option with versions. With older
      * versions delete the file <code>mvn-eclipse-cache.properties</code> in the target directory.
-     * 
-     * @parameter expression="${downloadJavadocs}"
      */
+    @Parameter( property = "downloadJavadocs" )
     protected boolean downloadJavadocs;
 
     /**
@@ -209,9 +181,8 @@ public abstract class AbstractIdeSupport
      * false. When this flag is <code>true</code> and the source or javadoc attachment has a status cache to indicate
      * that it is not available, then the remote repository will be rechecked for a source or javadoc attachment and the
      * status cache updated to reflect the new state.
-     * 
-     * @parameter expression="${forceRecheck}"
      */
+    @Parameter( property = "forceRecheck" )
     protected boolean forceRecheck;
 
     /**