maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From micha...@apache.org
Subject [maven-integration-testing] 01/01: [MNG-6556] Packaging 'maven-plugin' binding plugin upgrades
Date Sun, 26 May 2019 08:14:38 GMT
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch MNG-6556
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git

commit 02daac9c37fb79e32a6c8d9816f7e50d542aa1ab
Author: Michael Osipov <michaelo@apache.org>
AuthorDate: Sun May 26 10:12:01 2019 +0200

    [MNG-6556] Packaging 'maven-plugin' binding plugin upgrades
    
    Move all Javadoc-based plugins configurations to annotations because they start
    to fail with MPLUGIN 3.4+.
---
 .../mng-5530-mojo-execution-scope/extension-plugin/pom.xml |  6 ++++++
 .../mng5530/sessionscope/plugin/TestSessionScopeMojo.java  |  8 ++++----
 .../resources/mng-5530-mojo-execution-scope/plugin/pom.xml |  6 ++++++
 .../mng5530/mojoexecutionscope/TestExecutionScopeMojo.java |  8 ++++----
 .../mng-5578-session-scope/extension-plugin/pom.xml        |  6 ++++++
 .../mng5530/sessionscope/plugin/TestSessionScopeMojo.java  |  8 ++++----
 .../test/resources/mng-5578-session-scope/plugin/pom.xml   |  6 ++++++
 .../its/mng5530/sessionscope/TestSessionScopeMojo.java     |  8 ++++----
 .../mng-5742-build-extension-classloader/plugin/pom.xml    |  6 ++++++
 .../classloader/plugin/BuildExtensionClassloaderMojo.java  | 11 ++++++-----
 .../plugin/pom.xml                                         |  6 ++++++
 .../java/org/apache/maven/its/mng5753/plugin/TestMojo.java | 12 ++++++------
 .../mng-5783-plugin-dependency-filtering/plugin/pom.xml    |  6 ++++++
 .../java/org/apache/maven/its/mng5783/plugin/TestMojo.java | 14 +++++++-------
 14 files changed, 77 insertions(+), 34 deletions(-)

diff --git a/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/extension-plugin/pom.xml
b/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/extension-plugin/pom.xml
index 61c033f..aad7053 100644
--- a/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/extension-plugin/pom.xml
+++ b/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/extension-plugin/pom.xml
@@ -51,6 +51,12 @@ under the License.
       <version>${maven-version}</version>
       <scope>provided</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugin-tools</groupId>
+      <artifactId>maven-plugin-annotations</artifactId>
+      <version>3.2</version>
+      <scope>provided</scope>
+    </dependency>
 
     <dependency>
       <groupId>mng-5530-mojo-execution-scope</groupId>
diff --git a/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/extension-plugin/src/main/java/org/apache/maven/its/mng5530/sessionscope/plugin/TestSessionScopeMojo.java
b/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/extension-plugin/src/main/java/org/apache/maven/its/mng5530/sessionscope/plugin/TestSessionScopeMojo.java
index c44599b..688a832 100644
--- a/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/extension-plugin/src/main/java/org/apache/maven/its/mng5530/sessionscope/plugin/TestSessionScopeMojo.java
+++ b/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/extension-plugin/src/main/java/org/apache/maven/its/mng5530/sessionscope/plugin/TestSessionScopeMojo.java
@@ -23,14 +23,14 @@ import org.apache.maven.its.mng5530.mojoexecutionscope.extension.TestMojoExecuti
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.Mojo;
 
-/**
- * @goal test-session-scope
- */
+@Mojo( name = "test-session-scope" )
 public class TestSessionScopeMojo
     extends AbstractMojo
 {
-    /** @component */
+    @Component
     private TestMojoExecutionScopedComponent component;
 
     public void execute()
diff --git a/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/plugin/pom.xml
b/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/plugin/pom.xml
index ae9a022..6028909 100644
--- a/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/plugin/pom.xml
+++ b/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/plugin/pom.xml
@@ -51,6 +51,12 @@ under the License.
       <version>${maven-version}</version>
       <scope>provided</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugin-tools</groupId>
+      <artifactId>maven-plugin-annotations</artifactId>
+      <version>3.2</version>
+      <scope>provided</scope>
+    </dependency>
   </dependencies>
 
   <build>
diff --git a/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/plugin/src/main/java/org/apache/maven/its/mng5530/mojoexecutionscope/TestExecutionScopeMojo.java
b/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/plugin/src/main/java/org/apache/maven/its/mng5530/mojoexecutionscope/TestExecutionScopeMojo.java
index 24d5c8a..009419c 100644
--- a/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/plugin/src/main/java/org/apache/maven/its/mng5530/mojoexecutionscope/TestExecutionScopeMojo.java
+++ b/core-it-suite/src/test/resources/mng-5530-mojo-execution-scope/plugin/src/main/java/org/apache/maven/its/mng5530/mojoexecutionscope/TestExecutionScopeMojo.java
@@ -22,14 +22,14 @@ package org.apache.maven.its.mng5530.mojoexecutionscope;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.Mojo;
 
-/**
- * @goal test-execution-scope
- */
+@Mojo( name = "test-execution-scope" )
 public class TestExecutionScopeMojo
     extends AbstractMojo
 {
-    /** @component */
+    @Component
     private TestExecutionScopedComponent executionScopedComponent;
 
     public void execute()
diff --git a/core-it-suite/src/test/resources/mng-5578-session-scope/extension-plugin/pom.xml
b/core-it-suite/src/test/resources/mng-5578-session-scope/extension-plugin/pom.xml
index 8f87b6e..4b5db1d 100644
--- a/core-it-suite/src/test/resources/mng-5578-session-scope/extension-plugin/pom.xml
+++ b/core-it-suite/src/test/resources/mng-5578-session-scope/extension-plugin/pom.xml
@@ -51,6 +51,12 @@ under the License.
       <version>${maven-version}</version>
       <scope>provided</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugin-tools</groupId>
+      <artifactId>maven-plugin-annotations</artifactId>
+      <version>3.2</version>
+      <scope>provided</scope>
+    </dependency>
 
     <dependency>
       <groupId>mng-5578-session-scope</groupId>
diff --git a/core-it-suite/src/test/resources/mng-5578-session-scope/extension-plugin/src/main/java/org/apache/maven/its/mng5530/sessionscope/plugin/TestSessionScopeMojo.java
b/core-it-suite/src/test/resources/mng-5578-session-scope/extension-plugin/src/main/java/org/apache/maven/its/mng5530/sessionscope/plugin/TestSessionScopeMojo.java
index 3686a97..94127ba 100644
--- a/core-it-suite/src/test/resources/mng-5578-session-scope/extension-plugin/src/main/java/org/apache/maven/its/mng5530/sessionscope/plugin/TestSessionScopeMojo.java
+++ b/core-it-suite/src/test/resources/mng-5578-session-scope/extension-plugin/src/main/java/org/apache/maven/its/mng5530/sessionscope/plugin/TestSessionScopeMojo.java
@@ -23,14 +23,14 @@ import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.project.MavenProject;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
 
-/**
- * @goal test-session-scope
- */
+@Mojo( name = "test-session-scope" )
 public class TestSessionScopeMojo
     extends AbstractMojo
 {
-    /** @parameter expression="${project}" */
+    @Parameter( defaultValue = "${project}", readonly = true )
     private MavenProject project;
 
     public void execute()
diff --git a/core-it-suite/src/test/resources/mng-5578-session-scope/plugin/pom.xml b/core-it-suite/src/test/resources/mng-5578-session-scope/plugin/pom.xml
index 81c0ec7..43cdd2e 100644
--- a/core-it-suite/src/test/resources/mng-5578-session-scope/plugin/pom.xml
+++ b/core-it-suite/src/test/resources/mng-5578-session-scope/plugin/pom.xml
@@ -51,6 +51,12 @@ under the License.
       <version>${maven-version}</version>
       <scope>provided</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugin-tools</groupId>
+      <artifactId>maven-plugin-annotations</artifactId>
+      <version>3.2</version>
+      <scope>provided</scope>
+    </dependency>
   </dependencies>
 
   <build>
diff --git a/core-it-suite/src/test/resources/mng-5578-session-scope/plugin/src/main/java/org/apache/maven/its/mng5530/sessionscope/TestSessionScopeMojo.java
b/core-it-suite/src/test/resources/mng-5578-session-scope/plugin/src/main/java/org/apache/maven/its/mng5530/sessionscope/TestSessionScopeMojo.java
index df1d8bc..6d21944 100644
--- a/core-it-suite/src/test/resources/mng-5578-session-scope/plugin/src/main/java/org/apache/maven/its/mng5530/sessionscope/TestSessionScopeMojo.java
+++ b/core-it-suite/src/test/resources/mng-5578-session-scope/plugin/src/main/java/org/apache/maven/its/mng5530/sessionscope/TestSessionScopeMojo.java
@@ -22,14 +22,14 @@ package org.apache.maven.its.mng5530.sessionscope;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.Mojo;
 
-/**
- * @goal test-session-scope
- */
+@Mojo( name = "test-session-scope" )
 public class TestSessionScopeMojo
     extends AbstractMojo
 {
-    /** @component */
+    @Component
     private TestSessionScopedComponent sessionScopedComponent;
 
     public void execute()
diff --git a/core-it-suite/src/test/resources/mng-5742-build-extension-classloader/plugin/pom.xml
b/core-it-suite/src/test/resources/mng-5742-build-extension-classloader/plugin/pom.xml
index 206d16c..a6dd62d 100644
--- a/core-it-suite/src/test/resources/mng-5742-build-extension-classloader/plugin/pom.xml
+++ b/core-it-suite/src/test/resources/mng-5742-build-extension-classloader/plugin/pom.xml
@@ -51,6 +51,12 @@ under the License.
       <version>${maven-version}</version>
       <scope>provided</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugin-tools</groupId>
+      <artifactId>maven-plugin-annotations</artifactId>
+      <version>3.2</version>
+      <scope>provided</scope>
+    </dependency>
   </dependencies>
 
   <build>
diff --git a/core-it-suite/src/test/resources/mng-5742-build-extension-classloader/plugin/src/main/java/org/apache/maven/its/mng5742/build/extension/classloader/plugin/BuildExtensionClassloaderMojo.java
b/core-it-suite/src/test/resources/mng-5742-build-extension-classloader/plugin/src/main/java/org/apache/maven/its/mng5742/build/extension/classloader/plugin/BuildExtensionClassloaderMojo.java
index bd12242..de39ea2 100644
--- a/core-it-suite/src/test/resources/mng-5742-build-extension-classloader/plugin/src/main/java/org/apache/maven/its/mng5742/build/extension/classloader/plugin/BuildExtensionClassloaderMojo.java
+++ b/core-it-suite/src/test/resources/mng-5742-build-extension-classloader/plugin/src/main/java/org/apache/maven/its/mng5742/build/extension/classloader/plugin/BuildExtensionClassloaderMojo.java
@@ -24,17 +24,18 @@ import java.io.File;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
 
-/**
- * @goal test
- */
+@Mojo( name = "test" )
 public class BuildExtensionClassloaderMojo
     extends AbstractMojo
 {
-    /** @component */
+    @Component
     private BuildExtensionClassloaderComponent component;
 
-    /** @parameter default-value="${project.basedir}" */
+    @Parameter( defaultValue = "${project.basedir}", readonly = true )
     private File basedir;
 
     public void execute()
diff --git a/core-it-suite/src/test/resources/mng-5753-custom-mojo-execution-configurator/plugin/pom.xml
b/core-it-suite/src/test/resources/mng-5753-custom-mojo-execution-configurator/plugin/pom.xml
index 68f907a..691f090 100644
--- a/core-it-suite/src/test/resources/mng-5753-custom-mojo-execution-configurator/plugin/pom.xml
+++ b/core-it-suite/src/test/resources/mng-5753-custom-mojo-execution-configurator/plugin/pom.xml
@@ -51,5 +51,11 @@ under the License.
       <version>${maven-version}</version>
       <scope>provided</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugin-tools</groupId>
+      <artifactId>maven-plugin-annotations</artifactId>
+      <version>3.2</version>
+      <scope>provided</scope>
+    </dependency>
   </dependencies>
 </project>
diff --git a/core-it-suite/src/test/resources/mng-5753-custom-mojo-execution-configurator/plugin/src/main/java/org/apache/maven/its/mng5753/plugin/TestMojo.java
b/core-it-suite/src/test/resources/mng-5753-custom-mojo-execution-configurator/plugin/src/main/java/org/apache/maven/its/mng5753/plugin/TestMojo.java
index 29fb2d9..d527cff 100644
--- a/core-it-suite/src/test/resources/mng-5753-custom-mojo-execution-configurator/plugin/src/main/java/org/apache/maven/its/mng5753/plugin/TestMojo.java
+++ b/core-it-suite/src/test/resources/mng-5753-custom-mojo-execution-configurator/plugin/src/main/java/org/apache/maven/its/mng5753/plugin/TestMojo.java
@@ -28,18 +28,18 @@ import java.io.Writer;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.project.MavenProject;
+import org.apache.maven.plugins.annotations.Component;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
 
-/**
- * @goal test
- * @configurator test
- */
+@Mojo( name = "test", configurator = "test" )
 public class TestMojo
     extends AbstractMojo
 {
-    /** @parameter expression="${project}" */
+    @Parameter( defaultValue = "${project}", readonly = true )
     private MavenProject project;
     
-    /** @parameter */
+    @Parameter
     private String name;
     
     public void execute()
diff --git a/core-it-suite/src/test/resources/mng-5783-plugin-dependency-filtering/plugin/pom.xml
b/core-it-suite/src/test/resources/mng-5783-plugin-dependency-filtering/plugin/pom.xml
index 94191df..2fc285c 100644
--- a/core-it-suite/src/test/resources/mng-5783-plugin-dependency-filtering/plugin/pom.xml
+++ b/core-it-suite/src/test/resources/mng-5783-plugin-dependency-filtering/plugin/pom.xml
@@ -51,5 +51,11 @@ under the License.
       <version>${maven-version}</version>
       <scope>provided</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugin-tools</groupId>
+      <artifactId>maven-plugin-annotations</artifactId>
+      <version>3.2</version>
+      <scope>provided</scope>
+    </dependency>
   </dependencies>
 </project>
diff --git a/core-it-suite/src/test/resources/mng-5783-plugin-dependency-filtering/plugin/src/main/java/org/apache/maven/its/mng5783/plugin/TestMojo.java
b/core-it-suite/src/test/resources/mng-5783-plugin-dependency-filtering/plugin/src/main/java/org/apache/maven/its/mng5783/plugin/TestMojo.java
index 00faa65..5707faf 100644
--- a/core-it-suite/src/test/resources/mng-5783-plugin-dependency-filtering/plugin/src/main/java/org/apache/maven/its/mng5783/plugin/TestMojo.java
+++ b/core-it-suite/src/test/resources/mng-5783-plugin-dependency-filtering/plugin/src/main/java/org/apache/maven/its/mng5783/plugin/TestMojo.java
@@ -29,17 +29,17 @@ import java.util.List;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
 
-/**
- * @goal test
- */
+@Mojo( name = "test" )
 public class TestMojo
     extends AbstractMojo
 {
-    /** @parameter property="project.build.directory" */
-    private File outputDirectory;
+    @Parameter( defaultValue = "${project.build.directory}", readonly = true )
+    private File target;
 
-    /** @parameter property="plugin.artifacts" */
+    @Parameter( defaultValue = "${plugin.artifacts}", readonly = true )
     private List<Artifact> artifacts;
 
     public void execute()
@@ -47,7 +47,7 @@ public class TestMojo
     {
         try
         {
-            File file = new File( outputDirectory, "dependencies.txt" );
+            File file = new File( target, "dependencies.txt" );
             file.getParentFile().mkdirs();
             BufferedWriter w = new BufferedWriter( new OutputStreamWriter( new FileOutputStream(
file ), "UTF-8" ) );
             try


Mime
View raw message