You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sj...@apache.org on 2022/07/24 20:46:43 UTC

[maven-plugin-tools] branch master updated: [MPLUGIN-412] Use Maven core artifacts in provided scope

This is an automated email from the ASF dual-hosted git repository.

sjaranowski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-plugin-tools.git


The following commit(s) were added to refs/heads/master by this push:
     new 3760daec [MPLUGIN-412] Use Maven core artifacts in provided scope
3760daec is described below

commit 3760daec072a58d092804f852e3ccf2b14482951
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Sun Jul 24 17:05:33 2022 +0200

    [MPLUGIN-412] Use Maven core artifacts in provided scope
    
    in production and in IT tests
---
 maven-plugin-plugin/pom.xml                        |   7 +-
 .../annotation-with-inheritance-from-deps/pom.xml  |  30 +++---
 .../it/annotation-with-inheritance-reactor/pom.xml |  12 ++-
 .../src/it/annotation-with-inheritance/pom.xml     |   2 +
 maven-plugin-plugin/src/it/asm-failure/pom.xml     |   5 +-
 .../antsample-maven-plugin/pom.xml                 |   3 +-
 .../javasample-maven-plugin/pom.xml                |   3 +-
 .../src/it/help-basic-jdk11/pom.xml                |   6 +-
 maven-plugin-plugin/src/it/help-basic/pom.xml      |   6 +-
 maven-plugin-plugin/src/it/help-package/pom.xml    |   6 +-
 .../src/it/java-basic-annotations-jdk8/pom.xml     |   9 +-
 .../it/java-basic-annotations-jdkcurrent/pom.xml   |   9 +-
 .../src/it/java-basic-annotations/pom.xml          |   4 +-
 maven-plugin-plugin/src/it/java-basic/pom.xml      |   2 +
 maven-plugin-plugin/src/it/mplugin-191/pom.xml     |   4 +-
 maven-plugin-plugin/src/it/mplugin-223/pom.xml     |   1 +
 .../src/it/mplugin-272_java8/pom.xml               | 116 +++++++++++----------
 .../src/it/mplugin-299_no-configuration/pom.xml    |   6 +-
 .../it/mplugin-305_defaultMojoDependencies/pom.xml |   1 +
 .../it/mplugin-305_emptyMojoDependencies/pom.xml   |   1 +
 .../it/mplugin-305_singleMojoDependencies/pom.xml  |   1 +
 .../src/it/mplugin-319_report-since/pom.xml        |   1 +
 .../src/it/mplugin-324_javadoc/pom.xml             |   6 +-
 .../src/it/mplugin-363_help-reproducible/pom.xml   |   6 +-
 .../pom.xml                                        |  28 ++---
 .../src/it/mplugin-394_report-encoding/pom.xml     |   6 +-
 maven-plugin-plugin/src/it/packaging-jar/pom.xml   |  13 +--
 .../src/it/plugin-info-jdk-default-version/pom.xml |   7 +-
 .../src/it/plugin-report-annotations/pom.xml       |  15 ++-
 maven-plugin-plugin/src/it/plugin-report/pom.xml   |  13 +++
 .../src/it/source-encoding/latin-1/pom.xml         |   3 +-
 .../src/it/source-encoding/utf-8/pom.xml           |   3 +-
 maven-plugin-tools-annotations/pom.xml             |   4 +
 maven-plugin-tools-api/pom.xml                     |  15 +--
 maven-script/maven-plugin-tools-ant/pom.xml        |   9 ++
 maven-script/maven-plugin-tools-beanshell/pom.xml  |  14 ++-
 36 files changed, 200 insertions(+), 177 deletions(-)

diff --git a/maven-plugin-plugin/pom.xml b/maven-plugin-plugin/pom.xml
index f1250ff9..448f6bd9 100644
--- a/maven-plugin-plugin/pom.xml
+++ b/maven-plugin-plugin/pom.xml
@@ -77,9 +77,7 @@
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
       <artifactId>maven-plugin-annotations</artifactId>
-      <!-- from stricter view, should use ${mavenPluginToolsVersion} but this is causing problems with release plugin -->
-      <!--version>${mavenPluginToolsVersion}</version-->
-      <!--  
+      <!--
         Do not use 'provided' scope here. The annotations are a transitive dependency of
         'maven-plugin-tools-annotations' which fails to load at runtime when not available.
       -->
@@ -130,8 +128,7 @@
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
-      <!-- TODO: make this provided once 3.6.2+ maven-plugin-plugin is in use -->
-      <scope>compile</scope>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
diff --git a/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/pom.xml b/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/pom.xml
index 8a977b8e..e5836c05 100644
--- a/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/pom.xml
+++ b/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/pom.xml
@@ -43,31 +43,35 @@ under the License.
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>@mavenVersion@</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-core</artifactId>
+      <version>@mavenVersion@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
       <artifactId>maven-plugin-annotations</artifactId>
       <version>@project.version@</version>
-      <scope>compile</scope>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
       <artifactId>maven-plugin-tools-annotations</artifactId>
       <version>@project.version@</version>
       <classifier>tests</classifier>
+      <!-- we only need one class FooMojo -->
+      <!-- in order to don't manage all transitive dependencies simply exclude its -->
+      <exclusions>
+        <exclusion>
+          <groupId>*</groupId>
+          <artifactId>*</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
-    <dependency>
-      <!-- dependency of  org.apache.maven.plugin-tools:maven-plugin-tools-annotations:@project.version@:jar:tests -->
-      <groupId>org.junit.jupiter</groupId>
-      <artifactId>junit-jupiter-engine</artifactId>
-      <version>5.8.2</version>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-utils</artifactId>
-      <version>@plexusUtilsVersion@</version>
-    </dependency>
+
   </dependencies>
 
   <build>
diff --git a/maven-plugin-plugin/src/it/annotation-with-inheritance-reactor/pom.xml b/maven-plugin-plugin/src/it/annotation-with-inheritance-reactor/pom.xml
index 713ce85f..d2f6b8bc 100644
--- a/maven-plugin-plugin/src/it/annotation-with-inheritance-reactor/pom.xml
+++ b/maven-plugin-plugin/src/it/annotation-with-inheritance-reactor/pom.xml
@@ -42,17 +42,27 @@ under the License.
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>@mavenVersion@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-core</artifactId>
       <version>@mavenVersion@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
       <artifactId>maven-plugin-tools-annotations</artifactId>
       <version>@project.version@</version>
       <classifier>tests</classifier>
+      <!-- we only need one class FooMojo -->
+      <!-- in order to don't manage all transitive dependencies simply exclude its -->
+      <exclusions>
+        <exclusion>
+          <groupId>*</groupId>
+          <artifactId>*</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <!-- dependency of  org.apache.maven.plugin-tools:maven-plugin-tools-annotations:@project.version@:jar:tests -->
@@ -64,7 +74,7 @@ under the License.
       <groupId>org.apache.maven.plugin-tools</groupId>
       <artifactId>maven-plugin-annotations</artifactId>
       <version>@project.version@</version>
-      <scope>compile</scope>
+      <scope>provided</scope>
     </dependency>
   </dependencies>
 
diff --git a/maven-plugin-plugin/src/it/annotation-with-inheritance/pom.xml b/maven-plugin-plugin/src/it/annotation-with-inheritance/pom.xml
index 1f1170b1..b00ab7d5 100644
--- a/maven-plugin-plugin/src/it/annotation-with-inheritance/pom.xml
+++ b/maven-plugin-plugin/src/it/annotation-with-inheritance/pom.xml
@@ -43,11 +43,13 @@ under the License.
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>@mavenVersion@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-core</artifactId>
       <version>@mavenVersion@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
diff --git a/maven-plugin-plugin/src/it/asm-failure/pom.xml b/maven-plugin-plugin/src/it/asm-failure/pom.xml
index a45177ae..9da9f6d0 100644
--- a/maven-plugin-plugin/src/it/asm-failure/pom.xml
+++ b/maven-plugin-plugin/src/it/asm-failure/pom.xml
@@ -50,13 +50,14 @@
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
-      <version>3.0</version>
+      <version>@mavenVersion@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
       <artifactId>maven-plugin-annotations</artifactId>
       <version>@project.version@</version>
-      <scope>compile</scope>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>com.ibm.icu</groupId>
diff --git a/maven-plugin-plugin/src/it/fix-maven-since-3.x/antsample-maven-plugin/pom.xml b/maven-plugin-plugin/src/it/fix-maven-since-3.x/antsample-maven-plugin/pom.xml
index 7b846ea3..37dbbb63 100644
--- a/maven-plugin-plugin/src/it/fix-maven-since-3.x/antsample-maven-plugin/pom.xml
+++ b/maven-plugin-plugin/src/it/fix-maven-since-3.x/antsample-maven-plugin/pom.xml
@@ -43,7 +43,8 @@
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
-      <version>2.0</version>
+      <version>@mavenVersion@</version>
+      <scope>provided</scope>
     </dependency>
   </dependencies>
 
diff --git a/maven-plugin-plugin/src/it/fix-maven-since-3.x/javasample-maven-plugin/pom.xml b/maven-plugin-plugin/src/it/fix-maven-since-3.x/javasample-maven-plugin/pom.xml
index 027f542e..bb3e1779 100644
--- a/maven-plugin-plugin/src/it/fix-maven-since-3.x/javasample-maven-plugin/pom.xml
+++ b/maven-plugin-plugin/src/it/fix-maven-since-3.x/javasample-maven-plugin/pom.xml
@@ -43,7 +43,8 @@
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
-      <version>2.0</version>
+      <version>@mavenVersion@</version>
+      <scope>provided</scope>
     </dependency>
   </dependencies>
 </project>
diff --git a/maven-plugin-plugin/src/it/help-basic-jdk11/pom.xml b/maven-plugin-plugin/src/it/help-basic-jdk11/pom.xml
index fc9320bb..65c20966 100644
--- a/maven-plugin-plugin/src/it/help-basic-jdk11/pom.xml
+++ b/maven-plugin-plugin/src/it/help-basic-jdk11/pom.xml
@@ -40,11 +40,7 @@ under the License.
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>@mavenVersion@</version>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-utils</artifactId>
-      <version>@plexusUtilsVersion@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
diff --git a/maven-plugin-plugin/src/it/help-basic/pom.xml b/maven-plugin-plugin/src/it/help-basic/pom.xml
index 9abc568d..73e4ce49 100644
--- a/maven-plugin-plugin/src/it/help-basic/pom.xml
+++ b/maven-plugin-plugin/src/it/help-basic/pom.xml
@@ -40,11 +40,7 @@ under the License.
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>@mavenVersion@</version>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-utils</artifactId>
-      <version>@plexusUtilsVersion@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
diff --git a/maven-plugin-plugin/src/it/help-package/pom.xml b/maven-plugin-plugin/src/it/help-package/pom.xml
index 173d9019..81f0376f 100644
--- a/maven-plugin-plugin/src/it/help-package/pom.xml
+++ b/maven-plugin-plugin/src/it/help-package/pom.xml
@@ -40,11 +40,7 @@ under the License.
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>@mavenVersion@</version>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-utils</artifactId>
-      <version>@plexusUtilsVersion@</version>
+      <scope>provided</scope>
     </dependency>
   </dependencies>
 
diff --git a/maven-plugin-plugin/src/it/java-basic-annotations-jdk8/pom.xml b/maven-plugin-plugin/src/it/java-basic-annotations-jdk8/pom.xml
index 1e1e1789..124b37cc 100644
--- a/maven-plugin-plugin/src/it/java-basic-annotations-jdk8/pom.xml
+++ b/maven-plugin-plugin/src/it/java-basic-annotations-jdk8/pom.xml
@@ -47,22 +47,19 @@ under the License.
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>@mavenVersion@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-core</artifactId>
       <version>@mavenVersion@</version>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-utils</artifactId>
-      <version>@plexusUtilsVersion@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
       <artifactId>maven-plugin-annotations</artifactId>
       <version>@project.version@</version>
-      <scope>compile</scope>
+      <scope>provided</scope>
     </dependency>
   </dependencies>
 
diff --git a/maven-plugin-plugin/src/it/java-basic-annotations-jdkcurrent/pom.xml b/maven-plugin-plugin/src/it/java-basic-annotations-jdkcurrent/pom.xml
index 1bb59d13..ad2b9729 100644
--- a/maven-plugin-plugin/src/it/java-basic-annotations-jdkcurrent/pom.xml
+++ b/maven-plugin-plugin/src/it/java-basic-annotations-jdkcurrent/pom.xml
@@ -43,22 +43,19 @@ under the License.
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>@mavenVersion@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-core</artifactId>
       <version>@mavenVersion@</version>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-utils</artifactId>
-      <version>@plexusUtilsVersion@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
       <artifactId>maven-plugin-annotations</artifactId>
       <version>@project.version@</version>
-      <scope>compile</scope>
+      <scope>provided</scope>
     </dependency>
   </dependencies>
 
diff --git a/maven-plugin-plugin/src/it/java-basic-annotations/pom.xml b/maven-plugin-plugin/src/it/java-basic-annotations/pom.xml
index 3508c214..19ee2b15 100644
--- a/maven-plugin-plugin/src/it/java-basic-annotations/pom.xml
+++ b/maven-plugin-plugin/src/it/java-basic-annotations/pom.xml
@@ -43,11 +43,13 @@ under the License.
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>@mavenVersion@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-core</artifactId>
       <version>@mavenVersion@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
@@ -58,7 +60,7 @@ under the License.
       <groupId>org.apache.maven.plugin-tools</groupId>
       <artifactId>maven-plugin-annotations</artifactId>
       <version>@project.version@</version>
-      <scope>compile</scope>
+      <scope>provided</scope>
     </dependency>
   </dependencies>
 
diff --git a/maven-plugin-plugin/src/it/java-basic/pom.xml b/maven-plugin-plugin/src/it/java-basic/pom.xml
index c570e414..847e4a93 100644
--- a/maven-plugin-plugin/src/it/java-basic/pom.xml
+++ b/maven-plugin-plugin/src/it/java-basic/pom.xml
@@ -43,11 +43,13 @@ under the License.
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>@mavenVersion@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-core</artifactId>
       <version>@mavenVersion@</version>
+      <scope>provided</scope>
     </dependency>
   </dependencies>
 
diff --git a/maven-plugin-plugin/src/it/mplugin-191/pom.xml b/maven-plugin-plugin/src/it/mplugin-191/pom.xml
index 29aa38e3..adc71d3e 100644
--- a/maven-plugin-plugin/src/it/mplugin-191/pom.xml
+++ b/maven-plugin-plugin/src/it/mplugin-191/pom.xml
@@ -56,12 +56,14 @@ under the License.
       <groupId>org.apache.maven.plugin-tools</groupId>
       <artifactId>maven-plugin-annotations</artifactId>
       <version>@project.version@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>@mavenVersion@</version>
+      <scope>provided</scope>
     </dependency>
   </dependencies>
 
-</project>
\ No newline at end of file
+</project>
diff --git a/maven-plugin-plugin/src/it/mplugin-223/pom.xml b/maven-plugin-plugin/src/it/mplugin-223/pom.xml
index 76153911..64e71c97 100644
--- a/maven-plugin-plugin/src/it/mplugin-223/pom.xml
+++ b/maven-plugin-plugin/src/it/mplugin-223/pom.xml
@@ -38,6 +38,7 @@
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>@mavenVersion@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
diff --git a/maven-plugin-plugin/src/it/mplugin-272_java8/pom.xml b/maven-plugin-plugin/src/it/mplugin-272_java8/pom.xml
index c10c6e42..94414e3b 100644
--- a/maven-plugin-plugin/src/it/mplugin-272_java8/pom.xml
+++ b/maven-plugin-plugin/src/it/mplugin-272_java8/pom.xml
@@ -20,64 +20,66 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
+  <modelVersion>4.0.0</modelVersion>
 
-    <groupId>test-plugin</groupId>
-    <artifactId>test-plugin</artifactId>
-    <version>1.0-SNAPSHOT</version>
-    <packaging>maven-plugin</packaging>
+  <groupId>test-plugin</groupId>
+  <artifactId>test-plugin</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>maven-plugin</packaging>
 
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.maven</groupId>
-            <artifactId>maven-plugin-api</artifactId>
-            <version>@mavenVersion@</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.maven.plugin-tools</groupId>
-            <artifactId>maven-plugin-annotations</artifactId>
-            <version>@project.version@</version>
-        </dependency>
-    </dependencies>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>@mavenVersion@</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugin-tools</groupId>
+      <artifactId>maven-plugin-annotations</artifactId>
+      <version>@project.version@</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
 
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.1</version>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-plugin-plugin</artifactId>
-                <version>@project.version@</version>
-                <configuration>
-                    <goalPrefix>FOO</goalPrefix>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>default-descriptor</id>
-                        <goals>
-                            <goal>descriptor</goal>
-                        </goals>
-                        <configuration>
-                        </configuration>
-                        <phase>process-classes</phase>
-                    </execution>
-                    <execution>
-                        <id>help-descriptor</id>
-                        <goals>
-                            <goal>helpmojo</goal>
-                        </goals>
-                        <phase>process-classes</phase>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-</project>
\ No newline at end of file
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>3.1</version>
+        <configuration>
+          <source>1.8</source>
+          <target>1.8</target>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-plugin-plugin</artifactId>
+        <version>@project.version@</version>
+        <configuration>
+          <goalPrefix>FOO</goalPrefix>
+        </configuration>
+        <executions>
+          <execution>
+            <id>default-descriptor</id>
+            <goals>
+              <goal>descriptor</goal>
+            </goals>
+            <configuration>
+            </configuration>
+            <phase>process-classes</phase>
+          </execution>
+          <execution>
+            <id>help-descriptor</id>
+            <goals>
+              <goal>helpmojo</goal>
+            </goals>
+            <phase>process-classes</phase>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/maven-plugin-plugin/src/it/mplugin-299_no-configuration/pom.xml b/maven-plugin-plugin/src/it/mplugin-299_no-configuration/pom.xml
index e2affab6..671a83fc 100644
--- a/maven-plugin-plugin/src/it/mplugin-299_no-configuration/pom.xml
+++ b/maven-plugin-plugin/src/it/mplugin-299_no-configuration/pom.xml
@@ -40,11 +40,7 @@ under the License.
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>@mavenVersion@</version>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-utils</artifactId>
-      <version>@plexusUtilsVersion@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
diff --git a/maven-plugin-plugin/src/it/mplugin-305_defaultMojoDependencies/pom.xml b/maven-plugin-plugin/src/it/mplugin-305_defaultMojoDependencies/pom.xml
index 720fac51..770a7849 100644
--- a/maven-plugin-plugin/src/it/mplugin-305_defaultMojoDependencies/pom.xml
+++ b/maven-plugin-plugin/src/it/mplugin-305_defaultMojoDependencies/pom.xml
@@ -37,6 +37,7 @@
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>@mavenVersion@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
diff --git a/maven-plugin-plugin/src/it/mplugin-305_emptyMojoDependencies/pom.xml b/maven-plugin-plugin/src/it/mplugin-305_emptyMojoDependencies/pom.xml
index 79d68851..03a3a3da 100644
--- a/maven-plugin-plugin/src/it/mplugin-305_emptyMojoDependencies/pom.xml
+++ b/maven-plugin-plugin/src/it/mplugin-305_emptyMojoDependencies/pom.xml
@@ -37,6 +37,7 @@
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>@mavenVersion@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
diff --git a/maven-plugin-plugin/src/it/mplugin-305_singleMojoDependencies/pom.xml b/maven-plugin-plugin/src/it/mplugin-305_singleMojoDependencies/pom.xml
index e142cc62..456e475a 100644
--- a/maven-plugin-plugin/src/it/mplugin-305_singleMojoDependencies/pom.xml
+++ b/maven-plugin-plugin/src/it/mplugin-305_singleMojoDependencies/pom.xml
@@ -37,6 +37,7 @@
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>@mavenVersion@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
diff --git a/maven-plugin-plugin/src/it/mplugin-319_report-since/pom.xml b/maven-plugin-plugin/src/it/mplugin-319_report-since/pom.xml
index 542ef1d4..618a3d8d 100644
--- a/maven-plugin-plugin/src/it/mplugin-319_report-since/pom.xml
+++ b/maven-plugin-plugin/src/it/mplugin-319_report-since/pom.xml
@@ -37,6 +37,7 @@ under the License.
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>@mavenVersion@</version>
+      <scope>provided</scope>
     </dependency>
   </dependencies>
 
diff --git a/maven-plugin-plugin/src/it/mplugin-324_javadoc/pom.xml b/maven-plugin-plugin/src/it/mplugin-324_javadoc/pom.xml
index 96f278c9..cb52ee57 100644
--- a/maven-plugin-plugin/src/it/mplugin-324_javadoc/pom.xml
+++ b/maven-plugin-plugin/src/it/mplugin-324_javadoc/pom.xml
@@ -40,11 +40,7 @@ under the License.
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>@mavenVersion@</version>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-utils</artifactId>
-      <version>@plexusUtilsVersion@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
diff --git a/maven-plugin-plugin/src/it/mplugin-363_help-reproducible/pom.xml b/maven-plugin-plugin/src/it/mplugin-363_help-reproducible/pom.xml
index 9ccd0e40..699119c5 100644
--- a/maven-plugin-plugin/src/it/mplugin-363_help-reproducible/pom.xml
+++ b/maven-plugin-plugin/src/it/mplugin-363_help-reproducible/pom.xml
@@ -40,11 +40,7 @@ under the License.
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>@mavenVersion@</version>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-utils</artifactId>
-      <version>@plexusUtilsVersion@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
diff --git a/maven-plugin-plugin/src/it/mplugin-372-annotation-with-inheritance-from-provided-deps/pom.xml b/maven-plugin-plugin/src/it/mplugin-372-annotation-with-inheritance-from-provided-deps/pom.xml
index 0f6949cd..456b6f14 100644
--- a/maven-plugin-plugin/src/it/mplugin-372-annotation-with-inheritance-from-provided-deps/pom.xml
+++ b/maven-plugin-plugin/src/it/mplugin-372-annotation-with-inheritance-from-provided-deps/pom.xml
@@ -45,29 +45,31 @@ under the License.
       <version>@mavenVersion@</version>
       <scope>provided</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-core</artifactId>
+      <version>@mavenVersion@</version>
+      <scope>provided</scope>
+    </dependency>
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
       <artifactId>maven-plugin-annotations</artifactId>
       <version>@project.version@</version>
-      <scope>compile</scope>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
       <artifactId>maven-plugin-tools-annotations</artifactId>
       <version>@project.version@</version>
       <classifier>tests</classifier>
-    </dependency>
-    <dependency>
-      <!-- dependency of  org.apache.maven.plugin-tools:maven-plugin-tools-annotations:@project.version@:jar:tests -->
-      <groupId>org.junit.jupiter</groupId>
-      <artifactId>junit-jupiter-engine</artifactId>
-      <version>5.8.2</version>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-utils</artifactId>
-      <version>@plexusUtilsVersion@</version>
+      <!-- we only need one class FooMojo -->
+      <!-- in order to don't manage all transitive dependencies simply exclude its -->
+      <exclusions>
+        <exclusion>
+          <groupId>*</groupId>
+          <artifactId>*</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
   </dependencies>
 
diff --git a/maven-plugin-plugin/src/it/mplugin-394_report-encoding/pom.xml b/maven-plugin-plugin/src/it/mplugin-394_report-encoding/pom.xml
index aba0fb69..e83b6e75 100644
--- a/maven-plugin-plugin/src/it/mplugin-394_report-encoding/pom.xml
+++ b/maven-plugin-plugin/src/it/mplugin-394_report-encoding/pom.xml
@@ -44,11 +44,7 @@ under the License.
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>@mavenVersion@</version>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-utils</artifactId>
-      <version>@plexusUtilsVersion@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
diff --git a/maven-plugin-plugin/src/it/packaging-jar/pom.xml b/maven-plugin-plugin/src/it/packaging-jar/pom.xml
index d46640f5..268956ed 100644
--- a/maven-plugin-plugin/src/it/packaging-jar/pom.xml
+++ b/maven-plugin-plugin/src/it/packaging-jar/pom.xml
@@ -42,22 +42,13 @@ under the License.
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>@mavenVersion@</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-core</artifactId>
-      <version>@mavenVersion@</version>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-utils</artifactId>
-      <version>@plexusUtilsVersion@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
       <artifactId>maven-plugin-annotations</artifactId>
       <version>@project.version@</version>
-      <scope>compile</scope>
+      <scope>provided</scope>
     </dependency>
   </dependencies>
 
diff --git a/maven-plugin-plugin/src/it/plugin-info-jdk-default-version/pom.xml b/maven-plugin-plugin/src/it/plugin-info-jdk-default-version/pom.xml
index feff8a59..49df8ba6 100644
--- a/maven-plugin-plugin/src/it/plugin-info-jdk-default-version/pom.xml
+++ b/maven-plugin-plugin/src/it/plugin-info-jdk-default-version/pom.xml
@@ -37,6 +37,7 @@ under the License.
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>@mavenVersion@</version>
+      <scope>provided</scope>
     </dependency>
   </dependencies>
 
@@ -47,12 +48,6 @@ under the License.
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-compiler-plugin</artifactId>
           <version>2.3.2</version>
-          <!--
-            <configuration>
-              <source>1.5</source>
-              <target>1.5</target>
-            </configuration>
-            -->
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
diff --git a/maven-plugin-plugin/src/it/plugin-report-annotations/pom.xml b/maven-plugin-plugin/src/it/plugin-report-annotations/pom.xml
index 434886d8..be4a57f9 100644
--- a/maven-plugin-plugin/src/it/plugin-report-annotations/pom.xml
+++ b/maven-plugin-plugin/src/it/plugin-report-annotations/pom.xml
@@ -41,12 +41,25 @@ under the License.
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>@mavenVersion@</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-artifact</artifactId>
+      <version>@mavenVersion@</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-core</artifactId>
+      <version>@mavenVersion@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.plugin-tools</groupId>
       <artifactId>maven-plugin-annotations</artifactId>
       <version>@project.version@</version>
-      <scope>compile</scope>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.reporting</groupId>
diff --git a/maven-plugin-plugin/src/it/plugin-report/pom.xml b/maven-plugin-plugin/src/it/plugin-report/pom.xml
index 3cdb6896..6cdcefda 100644
--- a/maven-plugin-plugin/src/it/plugin-report/pom.xml
+++ b/maven-plugin-plugin/src/it/plugin-report/pom.xml
@@ -47,6 +47,19 @@ under the License.
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
       <version>@mavenVersion@</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-artifact</artifactId>
+      <version>@mavenVersion@</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-core</artifactId>
+      <version>@mavenVersion@</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.reporting</groupId>
diff --git a/maven-plugin-plugin/src/it/source-encoding/latin-1/pom.xml b/maven-plugin-plugin/src/it/source-encoding/latin-1/pom.xml
index e21d6cae..5c2ce92e 100644
--- a/maven-plugin-plugin/src/it/source-encoding/latin-1/pom.xml
+++ b/maven-plugin-plugin/src/it/source-encoding/latin-1/pom.xml
@@ -40,7 +40,8 @@ under the License.
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
-      <version>2.0</version>
+      <version>@mavenVersion@</version>
+      <scope>provided</scope>
     </dependency>
   </dependencies>
 
diff --git a/maven-plugin-plugin/src/it/source-encoding/utf-8/pom.xml b/maven-plugin-plugin/src/it/source-encoding/utf-8/pom.xml
index a8ddf7f0..a68864f6 100644
--- a/maven-plugin-plugin/src/it/source-encoding/utf-8/pom.xml
+++ b/maven-plugin-plugin/src/it/source-encoding/utf-8/pom.xml
@@ -40,7 +40,8 @@ under the License.
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
-      <version>2.0</version>
+      <version>@mavenVersion@</version>
+      <scope>provided</scope>
     </dependency>
   </dependencies>
 
diff --git a/maven-plugin-tools-annotations/pom.xml b/maven-plugin-tools-annotations/pom.xml
index 8cd6da1d..d20cf649 100644
--- a/maven-plugin-tools-annotations/pom.xml
+++ b/maven-plugin-tools-annotations/pom.xml
@@ -105,6 +105,10 @@
 
   <build>
     <plugins>
+      <plugin>
+        <groupId>org.eclipse.sisu</groupId>
+        <artifactId>sisu-maven-plugin</artifactId>
+      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
diff --git a/maven-plugin-tools-api/pom.xml b/maven-plugin-tools-api/pom.xml
index dbc279aa..1fb86d6b 100644
--- a/maven-plugin-tools-api/pom.xml
+++ b/maven-plugin-tools-api/pom.xml
@@ -51,11 +51,7 @@
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-artifact</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-settings</artifactId>
-    </dependency>
-    
+
      <!-- plexus -->
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
@@ -63,11 +59,6 @@
     </dependency>
 
     <!-- test -->
-    <dependency>
-      <groupId>org.apache.maven.plugin-testing</groupId>
-      <artifactId>maven-plugin-testing-harness</artifactId>
-      <scope>test</scope>
-    </dependency>
     <dependency>
       <groupId>org.junit.jupiter</groupId>
       <artifactId>junit-jupiter-engine</artifactId>
@@ -77,6 +68,10 @@
 
   <build>
     <plugins>
+      <plugin>
+        <groupId>org.eclipse.sisu</groupId>
+        <artifactId>sisu-maven-plugin</artifactId>
+      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
diff --git a/maven-script/maven-plugin-tools-ant/pom.xml b/maven-script/maven-plugin-tools-ant/pom.xml
index 77d19ad6..1816c5cb 100644
--- a/maven-script/maven-plugin-tools-ant/pom.xml
+++ b/maven-script/maven-plugin-tools-ant/pom.xml
@@ -61,4 +61,13 @@
     </dependency>
   </dependencies>
 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.eclipse.sisu</groupId>
+        <artifactId>sisu-maven-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+
 </project>
diff --git a/maven-script/maven-plugin-tools-beanshell/pom.xml b/maven-script/maven-plugin-tools-beanshell/pom.xml
index c1d69cec..05a80f50 100644
--- a/maven-script/maven-plugin-tools-beanshell/pom.xml
+++ b/maven-script/maven-plugin-tools-beanshell/pom.xml
@@ -43,11 +43,6 @@
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-api</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.eclipse.sisu</groupId>
-      <artifactId>org.eclipse.sisu.plexus</artifactId>
-      <scope>compile</scope>
-    </dependency>
 
     <!-- misc -->
     <dependency>
@@ -57,4 +52,13 @@
     </dependency>
   </dependencies>
 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.eclipse.sisu</groupId>
+        <artifactId>sisu-maven-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+
 </project>