FELIX-4882 - Correctly use Maven Plugin Tools Java 5 annotations instead of javadoc tags
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1678868 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundleplugin/doc/changelog.txt b/bundleplugin/doc/changelog.txt
index 5db1a09..a5d95e1 100644
--- a/bundleplugin/doc/changelog.txt
+++ b/bundleplugin/doc/changelog.txt
@@ -1,6 +1,9 @@
Changes from 2.5.4 to 2.5.5
---------------------------
+** Bug
+ * [FELIX-4882] - Correctly use Maven Plugin Tools Java 5 annotations instead of javadoc tags
+
Changes from 2.5.3 to 2.5.4
---------------------------
diff --git a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundleAllPlugin.java b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundleAllPlugin.java
index f6db406..2aed620 100644
--- a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundleAllPlugin.java
+++ b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundleAllPlugin.java
@@ -45,7 +45,6 @@
import org.apache.maven.artifact.versioning.VersionRange;
import org.apache.maven.plugin.MojoExecutionException;
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;
@@ -65,12 +64,11 @@
/**
* Build an OSGi bundle jar for all transitive dependencies.
- *
+ *
* @deprecated The bundleall goal is no longer supported and may be removed in a future release
*/
@Deprecated
-@Mojo( name = "bundleall", requiresDependencyResolution = ResolutionScope.TEST )
-@Execute( phase = LifecyclePhase.PACKAGE )
+@Mojo( name = "bundleall", requiresDependencyResolution = ResolutionScope.TEST, defaultPhase = LifecyclePhase.PACKAGE )
public class BundleAllPlugin extends ManifestPlugin
{
private static final String LS = System.getProperty( "line.separator" );
@@ -126,12 +124,13 @@
private Set m_artifactsBeingProcessed = new HashSet();
/**
- * Process up to some depth
+ * Process up to some depth
*/
@Parameter
private int depth = Integer.MAX_VALUE;
+ @Override
public void execute() throws MojoExecutionException
{
getLog().warn( "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" );
@@ -145,7 +144,7 @@
/**
* Bundle a project and all its dependencies
- *
+ *
* @param project
* @throws MojoExecutionException
*/
@@ -157,7 +156,7 @@
/**
* Bundle a project and its transitive dependencies up to some depth level
- *
+ *
* @param project
* @param maxDepth how deep to process the dependency tree
* @throws MojoExecutionException
@@ -290,7 +289,7 @@
/**
* Bundle the root of a dependency tree after all its children have been bundled
- *
+ *
* @param project
* @param bundleInfo
* @return
@@ -315,7 +314,7 @@
/**
* Bundle one project only without building its childre
- *
+ *
* @param project
* @throws MojoExecutionException
*/
@@ -428,9 +427,10 @@
/**
* Use previously built bundles when available.
- *
+ *
* @param artifact
*/
+ @Override
protected File getFile( final Artifact artifact )
{
File bundle = getBuiltFile( artifact );
@@ -457,7 +457,7 @@
/*
* Find snapshots in output folder, eg. 2.1-SNAPSHOT will match 2.1.0.20070207_193904_2
- * TODO there has to be another way to do this using Maven libs
+ * TODO there has to be another way to do this using Maven libs
*/
if ( ( bundle == null ) && artifact.isSnapshot() )
{
@@ -495,9 +495,9 @@
/**
* Check that the bundleName provided correspond to the artifact provided.
* Used to determine when the bundle name is a timestamped snapshot and the artifact is a snapshot not timestamped.
- *
+ *
* @param artifact artifact with snapshot version
- * @param bundleName bundle file name
+ * @param bundleName bundle file name
* @return if both represent the same artifact and version, forgetting about the snapshot timestamp
*/
protected boolean snapshotMatch( Artifact artifact, String bundleName )
diff --git a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
index d964489..eee7e52 100644
--- a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
+++ b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
@@ -58,7 +58,6 @@
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.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
@@ -91,8 +90,9 @@
* Create an OSGi bundle from Maven project
*
*/
-@Mojo( name = "bundle", requiresDependencyResolution = ResolutionScope.TEST, threadSafe = true )
-@Execute( phase = LifecyclePhase.PACKAGE )
+@Mojo( name = "bundle", requiresDependencyResolution = ResolutionScope.TEST,
+ threadSafe = true,
+ defaultPhase = LifecyclePhase.PACKAGE )
public class BundlePlugin extends AbstractMojo
{
/**
diff --git a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
index 9f365d4..e474fad 100644
--- a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
+++ b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
@@ -33,7 +33,6 @@
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
-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;
@@ -49,8 +48,9 @@
/**
* Generate an OSGi manifest for this project
*/
-@Mojo( name = "manifest", requiresDependencyResolution = ResolutionScope.TEST, threadSafe = true )
-@Execute( phase = LifecyclePhase.PROCESS_CLASSES )
+@Mojo( name = "manifest", requiresDependencyResolution = ResolutionScope.TEST,
+ threadSafe = true,
+ defaultPhase = LifecyclePhase.PROCESS_CLASSES)
public class ManifestPlugin extends BundlePlugin
{
/**
diff --git a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/WrapPlugin.java b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/WrapPlugin.java
index 8fe7e08..b6948c3 100644
--- a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/WrapPlugin.java
+++ b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/WrapPlugin.java
@@ -20,7 +20,6 @@
import org.apache.maven.plugin.MojoExecutionException;
-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.ResolutionScope;
@@ -31,10 +30,11 @@
* @deprecated The wrap goal is no longer supported and may be removed in a future release
*/
@Deprecated
-@Mojo( name = "wrap", requiresDependencyResolution = ResolutionScope.TEST )
-@Execute( phase = LifecyclePhase.PACKAGE )
+@Mojo( name = "wrap", requiresDependencyResolution = ResolutionScope.TEST,
+ defaultPhase = LifecyclePhase.PACKAGE)
public final class WrapPlugin extends BundleAllPlugin
{
+ @Override
public void execute() throws MojoExecutionException
{
getLog().warn( "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" );
diff --git a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/baseline/BaselinePlugin.java b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/baseline/BaselinePlugin.java
index 224d1df..2c038d9 100644
--- a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/baseline/BaselinePlugin.java
+++ b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/baseline/BaselinePlugin.java
@@ -24,7 +24,6 @@
import java.util.Map;
import java.util.Map.Entry;
-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;
@@ -38,8 +37,9 @@
* BND Baseline check between two bundles.
* @since 2.4.1
*/
-@Mojo( name = "baseline", threadSafe = true, requiresDependencyResolution = ResolutionScope.TEST )
-@Execute( phase = LifecyclePhase.VERIFY )
+@Mojo( name = "baseline", threadSafe = true,
+ requiresDependencyResolution = ResolutionScope.TEST,
+ defaultPhase = LifecyclePhase.VERIFY)
public final class BaselinePlugin
extends AbstractBaselinePlugin
{
diff --git a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/baseline/BaselineReport.java b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/baseline/BaselineReport.java
index 742d3fb..5774d7d 100644
--- a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/baseline/BaselineReport.java
+++ b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/baseline/BaselineReport.java
@@ -28,7 +28,6 @@
import java.util.ResourceBundle;
import org.apache.maven.doxia.sink.Sink;
-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;
@@ -43,8 +42,8 @@
*
* @since 2.4.1
*/
-@Mojo( name = "baseline-report", threadSafe = true )
-@Execute( phase = LifecyclePhase.SITE )
+@Mojo( name = "baseline-report", threadSafe = true,
+ defaultPhase = LifecyclePhase.SITE)
public final class BaselineReport
extends AbstractBaselinePlugin
implements MavenReport
diff --git a/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrCleanRepo.java b/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrCleanRepo.java
index 01b6d53..677dd42 100644
--- a/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrCleanRepo.java
+++ b/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrCleanRepo.java
@@ -1,4 +1,4 @@
-/*
+/*
* 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
@@ -43,7 +43,6 @@
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
-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;
@@ -57,11 +56,10 @@
/**
* Clean an OBR repository by finding and removing missing resources.
- *
+ *
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
*/
-@Mojo( name = "clean", requiresProject = false )
-@Execute( phase = LifecyclePhase.CLEAN )
+@Mojo( name = "clean", requiresProject = false, defaultPhase = LifecyclePhase.CLEAN )
public class ObrCleanRepo extends AbstractMojo
{
/**
@@ -128,7 +126,7 @@
/**
* Analyze the given XML tree (DOM of the repository file) and remove missing resources.
- *
+ *
* @param elem : the input XML tree
* @return the cleaned XML tree
*/
@@ -187,7 +185,7 @@
/**
* Initialize the document builder from Xerces.
- *
+ *
* @return DocumentBuilder ready to create new document
* @throws MojoExecutionException : occurs when the instantiation of the document builder fails
*/
@@ -210,7 +208,7 @@
/**
* Open an XML file.
- *
+ *
* @param file : XML file path
* @param constructor DocumentBuilder get from xerces
* @return Document which describes this file
@@ -246,7 +244,7 @@
/**
* write a Node in a xml file.
- *
+ *
* @param outputFilename URI to the output file
* @param treeToBeWrite Node root of the tree to be write in file
* @throws MojoExecutionException if the plugin failed
diff --git a/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeploy.java b/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeploy.java
index 0451846..11f09b2 100644
--- a/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeploy.java
+++ b/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeploy.java
@@ -35,7 +35,6 @@
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.logging.Log;
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;
@@ -45,11 +44,10 @@
/**
* Deploys bundle details to a remote OBR repository (life-cycle goal)
- *
+ *
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
*/
-@Mojo( name = "deploy", threadSafe = true )
-@Execute( phase = LifecyclePhase.DEPLOY )
+@Mojo( name = "deploy", threadSafe = true, defaultPhase = LifecyclePhase.DEPLOY )
public final class ObrDeploy extends AbstractMojo
{
/**
diff --git a/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeployFile.java b/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeployFile.java
index 0969042..237b52b 100644
--- a/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeployFile.java
+++ b/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrDeployFile.java
@@ -29,7 +29,6 @@
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.logging.Log;
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;
@@ -39,11 +38,10 @@
/**
* Deploys bundle details to a remote OBR repository (command-line goal)
- *
+ *
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
*/
-@Mojo( name = "deploy-file", requiresProject = false )
-@Execute( phase = LifecyclePhase.DEPLOY )
+@Mojo( name = "deploy-file", requiresProject = false, defaultPhase = LifecyclePhase.DEPLOY )
public final class ObrDeployFile extends AbstractFileMojo
{
/**
diff --git a/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrInstall.java b/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrInstall.java
index 219edbb..a9ec529 100644
--- a/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrInstall.java
+++ b/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrInstall.java
@@ -29,7 +29,6 @@
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.logging.Log;
-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;
@@ -38,11 +37,10 @@
/**
* Installs bundle details in the local OBR repository (life-cycle goal)
- *
+ *
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
*/
-@Mojo( name = "install", threadSafe = true )
-@Execute( phase = LifecyclePhase.INSTALL )
+@Mojo( name = "install", threadSafe = true, defaultPhase = LifecyclePhase.INSTALL )
public final class ObrInstall extends AbstractMojo
{
/**
diff --git a/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrInstallFile.java b/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrInstallFile.java
index 7a31c4b..c00455a 100644
--- a/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrInstallFile.java
+++ b/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrInstallFile.java
@@ -26,7 +26,6 @@
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.logging.Log;
-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;
@@ -35,11 +34,10 @@
/**
* Installs bundle details in the local OBR repository (command-line goal)
- *
+ *
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
*/
-@Mojo( name = "install-file", requiresProject = false )
-@Execute( phase = LifecyclePhase.INSTALL )
+@Mojo( name = "install-file", requiresProject = false, defaultPhase = LifecyclePhase.INSTALL )
public final class ObrInstallFile extends AbstractFileMojo
{
/**
diff --git a/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrRemoteClean.java b/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrRemoteClean.java
index 3bf7340..195f488 100644
--- a/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrRemoteClean.java
+++ b/bundleplugin/src/main/java/org/apache/felix/obrplugin/ObrRemoteClean.java
@@ -54,7 +54,6 @@
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.logging.Log;
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;
@@ -70,11 +69,10 @@
/**
* Clean a remote repository file.
* It just looks for every resources and check that pointed file exists.
- *
+ *
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
*/
-@Mojo( name = "remote-clean", requiresProject = false )
-@Execute( phase = LifecyclePhase.CLEAN )
+@Mojo( name = "remote-clean", requiresProject = false, defaultPhase = LifecyclePhase.CLEAN )
public final class ObrRemoteClean extends AbstractMojo
{
/**
@@ -357,7 +355,7 @@
/**
* Initialize the document builder from Xerces.
- *
+ *
* @return DocumentBuilder ready to create new document
* @throws MojoExecutionException : occurs when the instantiation of the document builder fails
*/
@@ -380,7 +378,7 @@
/**
* Open an XML file.
- *
+ *
* @param file : XML file
* @param constructor DocumentBuilder get from xerces
* @return Document which describes this file
@@ -416,7 +414,7 @@
/**
* write a Node in a xml file.
- *
+ *
* @param outputFilename URI to the output file
* @param treeToBeWrite Node root of the tree to be write in file
* @throws MojoExecutionException if the plugin failed