You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by gn...@apache.org on 2024/06/21 08:29:29 UTC

(maven-plugin-testing) branch master updated (007a858 -> fddd725)

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

gnodet pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/maven-plugin-testing.git


    from 007a858  Do not build with JDK 21 (#41)
     new 7878374  [MPLUGINTESTING-94] Remove Maven 3 support classes
     new c6ef221  [MPLUGINTESTING-94] Switch to Maven 4.0.0-beta-3
     new 407a883  Rename SessionStub to SessionMock and add a real SessionStub
     new fddd725  Cleanup deps

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/maven-verify.yml                 |    2 +-
 maven-plugin-testing-harness/pom.xml               |   50 +-
 .../maven/api/di/testing/MavenDIExtension.java     |  150 ++
 .../di/testing/MavenDITest.java}                   |    8 +-
 .../plugin/testing/Basedir.java}                   |    8 +-
 .../maven/api/plugin/testing/InjectMojo.java       |    6 +-
 .../maven/api/plugin/testing/MojoExtension.java    |  598 +++++---
 .../maven/api/plugin/testing/MojoParameter.java    |    2 +
 .../maven/api/plugin/testing/MojoParameters.java   |    2 +
 .../testing/ResolverExpressionEvaluatorStub.java   |   12 +-
 .../api/plugin/testing/stubs/ArtifactStub.java     |   23 +-
 .../plugin/testing/stubs/MojoExecutionStub.java    |   67 +-
 .../maven/api/plugin/testing/stubs/PluginStub.java |  102 ++
 .../api/plugin/testing/stubs/ProjectStub.java      |  159 ++-
 .../testing/stubs/RepositorySystemSupplier.java    | 1069 ++++++++++++++
 .../stubs/{SessionStub.java => SessionMock.java}   |  205 ++-
 .../api/plugin/testing/stubs/SessionStub.java      |  610 ++++----
 .../maven/plugin/testing/AbstractMojoTestCase.java |  723 ----------
 .../maven/plugin/testing/ArtifactStubFactory.java  |  510 -------
 .../plugin/testing/ConfigurationException.java     |   51 -
 .../maven/plugin/testing/MojoLogWrapper.java       |  122 --
 .../maven/plugin/testing/MojoParameters.java       |   34 -
 .../org/apache/maven/plugin/testing/MojoRule.java  |  363 -----
 .../testing/ResolverExpressionEvaluatorStub.java   |  114 --
 .../org/apache/maven/plugin/testing/SilentLog.java |  330 -----
 .../apache/maven/plugin/testing/WithoutMojo.java   |   37 -
 .../maven/plugin/testing/junit5/InjectMojo.java    |   35 -
 .../maven/plugin/testing/junit5/MojoExtension.java |  454 ------
 .../maven/plugin/testing/junit5/MojoParameter.java |   34 -
 .../plugin/testing/resources/TestResources.java    |  170 ---
 .../maven/plugin/testing/stubs/ArtifactStub.java   |  496 -------
 .../testing/stubs/DefaultArtifactHandlerStub.java  |  181 ---
 .../plugin/testing/stubs/MavenProjectStub.java     | 1487 --------------------
 .../testing/stubs/StubArtifactRepository.java      |  241 ----
 .../di/testing/SimpleDITest.java}                  |   37 +-
 .../plugin/testing/ExpressionEvaluatorTest.java    |   42 +-
 .../plugin/testing/ExpressionEvaluatorMojo.java    |   53 -
 .../plugin/testing/ExpressionEvaluatorTest.java    |   78 -
 .../apache/maven/plugin/testing/MojoRuleTest.java  |  170 ---
 .../maven/plugin/testing/MojoTestCaseTest.java     |  125 --
 .../maven/plugin/testing/ParametersMojo.java       |   38 -
 .../maven/plugin/testing/ParametersMojoTest.java   |   95 --
 .../plugin/testing/PluginArtifactFileTest.java     |   45 -
 .../apache/maven/plugin/testing/SimpleMojo.java    |   42 -
 .../apache/maven/plugin/testing/TestSilentLog.java |   74 -
 .../maven/plugin/testing/junit5/Junit5Test.java    |   71 -
 .../testing/resources/TestResourcesTest.java       |   30 -
 .../src/test/projects/default/pom.xml              |   48 -
 .../src/test/projects/explicit/pom.xml             |   54 -
 .../src/test/projects/property/pom.xml             |   52 -
 .../META-INF/maven/org.apache.maven.api.di.Inject  |    4 +-
 .../src/test/resources/META-INF/maven/plugin.xml   |   41 +-
 pom.xml                                            |    6 +-
 53 files changed, 2589 insertions(+), 6971 deletions(-)
 create mode 100644 maven-plugin-testing-harness/src/main/java/org/apache/maven/api/di/testing/MavenDIExtension.java
 rename maven-plugin-testing-harness/src/main/java/org/apache/maven/{plugin/testing/junit5/MojoTest.java => api/di/testing/MavenDITest.java} (89%)
 rename maven-plugin-testing-harness/src/main/java/org/apache/maven/{plugin/testing/junit5/MojoParameters.java => api/plugin/testing/Basedir.java} (86%)
 create mode 100644 maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/PluginStub.java
 create mode 100644 maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/RepositorySystemSupplier.java
 copy maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/{SessionStub.java => SessionMock.java} (74%)
 delete mode 100644 maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java
 delete mode 100644 maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ArtifactStubFactory.java
 delete mode 100644 maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ConfigurationException.java
 delete mode 100644 maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/MojoLogWrapper.java
 delete mode 100644 maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/MojoParameters.java
 delete mode 100644 maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/MojoRule.java
 delete mode 100644 maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ResolverExpressionEvaluatorStub.java
 delete mode 100644 maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/SilentLog.java
 delete mode 100644 maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/WithoutMojo.java
 delete mode 100644 maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/junit5/InjectMojo.java
 delete mode 100644 maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/junit5/MojoExtension.java
 delete mode 100644 maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/junit5/MojoParameter.java
 delete mode 100644 maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/resources/TestResources.java
 delete mode 100644 maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/ArtifactStub.java
 delete mode 100644 maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/DefaultArtifactHandlerStub.java
 delete mode 100644 maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/MavenProjectStub.java
 delete mode 100644 maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactRepository.java
 rename maven-plugin-testing-harness/src/test/java/org/apache/maven/{plugin/testing/ArtifactStubFactoryTest.java => api/di/testing/SimpleDITest.java} (52%)
 delete mode 100644 maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ExpressionEvaluatorMojo.java
 delete mode 100644 maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ExpressionEvaluatorTest.java
 delete mode 100644 maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/MojoRuleTest.java
 delete mode 100644 maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/MojoTestCaseTest.java
 delete mode 100644 maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ParametersMojo.java
 delete mode 100644 maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ParametersMojoTest.java
 delete mode 100644 maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/PluginArtifactFileTest.java
 delete mode 100644 maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/SimpleMojo.java
 delete mode 100644 maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/TestSilentLog.java
 delete mode 100644 maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/junit5/Junit5Test.java
 delete mode 100644 maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/resources/TestResourcesTest.java
 delete mode 100644 maven-plugin-testing-harness/src/test/projects/default/pom.xml
 delete mode 100644 maven-plugin-testing-harness/src/test/projects/explicit/pom.xml
 delete mode 100644 maven-plugin-testing-harness/src/test/projects/property/pom.xml
 copy .git-blame-ignore-revs => maven-plugin-testing-harness/src/test/resources/META-INF/maven/org.apache.maven.api.di.Inject (90%)


(maven-plugin-testing) 02/04: [MPLUGINTESTING-94] Switch to Maven 4.0.0-beta-3

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit c6ef221ab068ee487e1c535aa2b8925ecc4f0db6
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Tue Nov 28 18:28:40 2023 +0100

    [MPLUGINTESTING-94] Switch to Maven 4.0.0-beta-3
---
 .github/workflows/maven-verify.yml                 |    2 +-
 maven-plugin-testing-harness/pom.xml               |   46 +-
 .../maven/api/di/testing/MavenDIExtension.java     |  150 +++
 .../testing/MavenDITest.java}                      |   18 +-
 .../testing/{MojoParameters.java => Basedir.java}  |    6 +-
 .../maven/api/plugin/testing/InjectMojo.java       |    6 +-
 .../maven/api/plugin/testing/MojoExtension.java    |  598 ++++++++---
 .../maven/api/plugin/testing/MojoParameter.java    |    2 +
 .../maven/api/plugin/testing/MojoParameters.java   |    2 +
 .../testing/ResolverExpressionEvaluatorStub.java   |   12 +-
 .../api/plugin/testing/stubs/ArtifactStub.java     |   23 +-
 .../plugin/testing/stubs/MojoExecutionStub.java    |   67 +-
 .../maven/api/plugin/testing/stubs/PluginStub.java |  102 ++
 .../api/plugin/testing/stubs/ProjectStub.java      |  152 ++-
 .../testing/stubs/RepositorySystemSupplier.java    | 1069 ++++++++++++++++++++
 .../api/plugin/testing/stubs/SessionStub.java      |  203 +++-
 .../apache/maven/api/di/testing/SimpleDITest.java  |   50 +
 .../plugin/testing/ExpressionEvaluatorTest.java    |   38 +-
 .../META-INF/maven/org.apache.maven.api.di.Inject  |   18 +-
 .../src/test/resources/META-INF/maven/plugin.xml   |   41 +-
 pom.xml                                            |    6 +-
 21 files changed, 2272 insertions(+), 339 deletions(-)

diff --git a/.github/workflows/maven-verify.yml b/.github/workflows/maven-verify.yml
index fa7dc4b..9177951 100644
--- a/.github/workflows/maven-verify.yml
+++ b/.github/workflows/maven-verify.yml
@@ -26,4 +26,4 @@ jobs:
     name: Verify
     uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v4
     with:
-      jdk-matrix: '[ "8", "11", "17" ]'
+      jdk-matrix: '[ "17", "21" ]'
diff --git a/maven-plugin-testing-harness/pom.xml b/maven-plugin-testing-harness/pom.xml
index beaa39d..a1d4e4d 100644
--- a/maven-plugin-testing-harness/pom.xml
+++ b/maven-plugin-testing-harness/pom.xml
@@ -35,7 +35,7 @@ under the License.
       <dependency>
         <groupId>org.junit</groupId>
         <artifactId>junit-bom</artifactId>
-        <version>5.10.0</version>
+        <version>5.10.1</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
@@ -62,18 +62,33 @@ under the License.
       <version>${mavenVersion}</version>
       <scope>provided</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-model-builder</artifactId>
+      <version>${mavenVersion}</version>
+      <scope>provided</scope>
+    </dependency>
     <dependency>
       <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-xml-impl</artifactId>
+      <version>${mavenVersion}</version>
+    </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-resolver-provider</artifactId>
       <version>${mavenVersion}</version>
       <scope>provided</scope>
     </dependency>
+    <dependency>
+      <groupId>org.eclipse.sisu</groupId>
+      <artifactId>org.eclipse.sisu.plexus</artifactId>
+    </dependency>
 
     <!-- plexus -->
     <dependency>
@@ -85,7 +100,7 @@ under the License.
       <!-- correct version must be provided by project depends on Maven version -->
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-xml</artifactId>
-      <version>4.0.0</version>
+      <version>4.0.3</version>
       <optional>true</optional>
     </dependency>
     <dependency>
@@ -97,14 +112,17 @@ under the License.
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-testing</artifactId>
-      <version>1.1.0</version>
-      <exclusions>
-        <exclusion>
-          <!-- we need as optional dependencies -->
-          <groupId>org.junit.jupiter</groupId>
-          <artifactId>junit-jupiter-api</artifactId>
-        </exclusion>
-      </exclusions>
+      <version>1.3.0</version>
+    </dependency>
+    <dependency>
+      <groupId>com.google.inject</groupId>
+      <artifactId>guice</artifactId>
+      <version>6.0.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.ow2.asm</groupId>
+      <artifactId>asm</artifactId>
+      <version>9.6</version>
     </dependency>
     <dependency>
       <!-- newer version is required by plexus-testing -->
@@ -112,12 +130,6 @@ under the License.
       <artifactId>guava</artifactId>
       <version>32.0.1-jre</version>
     </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.13.2</version>
-      <optional>true</optional>
-    </dependency>
     <dependency>
       <groupId>org.junit.jupiter</groupId>
       <artifactId>junit-jupiter-api</artifactId>
@@ -131,7 +143,7 @@ under the License.
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-simple</artifactId>
-      <version>1.7.36</version>
+      <version>2.0.13</version>
       <scope>test</scope>
     </dependency>
   </dependencies>
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/di/testing/MavenDIExtension.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/di/testing/MavenDIExtension.java
new file mode 100644
index 0000000..c6f3b86
--- /dev/null
+++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/di/testing/MavenDIExtension.java
@@ -0,0 +1,150 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.api.di.testing;
+
+import java.io.*;
+
+import org.apache.maven.di.Injector;
+import org.apache.maven.di.Key;
+import org.apache.maven.di.impl.DIException;
+import org.junit.jupiter.api.extension.AfterEachCallback;
+import org.junit.jupiter.api.extension.BeforeEachCallback;
+import org.junit.jupiter.api.extension.ExtensionContext;
+
+/**
+ * This is a slightly modified version of the original plexus class
+ * available at https://raw.githubusercontent.com/codehaus-plexus/plexus-containers/master/plexus-container-default/
+ *              src/main/java/org/codehaus/plexus/PlexusTestCase.java
+ * in order to migrate the tests to JUnit 4.
+ *
+ * @author Jason van Zyl
+ * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
+ * @author <a href="mailto:michal@codehaus.org">Michal Maczka</a>
+ * @author Guillaume Nodet
+ */
+public class MavenDIExtension implements BeforeEachCallback, AfterEachCallback {
+    protected static ExtensionContext context;
+    protected Injector injector;
+    protected static String basedir;
+
+    @Override
+    public void beforeEach(ExtensionContext context) throws Exception {
+        basedir = getBasedir();
+
+        setContext(context);
+
+        getInjector().bindInstance((Class<Object>) context.getRequiredTestClass(), context.getRequiredTestInstance());
+        getInjector().injectInstance(context.getRequiredTestInstance());
+    }
+
+    protected void setContext(ExtensionContext context) {
+        this.context = context;
+    }
+
+    @SuppressWarnings("unchecked")
+    protected void setupContainer() {
+        try {
+            injector = Injector.create();
+            injector.bindInstance(ExtensionContext.class, this.context);
+            injector.discover(this.context.getRequiredTestClass().getClassLoader());
+            injector.bindInstance(Injector.class, injector);
+            injector.bindInstance((Class) this.context.getRequiredTestClass(), this.context.getRequiredTestInstance());
+        } catch (Exception e) {
+            throw new IllegalArgumentException("Failed to create DI injector.", e);
+        }
+    }
+
+    @Override
+    public void afterEach(ExtensionContext context) throws Exception {
+        if (injector != null) {
+            // TODO: implement
+            // injector.dispose();
+            injector = null;
+        }
+    }
+
+    public Injector getInjector() {
+        if (injector == null) {
+            setupContainer();
+        }
+
+        return injector;
+    }
+
+    // ----------------------------------------------------------------------
+    // Container access
+    // ----------------------------------------------------------------------
+
+    protected <T> T lookup(Class<T> componentClass) throws DIException {
+        return getInjector().getInstance(componentClass);
+    }
+
+    protected <T> T lookup(Class<T> componentClass, String roleHint) throws DIException {
+        return getInjector().getInstance(Key.ofType(componentClass, roleHint));
+    }
+
+    protected <T> T lookup(Class<T> componentClass, Object qualifier) throws DIException {
+        return getInjector().getInstance(Key.ofType(componentClass, qualifier));
+    }
+
+    protected void release(Object component) throws DIException {
+        // TODO: implement
+        // getInjector().release(component);
+    }
+
+    // ----------------------------------------------------------------------
+    // Helper methods for sub classes
+    // ----------------------------------------------------------------------
+
+    public static File getTestFile(String path) {
+        return new File(getBasedir(), path);
+    }
+
+    public static File getTestFile(String basedir, String path) {
+        File basedirFile = new File(basedir);
+
+        if (!basedirFile.isAbsolute()) {
+            basedirFile = getTestFile(basedir);
+        }
+
+        return new File(basedirFile, path);
+    }
+
+    public static String getTestPath(String path) {
+        return getTestFile(path).getAbsolutePath();
+    }
+
+    public static String getTestPath(String basedir, String path) {
+        return getTestFile(basedir, path).getAbsolutePath();
+    }
+
+    public static String getBasedir() {
+        if (basedir != null) {
+            return basedir;
+        }
+
+        basedir = System.getProperty("basedir");
+
+        if (basedir == null) {
+            basedir = new File("").getAbsolutePath();
+        }
+
+        return basedir;
+    }
+}
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoParameter.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/di/testing/MavenDITest.java
similarity index 77%
copy from maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoParameter.java
copy to maven-plugin-testing-harness/src/main/java/org/apache/maven/api/di/testing/MavenDITest.java
index 2a28f48..ddc6d2f 100644
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoParameter.java
+++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/di/testing/MavenDITest.java
@@ -16,19 +16,19 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.maven.api.plugin.testing;
+package org.apache.maven.api.di.testing;
 
-import java.lang.annotation.Repeatable;
+import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.junit.jupiter.api.extension.ExtendWith;
 
 /**
- * Mojo parameter
+ * Plexus test
  */
 @Retention(RetentionPolicy.RUNTIME)
-@Repeatable(MojoParameters.class)
-public @interface MojoParameter {
-    String name();
-
-    String value();
-}
+@ExtendWith(MavenDIExtension.class)
+@Target(ElementType.TYPE)
+public @interface MavenDITest {}
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoParameters.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/Basedir.java
similarity index 90%
copy from maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoParameters.java
copy to maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/Basedir.java
index 434abe1..69eaba2 100644
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoParameters.java
+++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/Basedir.java
@@ -18,6 +18,7 @@
  */
 package org.apache.maven.api.plugin.testing;
 
+import java.lang.annotation.Inherited;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 
@@ -25,6 +26,7 @@ import java.lang.annotation.RetentionPolicy;
  * Mojo parameters container
  */
 @Retention(RetentionPolicy.RUNTIME)
-public @interface MojoParameters {
-    MojoParameter[] value();
+@Inherited
+public @interface Basedir {
+    String value() default "";
 }
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/InjectMojo.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/InjectMojo.java
index e094d06..272eb9b 100644
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/InjectMojo.java
+++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/InjectMojo.java
@@ -18,6 +18,7 @@
  */
 package org.apache.maven.api.plugin.testing;
 
+import java.lang.annotation.Inherited;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 
@@ -25,11 +26,10 @@ import java.lang.annotation.RetentionPolicy;
  *
  */
 @Retention(RetentionPolicy.RUNTIME)
+@Inherited
 public @interface InjectMojo {
 
     String goal();
 
-    String pom();
-
-    boolean empty() default false;
+    String pom() default "";
 }
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoExtension.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoExtension.java
index b217fab..0147261 100644
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoExtension.java
+++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoExtension.java
@@ -18,68 +18,75 @@
  */
 package org.apache.maven.api.plugin.testing;
 
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.InputStream;
-import java.io.Reader;
-import java.io.StringReader;
+import java.io.*;
 import java.lang.reflect.AccessibleObject;
+import java.lang.reflect.AnnotatedElement;
 import java.lang.reflect.Field;
 import java.net.URL;
+import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Optional;
-import java.util.Set;
+import java.util.*;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
-import com.google.inject.internal.ProviderMethodsModule;
 import org.apache.maven.api.MojoExecution;
 import org.apache.maven.api.Project;
 import org.apache.maven.api.Session;
+import org.apache.maven.api.di.Named;
+import org.apache.maven.api.di.Priority;
+import org.apache.maven.api.di.Provides;
+import org.apache.maven.api.di.Singleton;
+import org.apache.maven.api.di.testing.MavenDIExtension;
+import org.apache.maven.api.model.Build;
+import org.apache.maven.api.model.ConfigurationContainer;
+import org.apache.maven.api.model.Model;
 import org.apache.maven.api.plugin.Log;
 import org.apache.maven.api.plugin.Mojo;
+import org.apache.maven.api.plugin.descriptor.MojoDescriptor;
+import org.apache.maven.api.plugin.descriptor.Parameter;
+import org.apache.maven.api.plugin.descriptor.PluginDescriptor;
+import org.apache.maven.api.plugin.testing.stubs.*;
+import org.apache.maven.api.services.ArtifactDeployer;
+import org.apache.maven.api.services.ArtifactFactory;
+import org.apache.maven.api.services.ArtifactInstaller;
+import org.apache.maven.api.services.ArtifactManager;
+import org.apache.maven.api.services.LocalRepositoryManager;
+import org.apache.maven.api.services.ProjectBuilder;
+import org.apache.maven.api.services.ProjectManager;
+import org.apache.maven.api.services.RepositoryFactory;
+import org.apache.maven.api.services.VersionParser;
+import org.apache.maven.api.services.xml.ModelXmlFactory;
 import org.apache.maven.api.xml.XmlNode;
 import org.apache.maven.configuration.internal.EnhancedComponentConfigurator;
+import org.apache.maven.di.Injector;
+import org.apache.maven.di.Key;
+import org.apache.maven.di.impl.DIException;
 import org.apache.maven.internal.impl.DefaultLog;
+import org.apache.maven.internal.impl.InternalSession;
+import org.apache.maven.internal.impl.model.DefaultModelPathTranslator;
+import org.apache.maven.internal.impl.model.DefaultPathTranslator;
 import org.apache.maven.internal.xml.XmlNodeImpl;
+import org.apache.maven.internal.xml.XmlPlexusConfiguration;
 import org.apache.maven.lifecycle.internal.MojoDescriptorCreator;
+import org.apache.maven.model.v4.MavenMerger;
+import org.apache.maven.model.v4.MavenStaxReader;
 import org.apache.maven.plugin.PluginParameterExpressionEvaluatorV4;
-import org.apache.maven.plugin.descriptor.MojoDescriptor;
-import org.apache.maven.plugin.descriptor.Parameter;
-import org.apache.maven.plugin.descriptor.PluginDescriptor;
-import org.apache.maven.plugin.descriptor.PluginDescriptorBuilder;
-import org.codehaus.plexus.DefaultPlexusContainer;
-import org.codehaus.plexus.PlexusContainer;
-import org.codehaus.plexus.component.configurator.ComponentConfigurator;
+import org.apache.maven.plugin.descriptor.io.PluginDescriptorStaxReader;
 import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException;
 import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator;
 import org.codehaus.plexus.component.configurator.expression.TypeAwareExpressionEvaluator;
-import org.codehaus.plexus.component.repository.ComponentDescriptor;
-import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
-import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration;
-import org.codehaus.plexus.testing.PlexusExtension;
-import org.codehaus.plexus.util.InterpolationFilterReader;
-import org.codehaus.plexus.util.ReaderFactory;
 import org.codehaus.plexus.util.ReflectionUtils;
 import org.codehaus.plexus.util.xml.XmlStreamReader;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
 import org.codehaus.plexus.util.xml.Xpp3DomBuilder;
-import org.junit.jupiter.api.extension.ExtensionContext;
-import org.junit.jupiter.api.extension.ParameterContext;
-import org.junit.jupiter.api.extension.ParameterResolutionException;
-import org.junit.jupiter.api.extension.ParameterResolver;
+import org.eclipse.aether.RepositorySystem;
+import org.junit.jupiter.api.extension.*;
+import org.junit.platform.commons.support.AnnotationSupport;
 import org.slf4j.LoggerFactory;
 
+import static java.util.Objects.requireNonNull;
+
 /**
  * JUnit extension to help testing Mojos. The extension should be automatically registered
  * by adding the {@link MojoTest} annotation on the test class.
@@ -87,8 +94,25 @@ import org.slf4j.LoggerFactory;
  * @see MojoTest
  * @see InjectMojo
  * @see MojoParameter
+ * @see Basedir
  */
-public class MojoExtension extends PlexusExtension implements ParameterResolver {
+public class MojoExtension extends MavenDIExtension implements ParameterResolver, BeforeEachCallback {
+
+    protected static String pluginBasedir;
+    protected static String basedir;
+
+    public static String getTestId() {
+        return context.getRequiredTestClass().getSimpleName() + "-"
+                + context.getRequiredTestMethod().getName();
+    }
+
+    public static String getBasedir() {
+        return requireNonNull(basedir != null ? basedir : MavenDIExtension.basedir);
+    }
+
+    public static String getPluginBasedir() {
+        return requireNonNull(pluginBasedir);
+    }
 
     @Override
     public boolean supportsParameter(ParameterContext parameterContext, ExtensionContext extensionContext)
@@ -101,115 +125,382 @@ public class MojoExtension extends PlexusExtension implements ParameterResolver
     public Object resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext)
             throws ParameterResolutionException {
         try {
-            InjectMojo injectMojo = parameterContext
-                    .findAnnotation(InjectMojo.class)
-                    .orElseGet(() -> parameterContext.getDeclaringExecutable().getAnnotation(InjectMojo.class));
-
-            Set<MojoParameter> mojoParameters =
-                    new HashSet<>(parameterContext.findRepeatableAnnotations(MojoParameter.class));
-
-            Optional.ofNullable(parameterContext.getDeclaringExecutable().getAnnotation(MojoParameter.class))
-                    .ifPresent(mojoParameters::add);
-
-            Optional.ofNullable(parameterContext.getDeclaringExecutable().getAnnotation(MojoParameters.class))
-                    .map(MojoParameters::value)
-                    .map(Arrays::asList)
-                    .ifPresent(mojoParameters::addAll);
-
             Class<?> holder = parameterContext.getTarget().get().getClass();
             PluginDescriptor descriptor = extensionContext
                     .getStore(ExtensionContext.Namespace.GLOBAL)
                     .get(PluginDescriptor.class, PluginDescriptor.class);
-            return lookupMojo(holder, injectMojo, mojoParameters, descriptor);
+            Model model =
+                    extensionContext.getStore(ExtensionContext.Namespace.GLOBAL).get(Model.class, Model.class);
+            InjectMojo parameterInjectMojo =
+                    parameterContext.getAnnotatedElement().getAnnotation(InjectMojo.class);
+            String goal;
+            if (parameterInjectMojo != null) {
+                String pom = parameterInjectMojo.pom();
+                if (pom != null && !pom.isEmpty()) {
+                    try (Reader r = openPomUrl(holder, pom, new Path[1])) {
+                        Model localModel = new MavenStaxReader().read(r);
+                        model = new MavenMerger().merge(localModel, model, false, null);
+                        model = new DefaultModelPathTranslator(new DefaultPathTranslator())
+                                .alignToBaseDirectory(model, Paths.get(getBasedir()), null);
+                    }
+                }
+                goal = parameterInjectMojo.goal();
+            } else {
+                InjectMojo methodInjectMojo = AnnotationSupport.findAnnotation(
+                                parameterContext.getDeclaringExecutable(), InjectMojo.class)
+                        .orElse(null);
+                if (methodInjectMojo != null) {
+                    goal = methodInjectMojo.goal();
+                } else {
+                    goal = getGoalFromMojoImplementationClass(
+                            parameterContext.getParameter().getType());
+                }
+            }
+
+            Set<MojoParameter> mojoParameters = new LinkedHashSet<>();
+            for (AnnotatedElement ae :
+                    Arrays.asList(parameterContext.getDeclaringExecutable(), parameterContext.getAnnotatedElement())) {
+                mojoParameters.addAll(AnnotationSupport.findRepeatableAnnotations(ae, MojoParameter.class));
+            }
+            String[] coord = mojoCoordinates(goal);
+
+            XmlNode pluginConfiguration = model.getBuild().getPlugins().stream()
+                    .filter(p ->
+                            Objects.equals(p.getGroupId(), coord[0]) && Objects.equals(p.getArtifactId(), coord[1]))
+                    .map(ConfigurationContainer::getConfiguration)
+                    .findFirst()
+                    .orElseGet(() -> new XmlNodeImpl("config"));
+            List<XmlNode> children = mojoParameters.stream()
+                    .map(mp -> new XmlNodeImpl(mp.name(), mp.value()))
+                    .collect(Collectors.toList());
+            XmlNode config = new XmlNodeImpl("configuration", null, null, children, null);
+            pluginConfiguration = XmlNode.merge(config, pluginConfiguration);
+
+            // load default config
+            // pluginkey = groupId : artifactId : version : goal
+            Mojo mojo = lookup(Mojo.class, coord[0] + ":" + coord[1] + ":" + coord[2] + ":" + coord[3]);
+            for (MojoDescriptor mojoDescriptor : descriptor.getMojos()) {
+                if (Objects.equals(mojoDescriptor.getGoal(), coord[3])) {
+                    if (pluginConfiguration != null) {
+                        pluginConfiguration = finalizeConfig(pluginConfiguration, mojoDescriptor);
+                    }
+                }
+            }
+
+            Session session = getInjector().getInstance(Session.class);
+            Project project = getInjector().getInstance(Project.class);
+            MojoExecution mojoExecution = getInjector().getInstance(MojoExecution.class);
+            ExpressionEvaluator evaluator = new WrapEvaluator(
+                    getInjector(), new PluginParameterExpressionEvaluatorV4(session, project, mojoExecution));
+
+            EnhancedComponentConfigurator configurator = new EnhancedComponentConfigurator();
+            configurator.configureComponent(
+                    mojo, new XmlPlexusConfiguration(pluginConfiguration), evaluator, null, null);
+            return mojo;
         } catch (Exception e) {
-            throw new ParameterResolutionException("Unable to resolve parameter", e);
+            throw new ParameterResolutionException("Unable to resolve mojo", e);
         }
     }
 
+    /**
+     * The @Mojo annotation is only retained in the class file, not at runtime,
+     * so we need to actually read the class file with ASM to find the annotation and
+     * the goal.
+     */
+    private static String getGoalFromMojoImplementationClass(Class<?> cl) throws IOException {
+        return cl.getAnnotation(Named.class).value();
+    }
+
     @Override
     public void beforeEach(ExtensionContext context) throws Exception {
-        // TODO provide protected setters in PlexusExtension
-        Field field = PlexusExtension.class.getDeclaredField("basedir");
-        field.setAccessible(true);
-        field.set(null, getBasedir());
-        field = PlexusExtension.class.getDeclaredField("context");
-        field.setAccessible(true);
-        field.set(this, context);
-
-        getContainer().addComponent(getContainer(), PlexusContainer.class.getName());
-
-        ((DefaultPlexusContainer) getContainer()).addPlexusInjector(Collections.emptyList(), binder -> {
-            binder.install(ProviderMethodsModule.forObject(context.getRequiredTestInstance()));
-            binder.requestInjection(context.getRequiredTestInstance());
-            binder.bind(Log.class).toInstance(new DefaultLog(LoggerFactory.getLogger("anonymous")));
-        });
+        if (pluginBasedir == null) {
+            pluginBasedir = MavenDIExtension.getBasedir();
+        }
+        basedir = AnnotationSupport.findAnnotation(context.getElement().get(), Basedir.class)
+                .map(Basedir::value)
+                .orElse(pluginBasedir);
+        if (basedir != null) {
+            if (basedir.isEmpty()) {
+                basedir = pluginBasedir + "/target/tests/"
+                        + context.getRequiredTestClass().getSimpleName() + "/"
+                        + context.getRequiredTestMethod().getName();
+            } else {
+                basedir = basedir.replace("${basedir}", pluginBasedir);
+            }
+        }
 
-        Map<Object, Object> map = getContainer().getContext().getContextData();
+        setContext(context);
+
+        /*
+           binder.install(ProviderMethodsModule.forObject(context.getRequiredTestInstance()));
+           binder.requestInjection(context.getRequiredTestInstance());
+           binder.bind(Log.class).toInstance(new DefaultLog(LoggerFactory.getLogger("anonymous")));
+           binder.bind(ExtensionContext.class).toInstance(context);
+           // Load maven 4 api Services interfaces and try to bind them to the (possible) mock instances
+           // returned by the (possibly) mock InternalSession
+           try {
+               for (ClassPath.ClassInfo clazz :
+                       ClassPath.from(getClassLoader()).getAllClasses()) {
+                   if ("org.apache.maven.api.services".equals(clazz.getPackageName())) {
+                       Class<?> load = clazz.load();
+                       if (Service.class.isAssignableFrom(load)) {
+                           Class<Service> svc = (Class) load;
+                           binder.bind(svc).toProvider(() -> {
+                               try {
+                                   return getContainer()
+                                           .lookup(InternalSession.class)
+                                           .getService(svc);
+                               } catch (ComponentLookupException e) {
+                                   throw new RuntimeException("Unable to lookup service " + svc.getName());
+                               }
+                           });
+                       }
+                   }
+               }
+           } catch (Exception e) {
+               throw new RuntimeException("Unable to bind session services", e);
+           }
+
+        */
+
+        Path basedirPath = Paths.get(getBasedir());
+
+        InjectMojo mojo = AnnotationSupport.findAnnotation(context.getElement().get(), InjectMojo.class)
+                .orElse(null);
+        Model defaultModel = Model.newBuilder()
+                .groupId("myGroupId")
+                .artifactId("myArtifactId")
+                .version("1.0-SNAPSHOT")
+                .packaging("jar")
+                .build(Build.newBuilder()
+                        .directory(basedirPath.resolve("target").toString())
+                        .outputDirectory(basedirPath.resolve("target/classes").toString())
+                        .sourceDirectory(basedirPath.resolve("src/main/java").toString())
+                        .testSourceDirectory(
+                                basedirPath.resolve("src/test/java").toString())
+                        .testOutputDirectory(
+                                basedirPath.resolve("target/test-classes").toString())
+                        .build())
+                .build();
+        Path[] modelPath = new Path[] {null};
+        Model tmodel = null;
+        if (mojo != null) {
+            String pom = mojo.pom();
+            if (pom != null && !pom.isEmpty()) {
+                try (Reader r = openPomUrl(context.getRequiredTestClass(), pom, modelPath)) {
+                    tmodel = new MavenStaxReader().read(r);
+                }
+            } else {
+                Path pomPath = basedirPath.resolve("pom.xml");
+                if (Files.exists(pomPath)) {
+                    try (Reader r = Files.newBufferedReader(pomPath)) {
+                        tmodel = new MavenStaxReader().read(r);
+                        modelPath[0] = pomPath;
+                    }
+                }
+            }
+        }
+        Model model;
+        if (tmodel == null) {
+            model = defaultModel;
+        } else {
+            model = new MavenMerger().merge(tmodel, defaultModel, false, null);
+        }
+        tmodel = new DefaultModelPathTranslator(new DefaultPathTranslator())
+                .alignToBaseDirectory(tmodel, Paths.get(getBasedir()), null);
+        context.getStore(ExtensionContext.Namespace.GLOBAL).put(Model.class, tmodel);
 
+        // mojo execution
+        // Map<Object, Object> map = getInjector().getContext().getContextData();
+        PluginDescriptor pluginDescriptor;
         ClassLoader classLoader = context.getRequiredTestClass().getClassLoader();
-        try (InputStream is = Objects.requireNonNull(
+        try (InputStream is = requireNonNull(
                         classLoader.getResourceAsStream(getPluginDescriptorLocation()),
                         "Unable to find plugin descriptor: " + getPluginDescriptorLocation());
-                Reader reader = new BufferedReader(new XmlStreamReader(is));
-                InterpolationFilterReader interpolationReader = new InterpolationFilterReader(reader, map, "${", "}")) {
+                Reader reader = new BufferedReader(new XmlStreamReader(is))) {
+            // new InterpolationFilterReader(reader, map, "${", "}");
+            pluginDescriptor = new PluginDescriptorStaxReader().read(reader);
+        }
+        context.getStore(ExtensionContext.Namespace.GLOBAL).put(PluginDescriptor.class, pluginDescriptor);
+        // for (ComponentDescriptor<?> desc : pluginDescriptor.getComponents()) {
+        //    getContainer().addComponentDescriptor(desc);
+        // }
+
+        @SuppressWarnings({"unused", "MagicNumber"})
+        class Foo {
+
+            @Provides
+            @Singleton
+            @Priority(-10)
+            private InternalSession createSession() {
+                return SessionStub.getMockSession(getBasedir());
+            }
+
+            @Provides
+            @Singleton
+            @Priority(-10)
+            private Project createProject(InternalSession s) {
+                ProjectStub stub = new ProjectStub();
+                if (!"pom".equals(model.getPackaging())) {
+                    ArtifactStub artifact = new ArtifactStub(
+                            model.getGroupId(), model.getArtifactId(), "", model.getVersion(), model.getPackaging());
+                    stub.setMainArtifact(artifact);
+                }
+                stub.setModel(model);
+                stub.setBasedir(Paths.get(MojoExtension.getBasedir()));
+                stub.setPomPath(modelPath[0]);
+                s.getService(ArtifactManager.class).setPath(stub.getPomArtifact(), modelPath[0]);
+                return stub;
+            }
+
+            @Provides
+            @Singleton
+            @Priority(-10)
+            private MojoExecution createMojoExecution() {
+                MojoExecutionStub mes = new MojoExecutionStub("executionId", null);
+                if (mojo != null) {
+                    String goal = mojo.goal();
+                    int idx = goal.lastIndexOf(':');
+                    if (idx >= 0) {
+                        goal = goal.substring(idx + 1);
+                    }
+                    mes.setGoal(goal);
+                    for (MojoDescriptor md : pluginDescriptor.getMojos()) {
+                        if (goal.equals(md.getGoal())) {
+                            mes.setDescriptor(md);
+                        }
+                    }
+                    requireNonNull(mes.getDescriptor());
+                }
+                PluginStub plugin = new PluginStub();
+                plugin.setDescriptor(pluginDescriptor);
+                mes.setPlugin(plugin);
+                return mes;
+            }
+
+            @Provides
+            @Singleton
+            @Priority(-10)
+            private Log createLog() {
+                return new DefaultLog(LoggerFactory.getLogger("anonymous"));
+            }
 
-            PluginDescriptor pluginDescriptor = new PluginDescriptorBuilder().build(interpolationReader);
+            @Provides
+            static RepositorySystemSupplier newRepositorySystemSupplier() {
+                return new RepositorySystemSupplier();
+            }
+
+            @Provides
+            static RepositorySystem newRepositorySystem(RepositorySystemSupplier repositorySystemSupplier) {
+                return repositorySystemSupplier.getRepositorySystem();
+            }
+
+            @Provides
+            @Priority(10)
+            static RepositoryFactory newRepositoryFactory(Session session) {
+                return session.getService(RepositoryFactory.class);
+            }
+
+            @Provides
+            @Priority(10)
+            static VersionParser newVersionParser(Session session) {
+                return session.getService(VersionParser.class);
+            }
+
+            @Provides
+            @Priority(10)
+            static LocalRepositoryManager newLocalRepositoryManager(Session session) {
+                return session.getService(LocalRepositoryManager.class);
+            }
+
+            @Provides
+            @Priority(10)
+            static ArtifactInstaller newArtifactInstaller(Session session) {
+                return session.getService(ArtifactInstaller.class);
+            }
+
+            @Provides
+            @Priority(10)
+            static ArtifactDeployer newArtifactDeployer(Session session) {
+                return session.getService(ArtifactDeployer.class);
+            }
+
+            @Provides
+            @Priority(10)
+            static ArtifactManager newArtifactManager(Session session) {
+                return session.getService(ArtifactManager.class);
+            }
 
-            context.getStore(ExtensionContext.Namespace.GLOBAL).put(PluginDescriptor.class, pluginDescriptor);
+            @Provides
+            @Priority(10)
+            static ProjectManager newProjectManager(Session session) {
+                return session.getService(ProjectManager.class);
+            }
 
-            for (ComponentDescriptor<?> desc : pluginDescriptor.getComponents()) {
-                getContainer().addComponentDescriptor(desc);
+            @Provides
+            @Priority(10)
+            static ArtifactFactory newArtifactFactory(Session session) {
+                return session.getService(ArtifactFactory.class);
+            }
+
+            @Provides
+            @Priority(10)
+            static ProjectBuilder newProjectBuilder(Session session) {
+                return session.getService(ProjectBuilder.class);
+            }
+
+            @Provides
+            @Priority(10)
+            static ModelXmlFactory newModelXmlFactory(Session session) {
+                return session.getService(ModelXmlFactory.class);
             }
         }
-    }
 
-    protected String getPluginDescriptorLocation() {
-        return "META-INF/maven/plugin.xml";
+        getInjector().bindInstance(Foo.class, new Foo());
+
+        getInjector().injectInstance(context.getRequiredTestInstance());
+
+        //        SessionScope sessionScope = getInjector().getInstance(SessionScope.class);
+        //        sessionScope.enter();
+        //        sessionScope.seed(Session.class, s);
+        //        sessionScope.seed(InternalSession.class, s);
+
+        //        MojoExecutionScope mojoExecutionScope = getInjector().getInstance(MojoExecutionScope.class);
+        //        mojoExecutionScope.enter();
+        //        mojoExecutionScope.seed(Project.class, p);
+        //        mojoExecutionScope.seed(MojoExecution.class, me);
     }
 
-    private Mojo lookupMojo(
-            Class<?> holder,
-            InjectMojo injectMojo,
-            Collection<MojoParameter> mojoParameters,
-            PluginDescriptor descriptor)
-            throws Exception {
-        String goal = injectMojo.goal();
-        String pom = injectMojo.pom();
-        String[] coord = mojoCoordinates(goal);
-        Xpp3Dom pomDom;
+    private Reader openPomUrl(Class<?> holder, String pom, Path[] modelPath) throws IOException {
         if (pom.startsWith("file:")) {
             Path path = Paths.get(getBasedir()).resolve(pom.substring("file:".length()));
-            pomDom = Xpp3DomBuilder.build(ReaderFactory.newXmlReader(path.toFile()));
+            modelPath[0] = path;
+            return Files.newBufferedReader(path);
         } else if (pom.startsWith("classpath:")) {
             URL url = holder.getResource(pom.substring("classpath:".length()));
             if (url == null) {
                 throw new IllegalStateException("Unable to find pom on classpath: " + pom);
             }
-            pomDom = Xpp3DomBuilder.build(ReaderFactory.newXmlReader(url.openStream()));
+            return new XmlStreamReader(url.openStream());
         } else if (pom.contains("<project>")) {
-            pomDom = Xpp3DomBuilder.build(new StringReader(pom));
+            return new StringReader(pom);
         } else {
             Path path = Paths.get(getBasedir()).resolve(pom);
-            pomDom = Xpp3DomBuilder.build(ReaderFactory.newXmlReader(path.toFile()));
-        }
-        XmlNode pluginConfiguration = extractPluginConfiguration(coord[1], pomDom);
-        if (!mojoParameters.isEmpty()) {
-            List<XmlNode> children = mojoParameters.stream()
-                    .map(mp -> new XmlNodeImpl(mp.name(), mp.value()))
-                    .collect(Collectors.toList());
-            XmlNode config = new XmlNodeImpl("configuration", null, null, children, null);
-            pluginConfiguration = XmlNode.merge(config, pluginConfiguration);
+            modelPath[0] = path;
+            return Files.newBufferedReader(path);
         }
-        Mojo mojo = lookupMojo(coord, pluginConfiguration, descriptor);
-        return mojo;
+    }
+
+    protected String getPluginDescriptorLocation() {
+        return "META-INF/maven/plugin.xml";
     }
 
     protected String[] mojoCoordinates(String goal) throws Exception {
         if (goal.matches(".*:.*:.*:.*")) {
             return goal.split(":");
         } else {
-            Path pluginPom = Paths.get(getBasedir(), "pom.xml");
-            Xpp3Dom pluginPomDom = Xpp3DomBuilder.build(ReaderFactory.newXmlReader(pluginPom.toFile()));
+            Path pluginPom = Paths.get(getPluginBasedir(), "pom.xml");
+            Xpp3Dom pluginPomDom = Xpp3DomBuilder.build(Files.newBufferedReader(pluginPom));
             String artifactId = pluginPomDom.getChild("artifactId").getValue();
             String groupId = resolveFromRootThenParent(pluginPomDom, "groupId");
             String version = resolveFromRootThenParent(pluginPomDom, "version");
@@ -217,55 +508,11 @@ public class MojoExtension extends PlexusExtension implements ParameterResolver
         }
     }
 
-    /**
-     * lookup the mojo while we have all the relevent information
-     */
-    protected Mojo lookupMojo(String[] coord, XmlNode pluginConfiguration, PluginDescriptor descriptor)
-            throws Exception {
-        // pluginkey = groupId : artifactId : version : goal
-        Mojo mojo = lookup(Mojo.class, coord[0] + ":" + coord[1] + ":" + coord[2] + ":" + coord[3]);
-        for (MojoDescriptor mojoDescriptor : descriptor.getMojos()) {
-            if (Objects.equals(
-                    mojoDescriptor.getImplementation(), mojo.getClass().getName())) {
-                if (pluginConfiguration != null) {
-                    pluginConfiguration = finalizeConfig(pluginConfiguration, mojoDescriptor);
-                }
-            }
-        }
-        if (pluginConfiguration != null) {
-            Session session = getContainer().lookup(Session.class);
-            Project project;
-            try {
-                project = getContainer().lookup(Project.class);
-            } catch (ComponentLookupException e) {
-                project = null;
-            }
-            org.apache.maven.plugin.MojoExecution mojoExecution;
-            try {
-                MojoExecution me = getContainer().lookup(MojoExecution.class);
-                mojoExecution = new org.apache.maven.plugin.MojoExecution(
-                        new org.apache.maven.model.Plugin(me.getPlugin()), me.getGoal(), me.getExecutionId());
-            } catch (ComponentLookupException e) {
-                mojoExecution = null;
-            }
-            ExpressionEvaluator evaluator = new WrapEvaluator(
-                    getContainer(), new PluginParameterExpressionEvaluatorV4(session, project, mojoExecution));
-            ComponentConfigurator configurator = new EnhancedComponentConfigurator();
-            configurator.configureComponent(
-                    mojo,
-                    new XmlPlexusConfiguration(new Xpp3Dom(pluginConfiguration)),
-                    evaluator,
-                    getContainer().getContainerRealm());
-        }
-
-        return mojo;
-    }
-
     private XmlNode finalizeConfig(XmlNode config, MojoDescriptor mojoDescriptor) {
         List<XmlNode> children = new ArrayList<>();
         if (mojoDescriptor != null && mojoDescriptor.getParameters() != null) {
-            XmlNode defaultConfiguration =
-                    MojoDescriptorCreator.convert(mojoDescriptor).getDom();
+            XmlNode defaultConfiguration;
+            defaultConfiguration = MojoDescriptorCreator.convert(mojoDescriptor);
             for (Parameter parameter : mojoDescriptor.getParameters()) {
                 XmlNode parameterConfiguration = config.getChild(parameter.getName());
                 if (parameterConfiguration == null) {
@@ -275,10 +522,10 @@ public class MojoExtension extends PlexusExtension implements ParameterResolver
                 parameterConfiguration = XmlNode.merge(parameterConfiguration, parameterDefaults, Boolean.TRUE);
                 if (parameterConfiguration != null) {
                     Map<String, String> attributes = new HashMap<>(parameterConfiguration.getAttributes());
-                    if (isEmpty(parameterConfiguration.getAttribute("implementation"))
-                            && !isEmpty(parameter.getImplementation())) {
-                        attributes.put("implementation", parameter.getImplementation());
-                    }
+                    // if (isEmpty(parameterConfiguration.getAttribute("implementation"))
+                    //         && !isEmpty(parameter.getImplementation())) {
+                    //     attributes.put("implementation", parameter.getImplementation());
+                    // }
                     parameterConfiguration = new XmlNodeImpl(
                             parameter.getName(),
                             parameterConfiguration.getValue(),
@@ -380,18 +627,18 @@ public class MojoExtension extends PlexusExtension implements ParameterResolver
     public static void setVariableValueToObject(Object object, String variable, Object value)
             throws IllegalAccessException {
         Field field = ReflectionUtils.getFieldByNameIncludingSuperclasses(variable, object.getClass());
-        Objects.requireNonNull(field, "Field " + variable + " not found");
+        requireNonNull(field, "Field " + variable + " not found");
         field.setAccessible(true);
         field.set(object, value);
     }
 
     static class WrapEvaluator implements TypeAwareExpressionEvaluator {
 
-        private final PlexusContainer container;
+        private final Injector injector;
         private final TypeAwareExpressionEvaluator evaluator;
 
-        WrapEvaluator(PlexusContainer container, TypeAwareExpressionEvaluator evaluator) {
-            this.container = container;
+        WrapEvaluator(Injector injector, TypeAwareExpressionEvaluator evaluator) {
+            this.injector = injector;
             this.evaluator = evaluator;
         }
 
@@ -407,8 +654,8 @@ public class MojoExtension extends PlexusExtension implements ParameterResolver
                 String expr = stripTokens(expression);
                 if (expr != null) {
                     try {
-                        value = container.lookup(type, expr);
-                    } catch (ComponentLookupException e) {
+                        value = injector.getInstance(Key.of(type, expr));
+                    } catch (DIException e) {
                         // nothing
                     }
                 }
@@ -428,4 +675,35 @@ public class MojoExtension extends PlexusExtension implements ParameterResolver
             return evaluator.alignToBaseDirectory(path);
         }
     }
+
+    /*
+    private Scope getScopeInstanceOrNull(final Injector injector, final Binding<?> binding) {
+        return binding.acceptScopingVisitor(new DefaultBindingScopingVisitor<Scope>() {
+
+            @Override
+            public Scope visitScopeAnnotation(Class<? extends Annotation> scopeAnnotation) {
+                throw new RuntimeException(String.format(
+                        "I don't know how to handle the scopeAnnotation: %s", scopeAnnotation.getCanonicalName()));
+            }
+
+            @Override
+            public Scope visitNoScoping() {
+                if (binding instanceof LinkedKeyBinding) {
+                    Binding<?> childBinding = injector.getBinding(((LinkedKeyBinding) binding).getLinkedKey());
+                    return getScopeInstanceOrNull(injector, childBinding);
+                }
+                return null;
+            }
+
+            @Override
+            public Scope visitEagerSingleton() {
+                return Scopes.SINGLETON;
+            }
+
+            public Scope visitScope(Scope scope) {
+                return scope;
+            }
+        });
+    }*/
+
 }
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoParameter.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoParameter.java
index 2a28f48..8c37804 100644
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoParameter.java
+++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoParameter.java
@@ -18,6 +18,7 @@
  */
 package org.apache.maven.api.plugin.testing;
 
+import java.lang.annotation.Inherited;
 import java.lang.annotation.Repeatable;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
@@ -27,6 +28,7 @@ import java.lang.annotation.RetentionPolicy;
  */
 @Retention(RetentionPolicy.RUNTIME)
 @Repeatable(MojoParameters.class)
+@Inherited
 public @interface MojoParameter {
     String name();
 
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoParameters.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoParameters.java
index 434abe1..373c926 100644
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoParameters.java
+++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoParameters.java
@@ -18,6 +18,7 @@
  */
 package org.apache.maven.api.plugin.testing;
 
+import java.lang.annotation.Inherited;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 
@@ -25,6 +26,7 @@ import java.lang.annotation.RetentionPolicy;
  * Mojo parameters container
  */
 @Retention(RetentionPolicy.RUNTIME)
+@Inherited
 public @interface MojoParameters {
     MojoParameter[] value();
 }
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/ResolverExpressionEvaluatorStub.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/ResolverExpressionEvaluatorStub.java
index 4461071..1ca785d 100644
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/ResolverExpressionEvaluatorStub.java
+++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/ResolverExpressionEvaluatorStub.java
@@ -21,11 +21,9 @@ package org.apache.maven.api.plugin.testing;
 import java.io.File;
 import java.util.Map;
 
-import org.codehaus.plexus.PlexusTestCase;
 import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException;
 import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator;
 import org.codehaus.plexus.component.configurator.expression.TypeAwareExpressionEvaluator;
-import org.codehaus.plexus.testing.PlexusExtension;
 import org.eclipse.aether.repository.LocalRepository;
 
 /**
@@ -81,14 +79,14 @@ public class ResolverExpressionEvaluatorStub implements TypeAwareExpressionEvalu
             return expression.contains("$$") ? expression.replaceAll("\\$\\$", "\\$") : expression;
         } else {
             if ("basedir".equals(expression) || "project.basedir".equals(expression)) {
-                value = PlexusExtension.getBasedir();
+                value = MojoExtension.getBasedir();
             } else if (expression.startsWith("basedir") || expression.startsWith("project.basedir")) {
                 int pathSeparator = expression.indexOf("/");
                 if (pathSeparator > 0) {
-                    value = PlexusTestCase.getBasedir() + expression.substring(pathSeparator);
+                    value = MojoExtension.getBasedir() + expression.substring(pathSeparator);
                 }
             } else if ("localRepository".equals(expression)) {
-                File localRepo = new File(PlexusTestCase.getBasedir(), "target/local-repo");
+                File localRepo = new File(MojoExtension.getBasedir(), "target/local-repo");
                 return new LocalRepository("file://" + localRepo.getAbsolutePath());
             }
             if (value == null && properties != null && properties.containsKey(expression)) {
@@ -109,12 +107,12 @@ public class ResolverExpressionEvaluatorStub implements TypeAwareExpressionEvalu
     /** {@inheritDoc} */
     @Override
     public File alignToBaseDirectory(File file) {
-        if (file.getAbsolutePath().startsWith(PlexusExtension.getBasedir())) {
+        if (file.getAbsolutePath().startsWith(MojoExtension.getBasedir())) {
             return file;
         } else if (file.isAbsolute()) {
             return file;
         } else {
-            return new File(PlexusExtension.getBasedir(), file.getPath());
+            return new File(MojoExtension.getBasedir(), file.getPath());
         }
     }
 }
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/ArtifactStub.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/ArtifactStub.java
index 59be14f..b9b6416 100644
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/ArtifactStub.java
+++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/ArtifactStub.java
@@ -23,9 +23,11 @@ import java.util.Objects;
 import org.apache.maven.api.Artifact;
 import org.apache.maven.api.ArtifactCoordinate;
 import org.apache.maven.api.Version;
-import org.apache.maven.api.VersionRange;
+import org.apache.maven.api.VersionConstraint;
 import org.apache.maven.api.annotations.Nonnull;
 import org.apache.maven.internal.impl.DefaultVersionParser;
+import org.apache.maven.repository.internal.DefaultModelVersionParser;
+import org.eclipse.aether.util.version.GenericVersionScheme;
 
 /**
  *
@@ -35,6 +37,7 @@ public class ArtifactStub implements Artifact {
     private String artifactId;
     private String classifier;
     private String version;
+    private String baseVersion;
     private String extension;
 
     public ArtifactStub() {
@@ -86,13 +89,21 @@ public class ArtifactStub implements Artifact {
     @Nonnull
     @Override
     public Version getVersion() {
-        return new DefaultVersionParser().parseVersion(version);
+        return getParser().parseVersion(version);
     }
 
     public void setVersion(String version) {
         this.version = version;
     }
 
+    public Version getBaseVersion() {
+        return getParser().parseVersion(baseVersion != null ? baseVersion : version);
+    }
+
+    public void setBaseVersion(String baseVersion) {
+        this.baseVersion = baseVersion;
+    }
+
     @Nonnull
     @Override
     public String getExtension() {
@@ -127,8 +138,8 @@ public class ArtifactStub implements Artifact {
             }
 
             @Override
-            public VersionRange getVersion() {
-                return new DefaultVersionParser().parseVersionRange(version);
+            public VersionConstraint getVersion() {
+                return getParser().parseVersionConstraint(version);
             }
 
             @Override
@@ -169,4 +180,8 @@ public class ArtifactStub implements Artifact {
     public int hashCode() {
         return Objects.hash(groupId, artifactId, classifier, version, extension);
     }
+
+    private static DefaultVersionParser getParser() {
+        return new DefaultVersionParser(new DefaultModelVersionParser(new GenericVersionScheme()));
+    }
 }
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/MojoExecutionStub.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/MojoExecutionStub.java
index a2d2b5b..2619b75 100644
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/MojoExecutionStub.java
+++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/MojoExecutionStub.java
@@ -21,24 +21,28 @@ package org.apache.maven.api.plugin.testing.stubs;
 import java.util.Optional;
 
 import org.apache.maven.api.MojoExecution;
-import org.apache.maven.api.model.Plugin;
+import org.apache.maven.api.Plugin;
+import org.apache.maven.api.model.PluginExecution;
+import org.apache.maven.api.plugin.descriptor.MojoDescriptor;
 import org.apache.maven.api.xml.XmlNode;
 
 /**
  * Stub for {@link MojoExecution}.
  */
 public class MojoExecutionStub implements MojoExecution {
-    private final String artifactId;
-    private final String executionId;
-    private final String goal;
-    private final XmlNode dom;
+    private String executionId;
+    private String goal;
+    private XmlNode dom;
+    private Plugin plugin = new PluginStub();
+    private PluginExecution model;
+    private MojoDescriptor descriptor;
+    private String lifecyclePhase;
 
-    public MojoExecutionStub(String artifactId, String executionId, String goal) {
-        this(artifactId, executionId, goal, null);
+    public MojoExecutionStub(String executionId, String goal) {
+        this(executionId, goal, null);
     }
 
-    public MojoExecutionStub(String artifactId, String executionId, String goal, XmlNode dom) {
-        this.artifactId = artifactId;
+    public MojoExecutionStub(String executionId, String goal, XmlNode dom) {
         this.executionId = executionId;
         this.goal = goal;
         this.dom = dom;
@@ -46,7 +50,22 @@ public class MojoExecutionStub implements MojoExecution {
 
     @Override
     public Plugin getPlugin() {
-        return Plugin.newBuilder().artifactId(artifactId).build();
+        return plugin;
+    }
+
+    @Override
+    public PluginExecution getModel() {
+        return model;
+    }
+
+    @Override
+    public MojoDescriptor getDescriptor() {
+        return descriptor;
+    }
+
+    @Override
+    public String getLifecyclePhase() {
+        return lifecyclePhase;
     }
 
     @Override
@@ -63,4 +82,32 @@ public class MojoExecutionStub implements MojoExecution {
     public Optional<XmlNode> getConfiguration() {
         return Optional.ofNullable(dom);
     }
+
+    public void setExecutionId(String executionId) {
+        this.executionId = executionId;
+    }
+
+    public void setGoal(String goal) {
+        this.goal = goal;
+    }
+
+    public void setDom(XmlNode dom) {
+        this.dom = dom;
+    }
+
+    public void setPlugin(Plugin plugin) {
+        this.plugin = plugin;
+    }
+
+    public void setModel(PluginExecution model) {
+        this.model = model;
+    }
+
+    public void setDescriptor(MojoDescriptor descriptor) {
+        this.descriptor = descriptor;
+    }
+
+    public void setLifecyclePhase(String lifecyclePhase) {
+        this.lifecyclePhase = lifecyclePhase;
+    }
 }
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/PluginStub.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/PluginStub.java
new file mode 100644
index 0000000..b7b4cfc
--- /dev/null
+++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/PluginStub.java
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.api.plugin.testing.stubs;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.maven.api.Artifact;
+import org.apache.maven.api.Dependency;
+import org.apache.maven.api.Plugin;
+import org.apache.maven.api.plugin.descriptor.PluginDescriptor;
+import org.apache.maven.api.plugin.descriptor.lifecycle.Lifecycle;
+
+public class PluginStub implements Plugin {
+
+    org.apache.maven.api.model.Plugin model;
+    PluginDescriptor descriptor;
+    List<Lifecycle> lifecycles = Collections.emptyList();
+    ClassLoader classLoader;
+    Artifact artifact;
+    List<Dependency> dependencies = Collections.emptyList();
+    Map<String, Dependency> dependenciesMap = Collections.emptyMap();
+
+    @Override
+    public org.apache.maven.api.model.Plugin getModel() {
+        return model;
+    }
+
+    public void setModel(org.apache.maven.api.model.Plugin model) {
+        this.model = model;
+    }
+
+    @Override
+    public PluginDescriptor getDescriptor() {
+        return descriptor;
+    }
+
+    public void setDescriptor(PluginDescriptor descriptor) {
+        this.descriptor = descriptor;
+    }
+
+    @Override
+    public List<Lifecycle> getLifecycles() {
+        return lifecycles;
+    }
+
+    public void setLifecycles(List<Lifecycle> lifecycles) {
+        this.lifecycles = lifecycles;
+    }
+
+    @Override
+    public ClassLoader getClassLoader() {
+        return classLoader;
+    }
+
+    public void setClassLoader(ClassLoader classLoader) {
+        this.classLoader = classLoader;
+    }
+
+    @Override
+    public Artifact getArtifact() {
+        return artifact;
+    }
+
+    public void setArtifact(Artifact artifact) {
+        this.artifact = artifact;
+    }
+
+    @Override
+    public List<Dependency> getDependencies() {
+        return dependencies;
+    }
+
+    public void setDependencies(List<Dependency> dependencies) {
+        this.dependencies = dependencies;
+    }
+
+    public Map<String, Dependency> getDependenciesMap() {
+        return dependenciesMap;
+    }
+
+    public void setDependenciesMap(Map<String, Dependency> dependenciesMap) {
+        this.dependenciesMap = dependenciesMap;
+    }
+}
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/ProjectStub.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/ProjectStub.java
index b3624cf..450cd1a 100644
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/ProjectStub.java
+++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/ProjectStub.java
@@ -18,18 +18,16 @@
  */
 package org.apache.maven.api.plugin.testing.stubs;
 
-import java.io.File;
 import java.nio.file.Path;
-import java.util.Collections;
-import java.util.List;
-import java.util.Optional;
-
-import org.apache.maven.api.Artifact;
-import org.apache.maven.api.DependencyCoordinate;
-import org.apache.maven.api.Project;
-import org.apache.maven.api.RemoteRepository;
+import java.util.*;
+
+import org.apache.maven.api.*;
 import org.apache.maven.api.annotations.Nonnull;
 import org.apache.maven.api.model.Model;
+import org.apache.maven.api.model.PluginContainer;
+import org.apache.maven.internal.impl.DefaultVersionParser;
+import org.apache.maven.repository.internal.DefaultModelVersionParser;
+import org.eclipse.aether.util.version.GenericVersionScheme;
 
 /**
  * @author Olivier Lamy
@@ -40,10 +38,11 @@ public class ProjectStub implements Project {
 
     private Model model = Model.newInstance();
     private Path basedir;
-    private File pomPath;
+    private Path pomPath;
     private boolean topProject;
-    private Artifact artifact;
     private Path rootDirectory;
+    private Map<String, String> properties = new HashMap<>();
+    private Artifact mainArtifact;
 
     public void setModel(Model model) {
         this.model = model;
@@ -73,14 +72,59 @@ public class ProjectStub implements Project {
 
     @Nonnull
     @Override
-    public String getPackaging() {
-        return model.getPackaging();
+    public Packaging getPackaging() {
+        return new Packaging() {
+            @Override
+            public String id() {
+                return model.getPackaging();
+            }
+
+            @Override
+            public Type type() {
+                return new Type() {
+                    @Override
+                    public String id() {
+                        return model.getPackaging();
+                    }
+
+                    @Override
+                    public Language getLanguage() {
+                        return null;
+                    }
+
+                    @Override
+                    public String getExtension() {
+                        return model.getPackaging();
+                    }
+
+                    @Override
+                    public String getClassifier() {
+                        return "";
+                    }
+
+                    @Override
+                    public boolean isIncludesDependencies() {
+                        return false;
+                    }
+
+                    @Override
+                    public Set<PathType> getPathTypes() {
+                        return Set.of();
+                    }
+                };
+            }
+
+            @Override
+            public Map<String, PluginContainer> plugins() {
+                return Map.of();
+            }
+        };
     }
 
-    @Nonnull
     @Override
-    public Artifact getArtifact() {
-        return artifact;
+    public List<Artifact> getArtifacts() {
+        Artifact pomArtifact = new ArtifactStub(getGroupId(), getArtifactId(), "", getVersion(), "pom");
+        return mainArtifact != null ? Arrays.asList(pomArtifact, mainArtifact) : Arrays.asList(pomArtifact);
     }
 
     @Nonnull
@@ -91,8 +135,8 @@ public class ProjectStub implements Project {
 
     @Nonnull
     @Override
-    public Optional<Path> getPomPath() {
-        return Optional.ofNullable(pomPath).map(File::toPath);
+    public Path getPomPath() {
+        return pomPath;
     }
 
     @Nonnull
@@ -108,34 +152,19 @@ public class ProjectStub implements Project {
     }
 
     @Override
-    public Optional<Path> getBasedir() {
-        return Optional.ofNullable(basedir);
+    public Path getBasedir() {
+        return basedir;
     }
 
     public void setBasedir(Path basedir) {
         this.basedir = basedir;
     }
 
-    @Override
-    public boolean isExecutionRoot() {
-        return isTopProject();
-    }
-
     @Override
     public Optional<Project> getParent() {
         return Optional.empty();
     }
 
-    @Override
-    public List<RemoteRepository> getRemoteProjectRepositories() {
-        return Collections.emptyList();
-    }
-
-    @Override
-    public List<RemoteRepository> getRemotePluginRepositories() {
-        return Collections.emptyList();
-    }
-
     @Override
     public boolean isTopProject() {
         return topProject;
@@ -171,11 +200,11 @@ public class ProjectStub implements Project {
         model = model.withPackaging(packaging);
     }
 
-    public void setArtifact(Artifact artifact) {
-        this.artifact = artifact;
+    public void setMainArtifact(Artifact mainArtifact) {
+        this.mainArtifact = mainArtifact;
     }
 
-    public void setPomPath(File pomPath) {
+    public void setPomPath(Path pomPath) {
         this.pomPath = pomPath;
     }
 
@@ -190,4 +219,51 @@ public class ProjectStub implements Project {
     public void setRootDirectory(Path rootDirectory) {
         this.rootDirectory = rootDirectory;
     }
+
+    public void addProperty(String key, String value) {
+        properties.put(key, value);
+    }
+
+    class ProjectArtifact implements Artifact {
+        @Override
+        public String getGroupId() {
+            return ProjectStub.this.getGroupId();
+        }
+
+        @Override
+        public String getArtifactId() {
+            return ProjectStub.this.getArtifactId();
+        }
+
+        @Override
+        public Version getVersion() {
+            return new DefaultVersionParser(new DefaultModelVersionParser(new GenericVersionScheme()))
+                    .parseVersion(ProjectStub.this.getVersion());
+        }
+
+        @Override
+        public Version getBaseVersion() {
+            return null;
+        }
+
+        @Override
+        public String getClassifier() {
+            return "";
+        }
+
+        @Override
+        public String getExtension() {
+            return "pom";
+        }
+
+        @Override
+        public boolean isSnapshot() {
+            return false;
+        }
+
+        @Override
+        public ArtifactCoordinate toCoordinate() {
+            return null;
+        }
+    }
 }
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/RepositorySystemSupplier.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/RepositorySystemSupplier.java
new file mode 100644
index 0000000..0e709b3
--- /dev/null
+++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/RepositorySystemSupplier.java
@@ -0,0 +1,1069 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.api.plugin.testing.stubs;
+
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.function.Supplier;
+
+import org.apache.maven.api.services.ModelBuilder;
+import org.apache.maven.internal.impl.DefaultModelUrlNormalizer;
+import org.apache.maven.internal.impl.DefaultModelVersionParser;
+import org.apache.maven.internal.impl.DefaultModelXmlFactory;
+import org.apache.maven.internal.impl.DefaultPluginConfigurationExpander;
+import org.apache.maven.internal.impl.DefaultSuperPomProvider;
+import org.apache.maven.internal.impl.DefaultUrlNormalizer;
+import org.apache.maven.internal.impl.model.BuildModelTransformer;
+import org.apache.maven.internal.impl.model.DefaultDependencyManagementImporter;
+import org.apache.maven.internal.impl.model.DefaultDependencyManagementInjector;
+import org.apache.maven.internal.impl.model.DefaultInheritanceAssembler;
+import org.apache.maven.internal.impl.model.DefaultModelBuilder;
+import org.apache.maven.internal.impl.model.DefaultModelInterpolator;
+import org.apache.maven.internal.impl.model.DefaultModelNormalizer;
+import org.apache.maven.internal.impl.model.DefaultModelPathTranslator;
+import org.apache.maven.internal.impl.model.DefaultModelProcessor;
+import org.apache.maven.internal.impl.model.DefaultModelValidator;
+import org.apache.maven.internal.impl.model.DefaultModelVersionProcessor;
+import org.apache.maven.internal.impl.model.DefaultPathTranslator;
+import org.apache.maven.internal.impl.model.DefaultPluginManagementInjector;
+import org.apache.maven.internal.impl.model.DefaultProfileInjector;
+import org.apache.maven.internal.impl.model.DefaultProfileSelector;
+import org.apache.maven.internal.impl.model.DefaultRootLocator;
+import org.apache.maven.internal.impl.model.ProfileActivationFilePathInterpolator;
+import org.apache.maven.internal.impl.resolver.DefaultArtifactDescriptorReader;
+import org.apache.maven.internal.impl.resolver.DefaultVersionRangeResolver;
+import org.apache.maven.internal.impl.resolver.DefaultVersionResolver;
+import org.apache.maven.internal.impl.resolver.MavenArtifactRelocationSource;
+import org.apache.maven.internal.impl.resolver.PluginsMetadataGeneratorFactory;
+import org.apache.maven.internal.impl.resolver.SnapshotMetadataGeneratorFactory;
+import org.apache.maven.internal.impl.resolver.VersionsMetadataGeneratorFactory;
+import org.apache.maven.internal.impl.resolver.relocation.DistributionManagementArtifactRelocationSource;
+import org.apache.maven.internal.impl.resolver.relocation.UserPropertiesArtifactRelocationSource;
+import org.eclipse.aether.RepositoryListener;
+import org.eclipse.aether.RepositorySystem;
+import org.eclipse.aether.connector.basic.BasicRepositoryConnectorFactory;
+import org.eclipse.aether.impl.ArtifactDescriptorReader;
+import org.eclipse.aether.impl.ArtifactResolver;
+import org.eclipse.aether.impl.DependencyCollector;
+import org.eclipse.aether.impl.Deployer;
+import org.eclipse.aether.impl.Installer;
+import org.eclipse.aether.impl.LocalRepositoryProvider;
+import org.eclipse.aether.impl.MetadataGeneratorFactory;
+import org.eclipse.aether.impl.MetadataResolver;
+import org.eclipse.aether.impl.OfflineController;
+import org.eclipse.aether.impl.RemoteRepositoryFilterManager;
+import org.eclipse.aether.impl.RemoteRepositoryManager;
+import org.eclipse.aether.impl.RepositoryConnectorProvider;
+import org.eclipse.aether.impl.RepositoryEventDispatcher;
+import org.eclipse.aether.impl.RepositorySystemLifecycle;
+import org.eclipse.aether.impl.UpdateCheckManager;
+import org.eclipse.aether.impl.UpdatePolicyAnalyzer;
+import org.eclipse.aether.impl.VersionRangeResolver;
+import org.eclipse.aether.impl.VersionResolver;
+import org.eclipse.aether.internal.impl.*;
+import org.eclipse.aether.internal.impl.checksum.DefaultChecksumAlgorithmFactorySelector;
+import org.eclipse.aether.internal.impl.checksum.Md5ChecksumAlgorithmFactory;
+import org.eclipse.aether.internal.impl.checksum.Sha1ChecksumAlgorithmFactory;
+import org.eclipse.aether.internal.impl.checksum.Sha256ChecksumAlgorithmFactory;
+import org.eclipse.aether.internal.impl.checksum.Sha512ChecksumAlgorithmFactory;
+import org.eclipse.aether.internal.impl.checksum.SparseDirectoryTrustedChecksumsSource;
+import org.eclipse.aether.internal.impl.checksum.SummaryFileTrustedChecksumsSource;
+import org.eclipse.aether.internal.impl.checksum.TrustedToProvidedChecksumsSourceAdapter;
+import org.eclipse.aether.internal.impl.collect.DefaultDependencyCollector;
+import org.eclipse.aether.internal.impl.collect.DependencyCollectorDelegate;
+import org.eclipse.aether.internal.impl.collect.bf.BfDependencyCollector;
+import org.eclipse.aether.internal.impl.collect.df.DfDependencyCollector;
+import org.eclipse.aether.internal.impl.filter.DefaultRemoteRepositoryFilterManager;
+import org.eclipse.aether.internal.impl.filter.GroupIdRemoteRepositoryFilterSource;
+import org.eclipse.aether.internal.impl.filter.PrefixesRemoteRepositoryFilterSource;
+import org.eclipse.aether.internal.impl.resolution.TrustedChecksumsArtifactResolverPostProcessor;
+import org.eclipse.aether.internal.impl.synccontext.DefaultSyncContextFactory;
+import org.eclipse.aether.internal.impl.synccontext.named.NameMapper;
+import org.eclipse.aether.internal.impl.synccontext.named.NameMappers;
+import org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapterFactory;
+import org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapterFactoryImpl;
+import org.eclipse.aether.internal.impl.transport.http.DefaultChecksumExtractor;
+import org.eclipse.aether.internal.impl.transport.http.Nx2ChecksumExtractor;
+import org.eclipse.aether.internal.impl.transport.http.XChecksumExtractor;
+import org.eclipse.aether.named.NamedLockFactory;
+import org.eclipse.aether.named.providers.FileLockNamedLockFactory;
+import org.eclipse.aether.named.providers.LocalReadWriteLockNamedLockFactory;
+import org.eclipse.aether.named.providers.LocalSemaphoreNamedLockFactory;
+import org.eclipse.aether.named.providers.NoopNamedLockFactory;
+import org.eclipse.aether.spi.artifact.ArtifactPredicateFactory;
+import org.eclipse.aether.spi.artifact.decorator.ArtifactDecoratorFactory;
+import org.eclipse.aether.spi.artifact.generator.ArtifactGeneratorFactory;
+import org.eclipse.aether.spi.checksums.ProvidedChecksumsSource;
+import org.eclipse.aether.spi.checksums.TrustedChecksumsSource;
+import org.eclipse.aether.spi.connector.RepositoryConnectorFactory;
+import org.eclipse.aether.spi.connector.checksum.ChecksumAlgorithmFactory;
+import org.eclipse.aether.spi.connector.checksum.ChecksumAlgorithmFactorySelector;
+import org.eclipse.aether.spi.connector.checksum.ChecksumPolicyProvider;
+import org.eclipse.aether.spi.connector.filter.RemoteRepositoryFilterSource;
+import org.eclipse.aether.spi.connector.layout.RepositoryLayoutFactory;
+import org.eclipse.aether.spi.connector.layout.RepositoryLayoutProvider;
+import org.eclipse.aether.spi.connector.transport.TransporterFactory;
+import org.eclipse.aether.spi.connector.transport.TransporterProvider;
+import org.eclipse.aether.spi.connector.transport.http.ChecksumExtractor;
+import org.eclipse.aether.spi.connector.transport.http.ChecksumExtractorStrategy;
+import org.eclipse.aether.spi.io.ChecksumProcessor;
+import org.eclipse.aether.spi.io.PathProcessor;
+import org.eclipse.aether.spi.localrepo.LocalRepositoryManagerFactory;
+import org.eclipse.aether.spi.resolution.ArtifactResolverPostProcessor;
+import org.eclipse.aether.spi.synccontext.SyncContextFactory;
+import org.eclipse.aether.transport.apache.ApacheTransporterFactory;
+import org.eclipse.aether.transport.file.FileTransporterFactory;
+import org.eclipse.aether.util.version.GenericVersionScheme;
+import org.eclipse.aether.version.VersionScheme;
+
+/**
+ * A simple memorizing {@link Supplier} of {@link RepositorySystem} instance, that on first call
+ * supplies lazily constructed instance, and on each subsequent call same instance. Hence, this instance should be
+ * thrown away immediately once repository system was created and there is no need for more instances. If new
+ * repository system instance needed, new instance of this class must be created. For proper shut down of returned
+ * repository system instance(s) use {@link RepositorySystem#shutdown()} method on supplied instance(s).
+ * <p>
+ * Since Resolver 2.0 this class offers access to various components via public getters, and allows even partial object
+ * graph construction.
+ * <p>
+ * Extend this class {@code createXXX()} methods and override to customize, if needed. The contract of this class makes
+ * sure that these (potentially overridden) methods are invoked only once, and instance created by those methods are
+ * memorized and kept as long as supplier instance is kept open.
+ * <p>
+ * This class is not thread safe and must be used from one thread only, while the constructed {@link RepositorySystem}
+ * is thread safe.
+ * <p>
+ * Important: Given the instance of supplier memorizes the supplier {@link RepositorySystem} instance it supplies,
+ * their lifecycle is shared as well: once supplied repository system is shut-down, this instance becomes closed as
+ * well. Any subsequent {@code getXXX} method invocation attempt will fail with {@link IllegalStateException}.
+ */
+public class RepositorySystemSupplier implements Supplier<RepositorySystem> {
+    private final AtomicBoolean closed = new AtomicBoolean(false);
+
+    public RepositorySystemSupplier() {}
+
+    private void checkClosed() {
+        if (closed.get()) {
+            throw new IllegalStateException("Supplier is closed");
+        }
+    }
+
+    private PathProcessor pathProcessor;
+
+    public final PathProcessor getPathProcessor() {
+        checkClosed();
+        if (pathProcessor == null) {
+            pathProcessor = createPathProcessor();
+        }
+        return pathProcessor;
+    }
+
+    protected PathProcessor createPathProcessor() {
+        return new DefaultPathProcessor();
+    }
+
+    private ChecksumProcessor checksumProcessor;
+
+    public final ChecksumProcessor getChecksumProcessor() {
+        checkClosed();
+        if (checksumProcessor == null) {
+            checksumProcessor = createChecksumProcessor();
+        }
+        return checksumProcessor;
+    }
+
+    protected ChecksumProcessor createChecksumProcessor() {
+        return new DefaultChecksumProcessor(getPathProcessor());
+    }
+
+    private TrackingFileManager trackingFileManager;
+
+    public final TrackingFileManager getTrackingFileManager() {
+        checkClosed();
+        if (trackingFileManager == null) {
+            trackingFileManager = createTrackingFileManager();
+        }
+        return trackingFileManager;
+    }
+
+    protected TrackingFileManager createTrackingFileManager() {
+        return new DefaultTrackingFileManager();
+    }
+
+    private LocalPathComposer localPathComposer;
+
+    public final LocalPathComposer getLocalPathComposer() {
+        checkClosed();
+        if (localPathComposer == null) {
+            localPathComposer = createLocalPathComposer();
+        }
+        return localPathComposer;
+    }
+
+    protected LocalPathComposer createLocalPathComposer() {
+        return new DefaultLocalPathComposer();
+    }
+
+    private LocalPathPrefixComposerFactory localPathPrefixComposerFactory;
+
+    public final LocalPathPrefixComposerFactory getLocalPathPrefixComposerFactory() {
+        checkClosed();
+        if (localPathPrefixComposerFactory == null) {
+            localPathPrefixComposerFactory = createLocalPathPrefixComposerFactory();
+        }
+        return localPathPrefixComposerFactory;
+    }
+
+    protected LocalPathPrefixComposerFactory createLocalPathPrefixComposerFactory() {
+        return new DefaultLocalPathPrefixComposerFactory();
+    }
+
+    private RepositorySystemLifecycle repositorySystemLifecycle;
+
+    public final RepositorySystemLifecycle getRepositorySystemLifecycle() {
+        checkClosed();
+        if (repositorySystemLifecycle == null) {
+            repositorySystemLifecycle = createRepositorySystemLifecycle();
+            repositorySystemLifecycle.addOnSystemEndedHandler(() -> closed.set(true));
+        }
+        return repositorySystemLifecycle;
+    }
+
+    protected RepositorySystemLifecycle createRepositorySystemLifecycle() {
+        return new DefaultRepositorySystemLifecycle();
+    }
+
+    private OfflineController offlineController;
+
+    public final OfflineController getOfflineController() {
+        checkClosed();
+        if (offlineController == null) {
+            offlineController = createOfflineController();
+        }
+        return offlineController;
+    }
+
+    protected OfflineController createOfflineController() {
+        return new DefaultOfflineController();
+    }
+
+    private UpdatePolicyAnalyzer updatePolicyAnalyzer;
+
+    public final UpdatePolicyAnalyzer getUpdatePolicyAnalyzer() {
+        checkClosed();
+        if (updatePolicyAnalyzer == null) {
+            updatePolicyAnalyzer = createUpdatePolicyAnalyzer();
+        }
+        return updatePolicyAnalyzer;
+    }
+
+    protected UpdatePolicyAnalyzer createUpdatePolicyAnalyzer() {
+        return new DefaultUpdatePolicyAnalyzer();
+    }
+
+    private ChecksumPolicyProvider checksumPolicyProvider;
+
+    public final ChecksumPolicyProvider getChecksumPolicyProvider() {
+        checkClosed();
+        if (checksumPolicyProvider == null) {
+            checksumPolicyProvider = createChecksumPolicyProvider();
+        }
+        return checksumPolicyProvider;
+    }
+
+    protected ChecksumPolicyProvider createChecksumPolicyProvider() {
+        return new DefaultChecksumPolicyProvider();
+    }
+
+    private UpdateCheckManager updateCheckManager;
+
+    public final UpdateCheckManager getUpdateCheckManager() {
+        checkClosed();
+        if (updateCheckManager == null) {
+            updateCheckManager = createUpdateCheckManager();
+        }
+        return updateCheckManager;
+    }
+
+    protected UpdateCheckManager createUpdateCheckManager() {
+        return new DefaultUpdateCheckManager(getTrackingFileManager(), getUpdatePolicyAnalyzer(), getPathProcessor());
+    }
+
+    private Map<String, NamedLockFactory> namedLockFactories;
+
+    public final Map<String, NamedLockFactory> getNamedLockFactories() {
+        checkClosed();
+        if (namedLockFactories == null) {
+            namedLockFactories = createNamedLockFactories();
+        }
+        return namedLockFactories;
+    }
+
+    protected Map<String, NamedLockFactory> createNamedLockFactories() {
+        HashMap<String, NamedLockFactory> result = new HashMap<>();
+        result.put(NoopNamedLockFactory.NAME, new NoopNamedLockFactory());
+        result.put(LocalReadWriteLockNamedLockFactory.NAME, new LocalReadWriteLockNamedLockFactory());
+        result.put(LocalSemaphoreNamedLockFactory.NAME, new LocalSemaphoreNamedLockFactory());
+        result.put(FileLockNamedLockFactory.NAME, new FileLockNamedLockFactory());
+        return result;
+    }
+
+    private Map<String, NameMapper> nameMappers;
+
+    public final Map<String, NameMapper> getNameMappers() {
+        checkClosed();
+        if (nameMappers == null) {
+            nameMappers = createNameMappers();
+        }
+        return nameMappers;
+    }
+
+    protected Map<String, NameMapper> createNameMappers() {
+        HashMap<String, NameMapper> result = new HashMap<>();
+        result.put(NameMappers.STATIC_NAME, NameMappers.staticNameMapper());
+        result.put(NameMappers.GAV_NAME, NameMappers.gavNameMapper());
+        result.put(NameMappers.DISCRIMINATING_NAME, NameMappers.discriminatingNameMapper());
+        result.put(NameMappers.FILE_GAV_NAME, NameMappers.fileGavNameMapper());
+        result.put(NameMappers.FILE_HGAV_NAME, NameMappers.fileHashingGavNameMapper());
+        return result;
+    }
+
+    private NamedLockFactoryAdapterFactory namedLockFactoryAdapterFactory;
+
+    public final NamedLockFactoryAdapterFactory getNamedLockFactoryAdapterFactory() {
+        checkClosed();
+        if (namedLockFactoryAdapterFactory == null) {
+            namedLockFactoryAdapterFactory = createNamedLockFactoryAdapterFactory();
+        }
+        return namedLockFactoryAdapterFactory;
+    }
+
+    protected NamedLockFactoryAdapterFactory createNamedLockFactoryAdapterFactory() {
+        return new NamedLockFactoryAdapterFactoryImpl(
+                getNamedLockFactories(), getNameMappers(), getRepositorySystemLifecycle());
+    }
+
+    private SyncContextFactory syncContextFactory;
+
+    public final SyncContextFactory getSyncContextFactory() {
+        checkClosed();
+        if (syncContextFactory == null) {
+            syncContextFactory = createSyncContextFactory();
+        }
+        return syncContextFactory;
+    }
+
+    protected SyncContextFactory createSyncContextFactory() {
+        return new DefaultSyncContextFactory(getNamedLockFactoryAdapterFactory());
+    }
+
+    private Map<String, ChecksumAlgorithmFactory> checksumAlgorithmFactories;
+
+    public final Map<String, ChecksumAlgorithmFactory> getChecksumAlgorithmFactories() {
+        checkClosed();
+        if (checksumAlgorithmFactories == null) {
+            checksumAlgorithmFactories = createChecksumAlgorithmFactories();
+        }
+        return checksumAlgorithmFactories;
+    }
+
+    protected Map<String, ChecksumAlgorithmFactory> createChecksumAlgorithmFactories() {
+        HashMap<String, ChecksumAlgorithmFactory> result = new HashMap<>();
+        result.put(Sha512ChecksumAlgorithmFactory.NAME, new Sha512ChecksumAlgorithmFactory());
+        result.put(Sha256ChecksumAlgorithmFactory.NAME, new Sha256ChecksumAlgorithmFactory());
+        result.put(Sha1ChecksumAlgorithmFactory.NAME, new Sha1ChecksumAlgorithmFactory());
+        result.put(Md5ChecksumAlgorithmFactory.NAME, new Md5ChecksumAlgorithmFactory());
+        return result;
+    }
+
+    private ChecksumAlgorithmFactorySelector checksumAlgorithmFactorySelector;
+
+    public final ChecksumAlgorithmFactorySelector getChecksumAlgorithmFactorySelector() {
+        checkClosed();
+        if (checksumAlgorithmFactorySelector == null) {
+            checksumAlgorithmFactorySelector = createChecksumAlgorithmFactorySelector();
+        }
+        return checksumAlgorithmFactorySelector;
+    }
+
+    protected ChecksumAlgorithmFactorySelector createChecksumAlgorithmFactorySelector() {
+        return new DefaultChecksumAlgorithmFactorySelector(getChecksumAlgorithmFactories());
+    }
+
+    private ArtifactPredicateFactory artifactPredicateFactory;
+
+    public final ArtifactPredicateFactory getArtifactPredicateFactory() {
+        checkClosed();
+        if (artifactPredicateFactory == null) {
+            artifactPredicateFactory = createArtifactPredicateFactory();
+        }
+        return artifactPredicateFactory;
+    }
+
+    protected ArtifactPredicateFactory createArtifactPredicateFactory() {
+        return new DefaultArtifactPredicateFactory(getChecksumAlgorithmFactorySelector());
+    }
+
+    private Map<String, RepositoryLayoutFactory> repositoryLayoutFactories;
+
+    public final Map<String, RepositoryLayoutFactory> getRepositoryLayoutFactories() {
+        checkClosed();
+        if (repositoryLayoutFactories == null) {
+            repositoryLayoutFactories = createRepositoryLayoutFactories();
+        }
+        return repositoryLayoutFactories;
+    }
+
+    protected Map<String, RepositoryLayoutFactory> createRepositoryLayoutFactories() {
+        HashMap<String, RepositoryLayoutFactory> result = new HashMap<>();
+        result.put(
+                Maven2RepositoryLayoutFactory.NAME,
+                new Maven2RepositoryLayoutFactory(
+                        getChecksumAlgorithmFactorySelector(), getArtifactPredicateFactory()));
+        return result;
+    }
+
+    private RepositoryLayoutProvider repositoryLayoutProvider;
+
+    public final RepositoryLayoutProvider getRepositoryLayoutProvider() {
+        checkClosed();
+        if (repositoryLayoutProvider == null) {
+            repositoryLayoutProvider = createRepositoryLayoutProvider();
+        }
+        return repositoryLayoutProvider;
+    }
+
+    protected RepositoryLayoutProvider createRepositoryLayoutProvider() {
+        return new DefaultRepositoryLayoutProvider(getRepositoryLayoutFactories());
+    }
+
+    private LocalRepositoryProvider localRepositoryProvider;
+
+    public final LocalRepositoryProvider getLocalRepositoryProvider() {
+        checkClosed();
+        if (localRepositoryProvider == null) {
+            localRepositoryProvider = createLocalRepositoryProvider();
+        }
+        return localRepositoryProvider;
+    }
+
+    protected LocalRepositoryProvider createLocalRepositoryProvider() {
+        LocalPathComposer localPathComposer = getLocalPathComposer();
+        HashMap<String, LocalRepositoryManagerFactory> localRepositoryProviders = new HashMap<>(2);
+        localRepositoryProviders.put(
+                SimpleLocalRepositoryManagerFactory.NAME, new SimpleLocalRepositoryManagerFactory(localPathComposer));
+        localRepositoryProviders.put(
+                EnhancedLocalRepositoryManagerFactory.NAME,
+                new EnhancedLocalRepositoryManagerFactory(
+                        localPathComposer, getTrackingFileManager(), getLocalPathPrefixComposerFactory()));
+        return new DefaultLocalRepositoryProvider(localRepositoryProviders);
+    }
+
+    private RemoteRepositoryManager remoteRepositoryManager;
+
+    public final RemoteRepositoryManager getRemoteRepositoryManager() {
+        checkClosed();
+        if (remoteRepositoryManager == null) {
+            remoteRepositoryManager = createRemoteRepositoryManager();
+        }
+        return remoteRepositoryManager;
+    }
+
+    protected RemoteRepositoryManager createRemoteRepositoryManager() {
+        return new DefaultRemoteRepositoryManager(getUpdatePolicyAnalyzer(), getChecksumPolicyProvider());
+    }
+
+    private Map<String, RemoteRepositoryFilterSource> remoteRepositoryFilterSources;
+
+    public final Map<String, RemoteRepositoryFilterSource> getRemoteRepositoryFilterSources() {
+        checkClosed();
+        if (remoteRepositoryFilterSources == null) {
+            remoteRepositoryFilterSources = createRemoteRepositoryFilterSources();
+        }
+        return remoteRepositoryFilterSources;
+    }
+
+    protected Map<String, RemoteRepositoryFilterSource> createRemoteRepositoryFilterSources() {
+        HashMap<String, RemoteRepositoryFilterSource> result = new HashMap<>();
+        result.put(
+                GroupIdRemoteRepositoryFilterSource.NAME,
+                new GroupIdRemoteRepositoryFilterSource(getRepositorySystemLifecycle()));
+        result.put(
+                PrefixesRemoteRepositoryFilterSource.NAME,
+                new PrefixesRemoteRepositoryFilterSource(getRepositoryLayoutProvider()));
+        return result;
+    }
+
+    private RemoteRepositoryFilterManager remoteRepositoryFilterManager;
+
+    public final RemoteRepositoryFilterManager getRemoteRepositoryFilterManager() {
+        checkClosed();
+        if (remoteRepositoryFilterManager == null) {
+            remoteRepositoryFilterManager = createRemoteRepositoryFilterManager();
+        }
+        return remoteRepositoryFilterManager;
+    }
+
+    protected RemoteRepositoryFilterManager createRemoteRepositoryFilterManager() {
+        return new DefaultRemoteRepositoryFilterManager(getRemoteRepositoryFilterSources());
+    }
+
+    private Map<String, RepositoryListener> repositoryListeners;
+
+    public final Map<String, RepositoryListener> getRepositoryListeners() {
+        checkClosed();
+        if (repositoryListeners == null) {
+            repositoryListeners = createRepositoryListeners();
+        }
+        return repositoryListeners;
+    }
+
+    protected Map<String, RepositoryListener> createRepositoryListeners() {
+        return new HashMap<>();
+    }
+
+    private RepositoryEventDispatcher repositoryEventDispatcher;
+
+    public final RepositoryEventDispatcher getRepositoryEventDispatcher() {
+        checkClosed();
+        if (repositoryEventDispatcher == null) {
+            repositoryEventDispatcher = createRepositoryEventDispatcher();
+        }
+        return repositoryEventDispatcher;
+    }
+
+    protected RepositoryEventDispatcher createRepositoryEventDispatcher() {
+        return new DefaultRepositoryEventDispatcher(getRepositoryListeners());
+    }
+
+    private Map<String, TrustedChecksumsSource> trustedChecksumsSources;
+
+    public final Map<String, TrustedChecksumsSource> getTrustedChecksumsSources() {
+        checkClosed();
+        if (trustedChecksumsSources == null) {
+            trustedChecksumsSources = createTrustedChecksumsSources();
+        }
+        return trustedChecksumsSources;
+    }
+
+    protected Map<String, TrustedChecksumsSource> createTrustedChecksumsSources() {
+        HashMap<String, TrustedChecksumsSource> result = new HashMap<>();
+        result.put(
+                SparseDirectoryTrustedChecksumsSource.NAME,
+                new SparseDirectoryTrustedChecksumsSource(getChecksumProcessor(), getLocalPathComposer()));
+        result.put(
+                SummaryFileTrustedChecksumsSource.NAME,
+                new SummaryFileTrustedChecksumsSource(getLocalPathComposer(), getRepositorySystemLifecycle()));
+        return result;
+    }
+
+    private Map<String, ProvidedChecksumsSource> providedChecksumsSources;
+
+    public final Map<String, ProvidedChecksumsSource> getProvidedChecksumsSources() {
+        checkClosed();
+        if (providedChecksumsSources == null) {
+            providedChecksumsSources = createProvidedChecksumsSources();
+        }
+        return providedChecksumsSources;
+    }
+
+    protected Map<String, ProvidedChecksumsSource> createProvidedChecksumsSources() {
+        HashMap<String, ProvidedChecksumsSource> result = new HashMap<>();
+        result.put(
+                TrustedToProvidedChecksumsSourceAdapter.NAME,
+                new TrustedToProvidedChecksumsSourceAdapter(getTrustedChecksumsSources()));
+        return result;
+    }
+
+    private Map<String, ChecksumExtractorStrategy> checksumExtractorStrategies;
+
+    public final Map<String, ChecksumExtractorStrategy> getChecksumExtractorStrategies() {
+        checkClosed();
+        if (checksumExtractorStrategies == null) {
+            checksumExtractorStrategies = createChecksumExtractorStrategies();
+        }
+        return checksumExtractorStrategies;
+    }
+
+    protected Map<String, ChecksumExtractorStrategy> createChecksumExtractorStrategies() {
+        HashMap<String, ChecksumExtractorStrategy> result = new HashMap<>();
+        result.put(XChecksumExtractor.NAME, new XChecksumExtractor());
+        result.put(Nx2ChecksumExtractor.NAME, new Nx2ChecksumExtractor());
+        return result;
+    }
+
+    private ChecksumExtractor checksumExtractor;
+
+    public final ChecksumExtractor getChecksumExtractor() {
+        checkClosed();
+        if (checksumExtractor == null) {
+            checksumExtractor = createChecksumExtractor();
+        }
+        return checksumExtractor;
+    }
+
+    protected ChecksumExtractor createChecksumExtractor() {
+        return new DefaultChecksumExtractor(getChecksumExtractorStrategies());
+    }
+
+    private Map<String, TransporterFactory> transporterFactories;
+
+    public final Map<String, TransporterFactory> getTransporterFactories() {
+        checkClosed();
+        if (transporterFactories == null) {
+            transporterFactories = createTransporterFactories();
+        }
+        return transporterFactories;
+    }
+
+    protected Map<String, TransporterFactory> createTransporterFactories() {
+        HashMap<String, TransporterFactory> result = new HashMap<>();
+        result.put(FileTransporterFactory.NAME, new FileTransporterFactory());
+        result.put(
+                ApacheTransporterFactory.NAME,
+                new ApacheTransporterFactory(getChecksumExtractor(), getPathProcessor()));
+        return result;
+    }
+
+    private TransporterProvider transporterProvider;
+
+    public final TransporterProvider getTransporterProvider() {
+        checkClosed();
+        if (transporterProvider == null) {
+            transporterProvider = createTransporterProvider();
+        }
+        return transporterProvider;
+    }
+
+    protected TransporterProvider createTransporterProvider() {
+        return new DefaultTransporterProvider(getTransporterFactories());
+    }
+
+    private BasicRepositoryConnectorFactory basicRepositoryConnectorFactory;
+
+    public final BasicRepositoryConnectorFactory getBasicRepositoryConnectorFactory() {
+        checkClosed();
+        if (basicRepositoryConnectorFactory == null) {
+            basicRepositoryConnectorFactory = createBasicRepositoryConnectorFactory();
+        }
+        return basicRepositoryConnectorFactory;
+    }
+
+    protected BasicRepositoryConnectorFactory createBasicRepositoryConnectorFactory() {
+        return new BasicRepositoryConnectorFactory(
+                getTransporterProvider(),
+                getRepositoryLayoutProvider(),
+                getChecksumPolicyProvider(),
+                getChecksumProcessor(),
+                getProvidedChecksumsSources());
+    }
+
+    private Map<String, RepositoryConnectorFactory> repositoryConnectorFactories;
+
+    public final Map<String, RepositoryConnectorFactory> getRepositoryConnectorFactories() {
+        checkClosed();
+        if (repositoryConnectorFactories == null) {
+            repositoryConnectorFactories = createRepositoryConnectorFactories();
+        }
+        return repositoryConnectorFactories;
+    }
+
+    protected Map<String, RepositoryConnectorFactory> createRepositoryConnectorFactories() {
+        HashMap<String, RepositoryConnectorFactory> result = new HashMap<>();
+        result.put(BasicRepositoryConnectorFactory.NAME, getBasicRepositoryConnectorFactory());
+        return result;
+    }
+
+    private RepositoryConnectorProvider repositoryConnectorProvider;
+
+    public final RepositoryConnectorProvider getRepositoryConnectorProvider() {
+        checkClosed();
+        if (repositoryConnectorProvider == null) {
+            repositoryConnectorProvider = createRepositoryConnectorProvider();
+        }
+        return repositoryConnectorProvider;
+    }
+
+    protected RepositoryConnectorProvider createRepositoryConnectorProvider() {
+        return new DefaultRepositoryConnectorProvider(
+                getRepositoryConnectorFactories(), getRemoteRepositoryFilterManager());
+    }
+
+    private Installer installer;
+
+    public final Installer getInstaller() {
+        checkClosed();
+        if (installer == null) {
+            installer = createInstaller();
+        }
+        return installer;
+    }
+
+    protected Installer createInstaller() {
+        return new DefaultInstaller(
+                getPathProcessor(),
+                getRepositoryEventDispatcher(),
+                getArtifactGeneratorFactories(),
+                getMetadataGeneratorFactories(),
+                getSyncContextFactory());
+    }
+
+    private Deployer deployer;
+
+    public final Deployer getDeployer() {
+        checkClosed();
+        if (deployer == null) {
+            deployer = createDeployer();
+        }
+        return deployer;
+    }
+
+    protected Deployer createDeployer() {
+        return new DefaultDeployer(
+                getPathProcessor(),
+                getRepositoryEventDispatcher(),
+                getRepositoryConnectorProvider(),
+                getRemoteRepositoryManager(),
+                getUpdateCheckManager(),
+                getArtifactGeneratorFactories(),
+                getMetadataGeneratorFactories(),
+                getSyncContextFactory(),
+                getOfflineController());
+    }
+
+    private Map<String, DependencyCollectorDelegate> dependencyCollectorDelegates;
+
+    public final Map<String, DependencyCollectorDelegate> getDependencyCollectorDelegates() {
+        checkClosed();
+        if (dependencyCollectorDelegates == null) {
+            dependencyCollectorDelegates = createDependencyCollectorDelegates();
+        }
+        return dependencyCollectorDelegates;
+    }
+
+    protected Map<String, DependencyCollectorDelegate> createDependencyCollectorDelegates() {
+        RemoteRepositoryManager remoteRepositoryManager = getRemoteRepositoryManager();
+        ArtifactDescriptorReader artifactDescriptorReader = getArtifactDescriptorReader();
+        VersionRangeResolver versionRangeResolver = getVersionRangeResolver();
+        HashMap<String, DependencyCollectorDelegate> result = new HashMap<>();
+        result.put(
+                DfDependencyCollector.NAME,
+                new DfDependencyCollector(
+                        remoteRepositoryManager,
+                        artifactDescriptorReader,
+                        versionRangeResolver,
+                        getArtifactDecoratorFactories()));
+        result.put(
+                BfDependencyCollector.NAME,
+                new BfDependencyCollector(
+                        remoteRepositoryManager,
+                        artifactDescriptorReader,
+                        versionRangeResolver,
+                        getArtifactDecoratorFactories()));
+        return result;
+    }
+
+    private DependencyCollector dependencyCollector;
+
+    public final DependencyCollector getDependencyCollector() {
+        checkClosed();
+        if (dependencyCollector == null) {
+            dependencyCollector = createDependencyCollector();
+        }
+        return dependencyCollector;
+    }
+
+    protected DependencyCollector createDependencyCollector() {
+        return new DefaultDependencyCollector(getDependencyCollectorDelegates());
+    }
+
+    private Map<String, ArtifactResolverPostProcessor> artifactResolverPostProcessors;
+
+    public final Map<String, ArtifactResolverPostProcessor> getArtifactResolverPostProcessors() {
+        checkClosed();
+        if (artifactResolverPostProcessors == null) {
+            artifactResolverPostProcessors = createArtifactResolverPostProcessors();
+        }
+        return artifactResolverPostProcessors;
+    }
+
+    protected Map<String, ArtifactResolverPostProcessor> createArtifactResolverPostProcessors() {
+        HashMap<String, ArtifactResolverPostProcessor> result = new HashMap<>();
+        result.put(
+                TrustedChecksumsArtifactResolverPostProcessor.NAME,
+                new TrustedChecksumsArtifactResolverPostProcessor(
+                        getChecksumAlgorithmFactorySelector(), getTrustedChecksumsSources()));
+        return result;
+    }
+
+    private ArtifactResolver artifactResolver;
+
+    public final ArtifactResolver getArtifactResolver() {
+        checkClosed();
+        if (artifactResolver == null) {
+            artifactResolver = createArtifactResolver();
+        }
+        return artifactResolver;
+    }
+
+    protected ArtifactResolver createArtifactResolver() {
+        return new DefaultArtifactResolver(
+                getPathProcessor(),
+                getRepositoryEventDispatcher(),
+                getVersionResolver(),
+                getUpdateCheckManager(),
+                getRepositoryConnectorProvider(),
+                getRemoteRepositoryManager(),
+                getSyncContextFactory(),
+                getOfflineController(),
+                getArtifactResolverPostProcessors(),
+                getRemoteRepositoryFilterManager());
+    }
+
+    private MetadataResolver metadataResolver;
+
+    public final MetadataResolver getMetadataResolver() {
+        checkClosed();
+        if (metadataResolver == null) {
+            metadataResolver = createMetadataResolver();
+        }
+        return metadataResolver;
+    }
+
+    protected MetadataResolver createMetadataResolver() {
+        return new DefaultMetadataResolver(
+                getRepositoryEventDispatcher(),
+                getUpdateCheckManager(),
+                getRepositoryConnectorProvider(),
+                getRemoteRepositoryManager(),
+                getSyncContextFactory(),
+                getOfflineController(),
+                getRemoteRepositoryFilterManager(),
+                getPathProcessor());
+    }
+
+    private VersionScheme versionScheme;
+
+    public final VersionScheme getVersionScheme() {
+        checkClosed();
+        if (versionScheme == null) {
+            versionScheme = createVersionScheme();
+        }
+        return versionScheme;
+    }
+
+    protected VersionScheme createVersionScheme() {
+        return new GenericVersionScheme();
+    }
+
+    private Map<String, ArtifactGeneratorFactory> artifactGeneratorFactories;
+
+    public final Map<String, ArtifactGeneratorFactory> getArtifactGeneratorFactories() {
+        checkClosed();
+        if (artifactGeneratorFactories == null) {
+            artifactGeneratorFactories = createArtifactGeneratorFactories();
+        }
+        return artifactGeneratorFactories;
+    }
+
+    protected Map<String, ArtifactGeneratorFactory> createArtifactGeneratorFactories() {
+        // by default none, this is extension point
+        return new HashMap<>();
+    }
+
+    private Map<String, ArtifactDecoratorFactory> artifactDecoratorFactories;
+
+    public final Map<String, ArtifactDecoratorFactory> getArtifactDecoratorFactories() {
+        checkClosed();
+        if (artifactDecoratorFactories == null) {
+            artifactDecoratorFactories = createArtifactDecoratorFactories();
+        }
+        return artifactDecoratorFactories;
+    }
+
+    protected Map<String, ArtifactDecoratorFactory> createArtifactDecoratorFactories() {
+        // by default none, this is extension point
+        return new HashMap<>();
+    }
+
+    // Maven provided
+
+    private Map<String, MetadataGeneratorFactory> metadataGeneratorFactories;
+
+    public final Map<String, MetadataGeneratorFactory> getMetadataGeneratorFactories() {
+        checkClosed();
+        if (metadataGeneratorFactories == null) {
+            metadataGeneratorFactories = createMetadataGeneratorFactories();
+        }
+        return metadataGeneratorFactories;
+    }
+
+    protected Map<String, MetadataGeneratorFactory> createMetadataGeneratorFactories() {
+        // from maven-resolver-provider
+        HashMap<String, MetadataGeneratorFactory> result = new HashMap<>();
+        result.put(PluginsMetadataGeneratorFactory.NAME, new PluginsMetadataGeneratorFactory());
+        result.put(VersionsMetadataGeneratorFactory.NAME, new VersionsMetadataGeneratorFactory());
+        result.put(SnapshotMetadataGeneratorFactory.NAME, new SnapshotMetadataGeneratorFactory());
+        return result;
+    }
+
+    private LinkedHashMap<String, MavenArtifactRelocationSource> artifactRelocationSources;
+
+    public final LinkedHashMap<String, MavenArtifactRelocationSource> getMavenArtifactRelocationSources() {
+        checkClosed();
+        if (artifactRelocationSources == null) {
+            artifactRelocationSources = createMavenArtifactRelocationSources();
+        }
+        return artifactRelocationSources;
+    }
+
+    protected LinkedHashMap<String, MavenArtifactRelocationSource> createMavenArtifactRelocationSources() {
+        // from maven-resolver-provider
+        LinkedHashMap<String, MavenArtifactRelocationSource> result = new LinkedHashMap<>();
+        result.put(UserPropertiesArtifactRelocationSource.NAME, new UserPropertiesArtifactRelocationSource());
+        result.put(
+                DistributionManagementArtifactRelocationSource.NAME,
+                new DistributionManagementArtifactRelocationSource());
+        return result;
+    }
+
+    private ArtifactDescriptorReader artifactDescriptorReader;
+
+    public final ArtifactDescriptorReader getArtifactDescriptorReader() {
+        checkClosed();
+        if (artifactDescriptorReader == null) {
+            artifactDescriptorReader = createArtifactDescriptorReader();
+        }
+        return artifactDescriptorReader;
+    }
+
+    protected ArtifactDescriptorReader createArtifactDescriptorReader() {
+        // from maven-resolver-provider
+        return new DefaultArtifactDescriptorReader(
+                getRemoteRepositoryManager(),
+                getVersionResolver(),
+                getVersionRangeResolver(),
+                getArtifactResolver(),
+                getModelBuilder(),
+                getRepositoryEventDispatcher(),
+                getMavenArtifactRelocationSources());
+    }
+
+    private VersionResolver versionResolver;
+
+    public final VersionResolver getVersionResolver() {
+        checkClosed();
+        if (versionResolver == null) {
+            versionResolver = createVersionResolver();
+        }
+        return versionResolver;
+    }
+
+    protected VersionResolver createVersionResolver() {
+        // from maven-resolver-provider
+        return new DefaultVersionResolver(
+                getMetadataResolver(), getSyncContextFactory(), getRepositoryEventDispatcher());
+    }
+
+    private VersionRangeResolver versionRangeResolver;
+
+    public final VersionRangeResolver getVersionRangeResolver() {
+        checkClosed();
+        if (versionRangeResolver == null) {
+            versionRangeResolver = createVersionRangeResolver();
+        }
+        return versionRangeResolver;
+    }
+
+    protected VersionRangeResolver createVersionRangeResolver() {
+        // from maven-resolver-provider
+        return new DefaultVersionRangeResolver(
+                getMetadataResolver(), getSyncContextFactory(), getRepositoryEventDispatcher(), getVersionScheme());
+    }
+
+    private ModelBuilder modelBuilder;
+
+    public final ModelBuilder getModelBuilder() {
+        checkClosed();
+        if (modelBuilder == null) {
+            modelBuilder = createModelBuilder();
+        }
+        return modelBuilder;
+    }
+
+    protected ModelBuilder createModelBuilder() {
+        // from maven-model-builder
+        DefaultModelProcessor modelProcessor = new DefaultModelProcessor(new DefaultModelXmlFactory(), List.of());
+        return new DefaultModelBuilder(
+                modelProcessor,
+                new DefaultModelValidator(new DefaultModelVersionProcessor()),
+                new DefaultModelNormalizer(),
+                new DefaultModelInterpolator(
+                        new DefaultPathTranslator(), new DefaultUrlNormalizer(), new DefaultRootLocator()),
+                new DefaultModelPathTranslator(new DefaultPathTranslator()),
+                new DefaultModelUrlNormalizer(new DefaultUrlNormalizer()),
+                new DefaultSuperPomProvider(modelProcessor),
+                new DefaultInheritanceAssembler(),
+                new DefaultProfileSelector(),
+                new DefaultProfileInjector(),
+                new DefaultPluginManagementInjector(),
+                new DefaultDependencyManagementInjector(),
+                new DefaultDependencyManagementImporter(),
+                (m, r, b) -> m,
+                new DefaultPluginConfigurationExpander(),
+                new ProfileActivationFilePathInterpolator(new DefaultPathTranslator(), new DefaultRootLocator()),
+                new BuildModelTransformer(),
+                new DefaultModelVersionParser(getVersionScheme()));
+    }
+
+    private RepositorySystem repositorySystem;
+
+    public final RepositorySystem getRepositorySystem() {
+        checkClosed();
+        if (repositorySystem == null) {
+            repositorySystem = createRepositorySystem();
+        }
+        return repositorySystem;
+    }
+
+    protected RepositorySystem createRepositorySystem() {
+        return new DefaultRepositorySystem(
+                getVersionResolver(),
+                getVersionRangeResolver(),
+                getArtifactResolver(),
+                getMetadataResolver(),
+                getArtifactDescriptorReader(),
+                getDependencyCollector(),
+                getInstaller(),
+                getDeployer(),
+                getLocalRepositoryProvider(),
+                getSyncContextFactory(),
+                getRemoteRepositoryManager(),
+                getRepositorySystemLifecycle(),
+                getArtifactDecoratorFactories());
+    }
+
+    @Override
+    public RepositorySystem get() {
+        return getRepositorySystem();
+    }
+}
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/SessionStub.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/SessionStub.java
index 2b05567..799587a 100644
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/SessionStub.java
+++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/SessionStub.java
@@ -22,17 +22,22 @@ import java.net.URI;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.Optional;
 import java.util.Properties;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.function.Supplier;
 
 import org.apache.maven.api.Artifact;
 import org.apache.maven.api.LocalRepository;
 import org.apache.maven.api.Project;
 import org.apache.maven.api.RemoteRepository;
 import org.apache.maven.api.Session;
+import org.apache.maven.api.SessionData;
 import org.apache.maven.api.model.Model;
 import org.apache.maven.api.model.Repository;
 import org.apache.maven.api.services.ArtifactDeployer;
@@ -48,9 +53,14 @@ import org.apache.maven.api.services.ProjectBuilderRequest;
 import org.apache.maven.api.services.ProjectBuilderResult;
 import org.apache.maven.api.services.ProjectManager;
 import org.apache.maven.api.services.RepositoryFactory;
+import org.apache.maven.api.services.VersionParser;
 import org.apache.maven.api.services.xml.ModelXmlFactory;
 import org.apache.maven.internal.impl.DefaultModelXmlFactory;
+import org.apache.maven.internal.impl.DefaultVersionParser;
+import org.apache.maven.internal.impl.InternalSession;
 import org.apache.maven.model.v4.MavenStaxReader;
+import org.apache.maven.repository.internal.DefaultModelVersionParser;
+import org.eclipse.aether.util.version.GenericVersionScheme;
 import org.mockito.ArgumentMatchers;
 
 import static org.mockito.ArgumentMatchers.any;
@@ -67,17 +77,27 @@ import static org.mockito.Mockito.withSettings;
  */
 public class SessionStub {
 
-    public static Session getMockSession(String localRepo) {
+    public static InternalSession getMockSession(String localRepo) {
         LocalRepository localRepository = mock(LocalRepository.class);
         when(localRepository.getId()).thenReturn("local");
         when(localRepository.getPath()).thenReturn(Paths.get(localRepo));
         return getMockSession(localRepository);
     }
 
-    public static Session getMockSession(LocalRepository localRepository) {
-        Session session = mock(Session.class);
+    public static InternalSession getMockSession(LocalRepository localRepository) {
+        InternalSession session = mock(InternalSession.class);
 
+        //
+        // RepositoryFactory
+        //
         RepositoryFactory repositoryFactory = mock(RepositoryFactory.class);
+        when(session.createRemoteRepository(anyString(), anyString())).thenAnswer(iom -> {
+            String id = iom.getArgument(0, String.class);
+            String url = iom.getArgument(1, String.class);
+            return session.getService(RepositoryFactory.class).createRemote(id, url);
+        });
+        when(session.createRemoteRepository(any()))
+                .thenAnswer(iom -> repositoryFactory.createRemote(iom.getArgument(0, Repository.class)));
         when(repositoryFactory.createRemote(any(Repository.class))).thenAnswer(iom -> {
             Repository repository = iom.getArgument(0, Repository.class);
             return repositoryFactory.createRemote(repository.getId(), repository.getUrl());
@@ -92,16 +112,56 @@ public class SessionStub {
             when(remoteRepository.getProtocol()).thenReturn(URI.create(url).getScheme());
             return remoteRepository;
         });
+        when(session.getService(RepositoryFactory.class)).thenReturn(repositoryFactory);
+
+        //
+        // VersionParser
+        //
+        VersionParser versionParser =
+                new DefaultVersionParser(new DefaultModelVersionParser(new GenericVersionScheme()));
+        when(session.parseVersion(any()))
+                .thenAnswer(iom -> versionParser.parseVersion(iom.getArgument(0, String.class)));
+        when(session.getService(VersionParser.class)).thenReturn(versionParser);
 
+        //
+        // LocalRepositoryManager
+        //
         LocalRepositoryManager localRepositoryManager = mock(LocalRepositoryManager.class);
+        when(session.getPathForLocalArtifact(any(Artifact.class)))
+                .then(iom -> localRepositoryManager.getPathForLocalArtifact(
+                        session, session.getLocalRepository(), iom.getArgument(0, Artifact.class)));
+        when(session.getPathForRemoteArtifact(any(), any()))
+                .thenAnswer(iom -> localRepositoryManager.getPathForRemoteArtifact(
+                        session,
+                        session.getLocalRepository(),
+                        iom.getArgument(0, RemoteRepository.class),
+                        iom.getArgument(1, Artifact.class)));
         when(localRepositoryManager.getPathForLocalArtifact(any(), any(), any()))
                 .thenAnswer(iom -> {
                     LocalRepository localRepo = iom.getArgument(1, LocalRepository.class);
                     Artifact artifact = iom.getArgument(2, Artifact.class);
                     return localRepo.getPath().resolve(getPathForArtifact(artifact, true));
                 });
+        when(session.getService(LocalRepositoryManager.class)).thenReturn(localRepositoryManager);
 
+        //
+        // ArtifactInstaller
+        //
         ArtifactInstaller artifactInstaller = mock(ArtifactInstaller.class);
+        doAnswer(iom -> {
+                    artifactInstaller.install(
+                            ArtifactInstallerRequest.build(session, iom.getArgument(0, Collection.class)));
+                    return null;
+                })
+                .when(session)
+                .installArtifacts(any(Collection.class));
+        doAnswer(iom -> {
+                    artifactInstaller.install(ArtifactInstallerRequest.build(
+                            session, Arrays.asList(iom.getArgument(0, Artifact[].class))));
+                    return null;
+                })
+                .when(session)
+                .installArtifacts(any(Artifact[].class));
         doAnswer(iom -> {
                     artifactInstaller.install(ArtifactInstallerRequest.build(
                             iom.getArgument(0, Session.class), iom.getArgument(1, Collection.class)));
@@ -109,8 +169,21 @@ public class SessionStub {
                 })
                 .when(artifactInstaller)
                 .install(any(Session.class), ArgumentMatchers.<Collection<Artifact>>any());
+        when(session.getService(ArtifactInstaller.class)).thenReturn(artifactInstaller);
 
+        //
+        // ArtifactDeployer
+        //
         ArtifactDeployer artifactDeployer = mock(ArtifactDeployer.class);
+        doAnswer(iom -> {
+                    artifactDeployer.deploy(ArtifactDeployerRequest.build(
+                            iom.getArgument(0, Session.class),
+                            iom.getArgument(1, RemoteRepository.class),
+                            Arrays.asList(iom.getArgument(2, Artifact[].class))));
+                    return null;
+                })
+                .when(session)
+                .deployArtifact(any(), any());
         doAnswer(iom -> {
                     artifactDeployer.deploy(ArtifactDeployerRequest.build(
                             iom.getArgument(0, Session.class),
@@ -120,7 +193,11 @@ public class SessionStub {
                 })
                 .when(artifactDeployer)
                 .deploy(any(), any(), any());
+        when(session.getService(ArtifactDeployer.class)).thenReturn(artifactDeployer);
 
+        //
+        // ArtifactManager
+        //
         ArtifactManager artifactManager = mock(ArtifactManager.class);
         Map<Artifact, Path> paths = new HashMap<>();
         doAnswer(iom -> {
@@ -132,7 +209,14 @@ public class SessionStub {
         doAnswer(iom -> Optional.ofNullable(paths.get(iom.getArgument(0, Artifact.class))))
                 .when(artifactManager)
                 .getPath(any());
+        doAnswer(iom -> artifactManager.getPath(iom.getArgument(0, Artifact.class)))
+                .when(session)
+                .getArtifactPath(any());
+        when(session.getService(ArtifactManager.class)).thenReturn(artifactManager);
 
+        //
+        // ProjectManager
+        //
         ProjectManager projectManager = mock(ProjectManager.class);
         Map<Project, Collection<Artifact>> attachedArtifacts = new HashMap<>();
         doAnswer(iom -> {
@@ -164,7 +248,18 @@ public class SessionStub {
         when(projectManager.getAttachedArtifacts(any()))
                 .then(iom ->
                         attachedArtifacts.computeIfAbsent(iom.getArgument(0, Project.class), p -> new ArrayList<>()));
+        when(projectManager.getAllArtifacts(any())).then(iom -> {
+            Project project = iom.getArgument(0, Project.class);
+            List<Artifact> result = new ArrayList<>();
+            result.addAll(project.getArtifacts());
+            result.addAll(attachedArtifacts.computeIfAbsent(project, p -> new ArrayList<>()));
+            return result;
+        });
+        when(session.getService(ProjectManager.class)).thenReturn(projectManager);
 
+        //
+        // ArtifactFactory
+        //
         ArtifactFactory artifactFactory = mock(ArtifactFactory.class);
         when(artifactFactory.create(any())).then(iom -> {
             ArtifactFactoryRequest request = iom.getArgument(0, ArtifactFactoryRequest.class);
@@ -180,40 +275,6 @@ public class SessionStub {
             return new ArtifactStub(
                     request.getGroupId(), request.getArtifactId(), classifier, request.getVersion(), extension);
         });
-
-        ProjectBuilder projectBuilder = mock(ProjectBuilder.class);
-        when(projectBuilder.build(any(ProjectBuilderRequest.class))).then(iom -> {
-            ProjectBuilderRequest request = iom.getArgument(0, ProjectBuilderRequest.class);
-            ProjectBuilderResult result = mock(ProjectBuilderResult.class);
-            Model model = new MavenStaxReader().read(request.getSource().get().openStream());
-            ProjectStub projectStub = new ProjectStub();
-            projectStub.setModel(model);
-            ArtifactStub artifactStub = new ArtifactStub(
-                    model.getGroupId(), model.getArtifactId(), "", model.getVersion(), model.getPackaging());
-            projectStub.setArtifact(artifactStub);
-            when(result.getProject()).thenReturn(Optional.of(projectStub));
-            return result;
-        });
-
-        Properties sysProps = new Properties();
-        Properties usrProps = new Properties();
-        doReturn(sysProps).when(session).getSystemProperties();
-        doReturn(usrProps).when(session).getUserProperties();
-
-        when(session.getLocalRepository()).thenReturn(localRepository);
-        when(session.getService(RepositoryFactory.class)).thenReturn(repositoryFactory);
-        when(session.getService(ProjectBuilder.class)).thenReturn(projectBuilder);
-        when(session.getService(LocalRepositoryManager.class)).thenReturn(localRepositoryManager);
-        when(session.getService(ProjectManager.class)).thenReturn(projectManager);
-        when(session.getService(ArtifactManager.class)).thenReturn(artifactManager);
-        when(session.getService(ArtifactInstaller.class)).thenReturn(artifactInstaller);
-        when(session.getService(ArtifactDeployer.class)).thenReturn(artifactDeployer);
-        when(session.getService(ArtifactFactory.class)).thenReturn(artifactFactory);
-        when(session.getService(ModelXmlFactory.class)).thenReturn(new DefaultModelXmlFactory());
-
-        when(session.getPathForLocalArtifact(any(Artifact.class)))
-                .then(iom -> localRepositoryManager.getPathForLocalArtifact(
-                        session, session.getLocalRepository(), iom.getArgument(0, Artifact.class)));
         when(session.createArtifact(any(), any(), any(), any(), any(), any())).thenAnswer(iom -> {
             String groupId = iom.getArgument(0, String.class);
             String artifactId = iom.getArgument(1, String.class);
@@ -246,17 +307,45 @@ public class SessionStub {
                             .extension(extension)
                             .build());
         });
-        when(session.createRemoteRepository(anyString(), anyString())).thenAnswer(iom -> {
-            String id = iom.getArgument(0, String.class);
-            String url = iom.getArgument(1, String.class);
-            return session.getService(RepositoryFactory.class).createRemote(id, url);
+        when(session.getService(ArtifactFactory.class)).thenReturn(artifactFactory);
+
+        //
+        // ProjectBuilder
+        //
+        ProjectBuilder projectBuilder = mock(ProjectBuilder.class);
+        when(projectBuilder.build(any(ProjectBuilderRequest.class))).then(iom -> {
+            ProjectBuilderRequest request = iom.getArgument(0, ProjectBuilderRequest.class);
+            ProjectBuilderResult result = mock(ProjectBuilderResult.class);
+            Model model = new MavenStaxReader().read(request.getSource().get().openStream());
+            ProjectStub projectStub = new ProjectStub();
+            projectStub.setModel(model);
+            ArtifactStub artifactStub = new ArtifactStub(
+                    model.getGroupId(), model.getArtifactId(), "", model.getVersion(), model.getPackaging());
+            if (!"pom".equals(model.getPackaging())) {
+                projectStub.setMainArtifact(artifactStub);
+            }
+            when(result.getProject()).thenReturn(Optional.of(projectStub));
+            return result;
         });
-        doAnswer(iom -> artifactManager.getPath(iom.getArgument(0, Artifact.class)))
-                .when(session)
-                .getArtifactPath(any());
+        when(session.getService(ProjectBuilder.class)).thenReturn(projectBuilder);
+
+        //
+        // ModelXmlFactory
+        //
+        when(session.getService(ModelXmlFactory.class)).thenReturn(new DefaultModelXmlFactory());
 
+        //
+        // Other
+        //
+        Properties sysProps = new Properties();
+        Properties usrProps = new Properties();
+        doReturn(sysProps).when(session).getSystemProperties();
+        doReturn(usrProps).when(session).getUserProperties();
+        when(session.getLocalRepository()).thenReturn(localRepository);
+        when(session.getData()).thenReturn(new TestSessionData());
         when(session.withLocalRepository(any()))
                 .thenAnswer(iom -> getMockSession(iom.getArgument(0, LocalRepository.class)));
+
         return session;
     }
 
@@ -275,4 +364,30 @@ public class SessionStub {
         }
         return path.toString();
     }
+
+    static class TestSessionData implements SessionData {
+        private final Map<Key<?>, Object> map = new ConcurrentHashMap<>();
+
+        @Override
+        public <T> void set(Key<T> key, T value) {
+            map.put(key, value);
+        }
+
+        @Override
+        public <T> boolean replace(Key<T> key, T oldValue, T newValue) {
+            return map.replace(key, oldValue, newValue);
+        }
+
+        @Override
+        @SuppressWarnings("unchecked")
+        public <T> T get(Key<T> key) {
+            return (T) map.get(key);
+        }
+
+        @Override
+        @SuppressWarnings("unchecked")
+        public <T> T computeIfAbsent(Key<T> key, Supplier<T> supplier) {
+            return (T) map.computeIfAbsent(key, k -> supplier.get());
+        }
+    }
 }
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/api/di/testing/SimpleDITest.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/api/di/testing/SimpleDITest.java
new file mode 100644
index 0000000..429a3f5
--- /dev/null
+++ b/maven-plugin-testing-harness/src/test/java/org/apache/maven/api/di/testing/SimpleDITest.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.api.di.testing;
+
+import java.io.File;
+
+import org.apache.maven.api.Session;
+import org.apache.maven.api.di.Inject;
+import org.apache.maven.api.di.Provides;
+import org.apache.maven.api.plugin.testing.stubs.SessionStub;
+import org.junit.jupiter.api.Test;
+
+import static org.apache.maven.api.di.testing.MavenDIExtension.getBasedir;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+@MavenDITest
+public class SimpleDITest {
+
+    private static final String LOCAL_REPO = getBasedir() + File.separator + "target" + File.separator + "local-repo";
+
+    @Inject
+    Session session;
+
+    @Test
+    void testSession() {
+        assertNotNull(session);
+        assertNotNull(session.getLocalRepository());
+    }
+
+    @Provides
+    Session createSession() {
+        return SessionStub.getMockSession(LOCAL_REPO);
+    }
+}
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/api/plugin/testing/ExpressionEvaluatorTest.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/api/plugin/testing/ExpressionEvaluatorTest.java
index b287bbf..51b1ed9 100644
--- a/maven-plugin-testing-harness/src/test/java/org/apache/maven/api/plugin/testing/ExpressionEvaluatorTest.java
+++ b/maven-plugin-testing-harness/src/test/java/org/apache/maven/api/plugin/testing/ExpressionEvaluatorTest.java
@@ -18,14 +18,17 @@
  */
 package org.apache.maven.api.plugin.testing;
 
-import javax.inject.Named;
-
+import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.util.Properties;
 
-import com.google.inject.Provides;
+import org.apache.maven.api.Project;
 import org.apache.maven.api.Session;
+import org.apache.maven.api.di.Named;
+import org.apache.maven.api.di.Provides;
 import org.apache.maven.api.plugin.MojoException;
+import org.apache.maven.api.plugin.annotations.Mojo;
+import org.apache.maven.api.plugin.testing.stubs.ProjectStub;
 import org.apache.maven.api.plugin.testing.stubs.SessionStub;
 import org.junit.jupiter.api.Test;
 
@@ -42,16 +45,18 @@ import static org.mockito.Mockito.doReturn;
 public class ExpressionEvaluatorTest {
 
     private static final String LOCAL_REPO = "target/local-repo/";
-    private static final String ARTIFACT_ID = "maven-test-mojo";
-    private static final String COORDINATES = "groupId:" + ARTIFACT_ID + ":version:goal";
+    private static final String GROUP_ID = "test";
+    private static final String ARTIFACT_ID = "test-plugin";
+    private static final String COORDINATES = GROUP_ID + ":" + ARTIFACT_ID + ":0.0.1-SNAPSHOT:goal";
     private static final String CONFIG = "<project>\n"
             + "    <build>\n"
             + "        <plugins>\n"
             + "            <plugin>\n"
+            + "                <groupId>" + GROUP_ID + "</groupId>\n"
             + "                <artifactId>" + ARTIFACT_ID + "</artifactId>\n"
             + "                <configuration>\n"
-            + "                    <basedir>${basedir}</basedir>\n"
-            + "                    <workdir>${basedir}/workDirectory</workdir>\n"
+            + "                    <basedir>${project.basedir}</basedir>\n"
+            + "                    <workdir>${project.basedir}/workDirectory</workdir>\n"
             + "                </configuration>\n"
             + "            </plugin>\n"
             + "        </plugins>\n"
@@ -68,6 +73,7 @@ public class ExpressionEvaluatorTest {
 
     @Test
     @InjectMojo(goal = COORDINATES, pom = CONFIG)
+    @Basedir("${basedir}/target/test-classes")
     @MojoParameter(name = "param", value = "paramValue")
     public void testParam(ExpressionEvaluatorMojo mojo) {
         assertNotNull(mojo.basedir);
@@ -88,11 +94,12 @@ public class ExpressionEvaluatorTest {
         assertDoesNotThrow(mojo::execute);
     }
 
-    @Named(COORDINATES)
+    @Mojo(name = "goal")
+    @Named("test:test-plugin:0.0.1-SNAPSHOT:goal") // this one is usually generated by maven-plugin-plugin
     public static class ExpressionEvaluatorMojo implements org.apache.maven.api.plugin.Mojo {
-        private String basedir;
+        private Path basedir;
 
-        private String workdir;
+        private Path workdir;
 
         private String param;
 
@@ -101,11 +108,11 @@ public class ExpressionEvaluatorTest {
         /** {@inheritDoc} */
         @Override
         public void execute() throws MojoException {
-            if (basedir == null || basedir.isEmpty()) {
+            if (basedir == null) {
                 throw new MojoException("basedir was not injected.");
             }
 
-            if (workdir == null || workdir.isEmpty()) {
+            if (workdir == null) {
                 throw new MojoException("workdir was not injected.");
             } else if (!workdir.startsWith(basedir)) {
                 throw new MojoException("workdir does not start with basedir.");
@@ -122,4 +129,11 @@ public class ExpressionEvaluatorTest {
         doAnswer(iom -> Paths.get(MojoExtension.getBasedir())).when(session).getRootDirectory();
         return session;
     }
+
+    @Provides
+    Project project() {
+        ProjectStub project = new ProjectStub();
+        project.setBasedir(Paths.get(MojoExtension.getBasedir()));
+        return project;
+    }
 }
diff --git a/.github/workflows/maven-verify.yml b/maven-plugin-testing-harness/src/test/resources/META-INF/maven/org.apache.maven.api.di.Inject
similarity index 74%
copy from .github/workflows/maven-verify.yml
copy to maven-plugin-testing-harness/src/test/resources/META-INF/maven/org.apache.maven.api.di.Inject
index fa7dc4b..2a771d7 100644
--- a/.github/workflows/maven-verify.yml
+++ b/maven-plugin-testing-harness/src/test/resources/META-INF/maven/org.apache.maven.api.di.Inject
@@ -1,3 +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
@@ -6,7 +7,7 @@
 # "License"); you may not use this file except in compliance
 # with the License.  You may obtain a copy of the License at
 #
-#       http://www.apache.org/licenses/LICENSE-2.0
+#   http://www.apache.org/licenses/LICENSE-2.0
 #
 # Unless required by applicable law or agreed to in writing,
 # software distributed under the License is distributed on an
@@ -14,16 +15,5 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-
-name: Verify
-
-on:
-  push:
-  pull_request:
-
-jobs:
-  build:
-    name: Verify
-    uses: apache/maven-gh-actions-shared/.github/workflows/maven-verify.yml@v4
-    with:
-      jdk-matrix: '[ "8", "11", "17" ]'
+#
+org.apache.maven.api.plugin.testing.ExpressionEvaluatorTest$ExpressionEvaluatorMojo
\ No newline at end of file
diff --git a/maven-plugin-testing-harness/src/test/resources/META-INF/maven/plugin.xml b/maven-plugin-testing-harness/src/test/resources/META-INF/maven/plugin.xml
index d442272..6657446 100644
--- a/maven-plugin-testing-harness/src/test/resources/META-INF/maven/plugin.xml
+++ b/maven-plugin-testing-harness/src/test/resources/META-INF/maven/plugin.xml
@@ -20,7 +20,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<plugin>
+<plugin xmlns="http://maven.apache.org/PLUGIN/2.0.0" >
   <name>test-plugin</name>
   <description></description>
   <groupId>test</groupId>
@@ -31,19 +31,31 @@ under the License.
   <inheritedByDefault>true</inheritedByDefault>
   <mojos>
     <mojo>
-      <goal>parameters</goal>
-      <requiresDirectInvocation>false</requiresDirectInvocation>
-      <requiresProject>true</requiresProject>
-      <requiresReports>false</requiresReports>
+      <goal>goal</goal>
+      <projectRequired>true</projectRequired>
       <aggregator>false</aggregator>
-      <requiresOnline>false</requiresOnline>
+      <onlineRequired>false</onlineRequired>
       <inheritedByDefault>true</inheritedByDefault>
       <implementation>org.apache.maven.plugin.testing.ParametersMojo</implementation>
       <language>java</language>
-      <instantiationStrategy>per-lookup</instantiationStrategy>
-      <executionStrategy>once-per-session</executionStrategy>
-      <threadSafe>false</threadSafe>
       <parameters>
+        <parameter>
+          <name>basedir</name>
+          <type>java.nio.file.Path</type>
+        </parameter>
+        <parameter>
+          <name>workdir</name>
+          <type>java.nio.file.Path</type>
+        </parameter>
+        <parameter>
+          <name>param</name>
+          <type>java.lang.String</type>
+        </parameter>
+        <parameter>
+          <name>param2</name>
+          <type>java.lang.String</type>
+        </parameter>
+        <!--
         <parameter>
           <name>plain</name>
           <type>java.lang.String</type>
@@ -57,6 +69,7 @@ under the License.
           <required>false</required>
           <editable>true</editable>
           <description></description>
+          <defaultValue>default</defaultValue>
         </parameter>
         <parameter>
           <name>withProperty</name>
@@ -64,6 +77,7 @@ under the License.
           <required>false</required>
           <editable>true</editable>
           <description></description>
+          <expression>${property}</expression>
         </parameter>
         <parameter>
           <name>withPropertyAndDefault</name>
@@ -71,14 +85,11 @@ under the License.
           <required>false</required>
           <editable>true</editable>
           <description></description>
+          <defaultValue>default</defaultValue>
+          <expression>${property}</expression>
         </parameter>
+        -->
       </parameters>
-      <configuration>
-        <withDefault implementation="java.lang.String" default-value="default"/>
-        <withProperty implementation="java.lang.String">${property}</withProperty>
-        <withPropertyAndDefault implementation="java.lang.String" default-value="default">${property}</withPropertyAndDefault>
-      </configuration>
     </mojo>
   </mojos>
-  <dependencies/>
 </plugin>
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 4cea8e8..6d530ae 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven-parent</artifactId>
-    <version>40</version>
+    <version>42</version>
     <relativePath />
   </parent>
 
@@ -65,9 +65,9 @@ under the License.
 
   <properties>
     <surefire.version>3.2.1</surefire.version>
-    <mavenVersion>4.0.0-alpha-8</mavenVersion>
+    <mavenVersion>4.0.0-beta-3</mavenVersion>
     <maven.site.path>plugin-testing-archives/LATEST</maven.site.path>
-    <javaVersion>8</javaVersion>
+    <javaVersion>17</javaVersion>
     <project.build.outputTimestamp>2023-11-07T21:58:12Z</project.build.outputTimestamp>
   </properties>
 


(maven-plugin-testing) 04/04: Cleanup deps

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit fddd725dd5555cbd113e421e84776cb040712470
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Thu Jun 20 08:49:59 2024 +0200

    Cleanup deps
---
 maven-plugin-testing-harness/pom.xml | 46 ++++++------------------------------
 1 file changed, 7 insertions(+), 39 deletions(-)

diff --git a/maven-plugin-testing-harness/pom.xml b/maven-plugin-testing-harness/pom.xml
index a1d4e4d..420508c 100644
--- a/maven-plugin-testing-harness/pom.xml
+++ b/maven-plugin-testing-harness/pom.xml
@@ -62,18 +62,6 @@ under the License.
       <version>${mavenVersion}</version>
       <scope>provided</scope>
     </dependency>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-model-builder</artifactId>
-      <version>${mavenVersion}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <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-xml-impl</artifactId>
@@ -103,33 +91,7 @@ under the License.
       <version>4.0.3</version>
       <optional>true</optional>
     </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-archiver</artifactId>
-      <version>4.8.0</version>
-    </dependency>
 
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-testing</artifactId>
-      <version>1.3.0</version>
-    </dependency>
-    <dependency>
-      <groupId>com.google.inject</groupId>
-      <artifactId>guice</artifactId>
-      <version>6.0.0</version>
-    </dependency>
-    <dependency>
-      <groupId>org.ow2.asm</groupId>
-      <artifactId>asm</artifactId>
-      <version>9.6</version>
-    </dependency>
-    <dependency>
-      <!-- newer version is required by plexus-testing -->
-      <groupId>com.google.guava</groupId>
-      <artifactId>guava</artifactId>
-      <version>32.0.1-jre</version>
-    </dependency>
     <dependency>
       <groupId>org.junit.jupiter</groupId>
       <artifactId>junit-jupiter-api</artifactId>
@@ -142,8 +104,14 @@ under the License.
     </dependency>
     <dependency>
       <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-simple</artifactId>
+      <artifactId>slf4j-api</artifactId>
       <version>2.0.13</version>
+    </dependency>
+
+    <dependency>
+      <groupId>com.google.inject</groupId>
+      <artifactId>guice</artifactId>
+      <version>6.0.0</version>
       <scope>test</scope>
     </dependency>
   </dependencies>


(maven-plugin-testing) 01/04: [MPLUGINTESTING-94] Remove Maven 3 support classes

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 7878374a79d7e3b5d54079a50eb52829f03cc10f
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Thu May 23 11:54:07 2024 +0200

    [MPLUGINTESTING-94] Remove Maven 3 support classes
---
 .../maven/plugin/testing/AbstractMojoTestCase.java |  723 ----------
 .../maven/plugin/testing/ArtifactStubFactory.java  |  510 -------
 .../plugin/testing/ConfigurationException.java     |   51 -
 .../maven/plugin/testing/MojoLogWrapper.java       |  122 --
 .../maven/plugin/testing/MojoParameters.java       |   34 -
 .../org/apache/maven/plugin/testing/MojoRule.java  |  363 -----
 .../testing/ResolverExpressionEvaluatorStub.java   |  114 --
 .../org/apache/maven/plugin/testing/SilentLog.java |  330 -----
 .../apache/maven/plugin/testing/WithoutMojo.java   |   37 -
 .../maven/plugin/testing/junit5/InjectMojo.java    |   35 -
 .../maven/plugin/testing/junit5/MojoExtension.java |  454 ------
 .../maven/plugin/testing/junit5/MojoParameter.java |   34 -
 .../plugin/testing/junit5/MojoParameters.java      |   30 -
 .../maven/plugin/testing/junit5/MojoTest.java      |   34 -
 .../plugin/testing/resources/TestResources.java    |  170 ---
 .../maven/plugin/testing/stubs/ArtifactStub.java   |  496 -------
 .../testing/stubs/DefaultArtifactHandlerStub.java  |  181 ---
 .../plugin/testing/stubs/MavenProjectStub.java     | 1487 --------------------
 .../testing/stubs/StubArtifactRepository.java      |  241 ----
 .../plugin/testing/ArtifactStubFactoryTest.java    |   43 -
 .../plugin/testing/ExpressionEvaluatorMojo.java    |   53 -
 .../plugin/testing/ExpressionEvaluatorTest.java    |   78 -
 .../apache/maven/plugin/testing/MojoRuleTest.java  |  170 ---
 .../maven/plugin/testing/MojoTestCaseTest.java     |  125 --
 .../maven/plugin/testing/ParametersMojo.java       |   38 -
 .../maven/plugin/testing/ParametersMojoTest.java   |   95 --
 .../plugin/testing/PluginArtifactFileTest.java     |   45 -
 .../apache/maven/plugin/testing/SimpleMojo.java    |   42 -
 .../apache/maven/plugin/testing/TestSilentLog.java |   74 -
 .../maven/plugin/testing/junit5/Junit5Test.java    |   71 -
 .../testing/resources/TestResourcesTest.java       |   30 -
 .../src/test/projects/default/pom.xml              |   48 -
 .../src/test/projects/explicit/pom.xml             |   54 -
 .../src/test/projects/property/pom.xml             |   52 -
 34 files changed, 6464 deletions(-)

diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java
deleted file mode 100644
index c2b2309..0000000
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java
+++ /dev/null
@@ -1,723 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-import java.lang.reflect.AccessibleObject;
-import java.lang.reflect.Field;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import com.google.inject.Module;
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.DefaultArtifact;
-import org.apache.maven.artifact.handler.DefaultArtifactHandler;
-import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
-import org.apache.maven.execution.DefaultMavenExecutionRequest;
-import org.apache.maven.execution.DefaultMavenExecutionResult;
-import org.apache.maven.execution.MavenExecutionRequest;
-import org.apache.maven.execution.MavenExecutionResult;
-import org.apache.maven.execution.MavenSession;
-import org.apache.maven.lifecycle.internal.MojoDescriptorCreator;
-import org.apache.maven.model.Plugin;
-import org.apache.maven.plugin.Mojo;
-import org.apache.maven.plugin.MojoExecution;
-import org.apache.maven.plugin.PluginParameterExpressionEvaluator;
-import org.apache.maven.plugin.descriptor.MojoDescriptor;
-import org.apache.maven.plugin.descriptor.Parameter;
-import org.apache.maven.plugin.descriptor.PluginDescriptor;
-import org.apache.maven.plugin.descriptor.PluginDescriptorBuilder;
-import org.apache.maven.project.MavenProject;
-import org.apache.maven.repository.internal.MavenRepositorySystemUtils;
-import org.codehaus.plexus.ContainerConfiguration;
-import org.codehaus.plexus.DefaultContainerConfiguration;
-import org.codehaus.plexus.DefaultPlexusContainer;
-import org.codehaus.plexus.PlexusConstants;
-import org.codehaus.plexus.PlexusContainer;
-import org.codehaus.plexus.PlexusContainerException;
-import org.codehaus.plexus.PlexusTestCase;
-import org.codehaus.plexus.classworlds.ClassWorld;
-import org.codehaus.plexus.component.configurator.ComponentConfigurationException;
-import org.codehaus.plexus.component.configurator.ComponentConfigurator;
-import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator;
-import org.codehaus.plexus.component.repository.ComponentDescriptor;
-import org.codehaus.plexus.configuration.PlexusConfiguration;
-import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration;
-import org.codehaus.plexus.context.Context;
-import org.codehaus.plexus.util.InterpolationFilterReader;
-import org.codehaus.plexus.util.ReaderFactory;
-import org.codehaus.plexus.util.ReflectionUtils;
-import org.codehaus.plexus.util.StringUtils;
-import org.codehaus.plexus.util.xml.XmlStreamReader;
-import org.codehaus.plexus.util.xml.Xpp3Dom;
-import org.codehaus.plexus.util.xml.Xpp3DomBuilder;
-
-/**
- * TODO: add a way to use the plugin POM for the lookup so that the user doesn't have to provide the a:g:v:goal
- * as the role hint for the mojo lookup.
- * TODO: standardize the execution of the mojo and looking at the results, but could simply have a template method
- * for verifying the state of the mojo post execution
- * TODO: need a way to look at the state of the mojo without adding getters, this could be where we finally specify
- * the expressions which extract values from the mojo.
- * TODO: create a standard directory structure for picking up POMs to make this even easier, we really just need a testing
- * descriptor and make this entirely declarative!
- *
- * @author jesse
- */
-public abstract class AbstractMojoTestCase extends PlexusTestCase {
-    private static final DefaultArtifactVersion MAVEN_VERSION;
-
-    static {
-        DefaultArtifactVersion version = null;
-        String path = "/META-INF/maven/org.apache.maven/maven-core/pom.properties";
-
-        try (InputStream is = AbstractMojoTestCase.class.getResourceAsStream(path)) {
-            Properties properties = new Properties();
-            if (is != null) {
-                properties.load(is);
-            }
-            String property = properties.getProperty("version");
-            if (property != null) {
-                version = new DefaultArtifactVersion(property);
-            }
-        } catch (IOException e) {
-            // odd, where did this come from
-        }
-        MAVEN_VERSION = version;
-    }
-
-    private ComponentConfigurator configurator;
-
-    private PlexusContainer container;
-
-    private Map<String, MojoDescriptor> mojoDescriptors;
-
-    /*
-     * for the harness I think we have decided against going the route of using the maven project builder.
-     * instead I think we are going to try and make an instance of the localrespository and assign that
-     * to either the project stub or into the mojo directly with injection...not sure yet though.
-     */
-    // private MavenProjectBuilder projectBuilder;
-    @Override
-    protected void setUp() throws Exception {
-        assertTrue(
-                "Maven 3.2.4 or better is required",
-                MAVEN_VERSION == null || new DefaultArtifactVersion("3.2.3").compareTo(MAVEN_VERSION) < 0);
-
-        configurator = getContainer().lookup(ComponentConfigurator.class, "basic");
-        Context context = container.getContext();
-        Map<Object, Object> map = context.getContextData();
-
-        try (InputStream is = getClass().getResourceAsStream("/" + getPluginDescriptorLocation());
-                Reader reader = new BufferedReader(new XmlStreamReader(is));
-                InterpolationFilterReader interpolationReader = new InterpolationFilterReader(reader, map, "${", "}")) {
-
-            PluginDescriptor pluginDescriptor = new PluginDescriptorBuilder().build(interpolationReader);
-
-            Artifact artifact = new DefaultArtifact(
-                    pluginDescriptor.getGroupId(),
-                    pluginDescriptor.getArtifactId(),
-                    pluginDescriptor.getVersion(),
-                    null,
-                    "jar",
-                    null,
-                    new DefaultArtifactHandler("jar"));
-
-            artifact.setFile(getPluginArtifactFile());
-            pluginDescriptor.setPluginArtifact(artifact);
-            pluginDescriptor.setArtifacts(Arrays.asList(artifact));
-
-            for (ComponentDescriptor<?> desc : pluginDescriptor.getComponents()) {
-                getContainer().addComponentDescriptor(desc);
-            }
-
-            mojoDescriptors = new HashMap<>();
-            for (MojoDescriptor mojoDescriptor : pluginDescriptor.getMojos()) {
-                mojoDescriptors.put(mojoDescriptor.getGoal(), mojoDescriptor);
-            }
-        }
-    }
-
-    /**
-     * Returns best-effort plugin artifact file.
-     * <p>
-     * First, attempts to determine parent directory of META-INF directory holding the plugin descriptor. If META-INF
-     * parent directory cannot be determined, falls back to test basedir.
-     */
-    private File getPluginArtifactFile() throws IOException {
-        final String pluginDescriptorLocation = getPluginDescriptorLocation();
-        final URL resource = getClass().getResource("/" + pluginDescriptorLocation);
-
-        File file = null;
-
-        // attempt to resolve relative to META-INF/maven/plugin.xml first
-        if (resource != null) {
-            if ("file".equalsIgnoreCase(resource.getProtocol())) {
-                String path = resource.getPath();
-                if (path.endsWith(pluginDescriptorLocation)) {
-                    file = new File(path.substring(0, path.length() - pluginDescriptorLocation.length()));
-                }
-            } else if ("jar".equalsIgnoreCase(resource.getProtocol())) {
-                // TODO is there a helper for this somewhere?
-                try {
-                    URL jarfile = new URL(resource.getPath());
-                    if ("file".equalsIgnoreCase(jarfile.getProtocol())) {
-                        String path = jarfile.getPath();
-                        if (path.endsWith(pluginDescriptorLocation)) {
-                            file = new File(path.substring(0, path.length() - pluginDescriptorLocation.length() - 2));
-                        }
-                    }
-                } catch (MalformedURLException e) {
-                    // not jar:file:/ URL, too bad
-                }
-            }
-        }
-
-        // fallback to test project basedir if couldn't resolve relative to META-INF/maven/plugin.xml
-        if (file == null || !file.exists()) {
-            file = new File(getBasedir());
-        }
-
-        return file.getCanonicalFile();
-    }
-
-    protected InputStream getPublicDescriptorStream() throws Exception {
-        return new FileInputStream(new File(getPluginDescriptorPath()));
-    }
-
-    protected String getPluginDescriptorPath() {
-        return getBasedir() + "/target/classes/META-INF/maven/plugin.xml";
-    }
-
-    protected String getPluginDescriptorLocation() {
-        return "META-INF/maven/plugin.xml";
-    }
-
-    @Override
-    protected void setupContainer() {
-        ContainerConfiguration cc = setupContainerConfiguration();
-        try {
-            List<Module> modules = new ArrayList<>();
-            addGuiceModules(modules);
-            container = new DefaultPlexusContainer(cc, modules.toArray(new Module[0]));
-        } catch (PlexusContainerException e) {
-            e.printStackTrace();
-            fail("Failed to create plexus container.");
-        }
-    }
-
-    /**
-     * @since 3.0.0
-     */
-    protected void addGuiceModules(List<Module> modules) {
-        // no custom guice modules by default
-    }
-
-    protected ContainerConfiguration setupContainerConfiguration() {
-        ClassWorld classWorld =
-                new ClassWorld("plexus.core", Thread.currentThread().getContextClassLoader());
-
-        ContainerConfiguration cc = new DefaultContainerConfiguration()
-                .setClassWorld(classWorld)
-                .setClassPathScanning(PlexusConstants.SCANNING_INDEX)
-                .setAutoWiring(true)
-                .setName("maven");
-
-        return cc;
-    }
-
-    @Override
-    protected PlexusContainer getContainer() {
-        if (container == null) {
-            setupContainer();
-        }
-
-        return container;
-    }
-
-    /**
-     * Lookup the mojo leveraging the subproject pom
-     *
-     * @param goal
-     * @param pluginPom
-     * @return a Mojo instance
-     * @throws Exception
-     */
-    protected <T extends Mojo> T lookupMojo(String goal, String pluginPom) throws Exception {
-        return lookupMojo(goal, new File(pluginPom));
-    }
-
-    /**
-     * Lookup an empty mojo
-     *
-     * @param goal
-     * @param pluginPom
-     * @return a Mojo instance
-     * @throws Exception
-     */
-    protected <T extends Mojo> T lookupEmptyMojo(String goal, String pluginPom) throws Exception {
-        return lookupEmptyMojo(goal, new File(pluginPom));
-    }
-
-    /**
-     * Lookup the mojo leveraging the actual subprojects pom
-     *
-     * @param goal
-     * @param pom
-     * @return a Mojo instance
-     * @throws Exception
-     */
-    protected <T extends Mojo> T lookupMojo(String goal, File pom) throws Exception {
-        File pluginPom = new File(getBasedir(), "pom.xml");
-
-        Xpp3Dom pluginPomDom = Xpp3DomBuilder.build(ReaderFactory.newXmlReader(pluginPom));
-
-        String artifactId = pluginPomDom.getChild("artifactId").getValue();
-
-        String groupId = resolveFromRootThenParent(pluginPomDom, "groupId");
-
-        String version = resolveFromRootThenParent(pluginPomDom, "version");
-
-        PlexusConfiguration pluginConfiguration = extractPluginConfiguration(artifactId, pom);
-
-        return lookupMojo(groupId, artifactId, version, goal, pluginConfiguration);
-    }
-
-    /**
-     * Lookup the mojo leveraging the actual subprojects pom
-     *
-     * @param goal
-     * @param pom
-     * @return a Mojo instance
-     * @throws Exception
-     */
-    protected <T extends Mojo> T lookupEmptyMojo(String goal, File pom) throws Exception {
-        File pluginPom = new File(getBasedir(), "pom.xml");
-
-        Xpp3Dom pluginPomDom = Xpp3DomBuilder.build(ReaderFactory.newXmlReader(pluginPom));
-
-        String artifactId = pluginPomDom.getChild("artifactId").getValue();
-
-        String groupId = resolveFromRootThenParent(pluginPomDom, "groupId");
-
-        String version = resolveFromRootThenParent(pluginPomDom, "version");
-
-        return lookupMojo(groupId, artifactId, version, goal, null);
-    }
-
-    /*
-    protected Mojo lookupMojo( String groupId, String artifactId, String version, String goal, File pom )
-    throws Exception
-    {
-    PlexusConfiguration pluginConfiguration = extractPluginConfiguration( artifactId, pom );
-
-    return lookupMojo( groupId, artifactId, version, goal, pluginConfiguration );
-    }
-    */
-    /**
-     * lookup the mojo while we have all of the relavent information
-     *
-     * @param groupId
-     * @param artifactId
-     * @param version
-     * @param goal
-     * @param pluginConfiguration
-     * @return a Mojo instance
-     * @throws Exception
-     */
-    protected <T extends Mojo> T lookupMojo(
-            String groupId, String artifactId, String version, String goal, PlexusConfiguration pluginConfiguration)
-            throws Exception {
-        validateContainerStatus();
-
-        // pluginkey = groupId : artifactId : version : goal
-
-        T mojo = (T) lookup(Mojo.class, groupId + ":" + artifactId + ":" + version + ":" + goal);
-
-        if (pluginConfiguration != null) {
-            /* requires v10 of plexus container for lookup on expression evaluator
-            ExpressionEvaluator evaluator = (ExpressionEvaluator) getContainer().lookup( ExpressionEvaluator.ROLE,
-                                                                                        "stub-evaluator" );
-            */
-            ExpressionEvaluator evaluator = new ResolverExpressionEvaluatorStub();
-
-            configurator.configureComponent(
-                    mojo, pluginConfiguration, evaluator, getContainer().getContainerRealm());
-        }
-
-        return mojo;
-    }
-
-    /**
-     *
-     * @param project
-     * @param goal
-     * @return
-     * @throws Exception
-     * @since 2.0
-     */
-    protected <T extends Mojo> T lookupConfiguredMojo(MavenProject project, String goal) throws Exception {
-        return lookupConfiguredMojo(newMavenSession(project), newMojoExecution(goal));
-    }
-
-    /**
-     *
-     * @param session
-     * @param execution
-     * @return
-     * @throws Exception
-     * @throws ComponentConfigurationException
-     * @since 2.0
-     */
-    protected <T extends Mojo> T lookupConfiguredMojo(MavenSession session, MojoExecution execution)
-            throws Exception, ComponentConfigurationException {
-        MavenProject project = session.getCurrentProject();
-        MojoDescriptor mojoDescriptor = execution.getMojoDescriptor();
-
-        T mojo = (T) lookup(mojoDescriptor.getRole(), mojoDescriptor.getRoleHint());
-
-        ExpressionEvaluator evaluator = new PluginParameterExpressionEvaluator(session, execution);
-
-        Xpp3Dom configuration = null;
-        Plugin plugin = project.getPlugin(mojoDescriptor.getPluginDescriptor().getPluginLookupKey());
-        if (plugin != null) {
-            configuration = (Xpp3Dom) plugin.getConfiguration();
-        }
-        if (configuration == null) {
-            configuration = new Xpp3Dom("configuration");
-        }
-        configuration = Xpp3Dom.mergeXpp3Dom(configuration, execution.getConfiguration());
-
-        PlexusConfiguration pluginConfiguration = new XmlPlexusConfiguration(configuration);
-
-        if (mojoDescriptor.getComponentConfigurator() != null) {
-            configurator =
-                    getContainer().lookup(ComponentConfigurator.class, mojoDescriptor.getComponentConfigurator());
-        }
-
-        configurator.configureComponent(
-                mojo, pluginConfiguration, evaluator, getContainer().getContainerRealm());
-
-        return mojo;
-    }
-
-    /**
-     *
-     * @param project
-     * @return
-     * @since 2.0
-     */
-    protected MavenSession newMavenSession(MavenProject project) {
-        MavenExecutionRequest request = new DefaultMavenExecutionRequest();
-        MavenExecutionResult result = new DefaultMavenExecutionResult();
-
-        MavenSession session = new MavenSession(container, MavenRepositorySystemUtils.newSession(), request, result);
-        session.setCurrentProject(project);
-        session.setProjects(Arrays.asList(project));
-        return session;
-    }
-
-    /**
-     *
-     * @param goal
-     * @return
-     * @since 2.0
-     */
-    protected MojoExecution newMojoExecution(String goal) {
-        MojoDescriptor mojoDescriptor = mojoDescriptors.get(goal);
-        assertNotNull(String.format("The MojoDescriptor for the goal %s cannot be null.", goal), mojoDescriptor);
-        MojoExecution execution = new MojoExecution(mojoDescriptor);
-        finalizeMojoConfiguration(execution);
-        return execution;
-    }
-
-    // copy&paste from o.a.m.l.i.DefaultLifecycleExecutionPlanCalculator.finalizeMojoConfiguration(MojoExecution)
-    private void finalizeMojoConfiguration(MojoExecution mojoExecution) {
-        MojoDescriptor mojoDescriptor = mojoExecution.getMojoDescriptor();
-
-        Xpp3Dom executionConfiguration = mojoExecution.getConfiguration();
-        if (executionConfiguration == null) {
-            executionConfiguration = new Xpp3Dom("configuration");
-        }
-
-        Xpp3Dom defaultConfiguration = new Xpp3Dom(MojoDescriptorCreator.convert(mojoDescriptor));
-
-        Xpp3Dom finalConfiguration = new Xpp3Dom("configuration");
-
-        if (mojoDescriptor.getParameters() != null) {
-            for (Parameter parameter : mojoDescriptor.getParameters()) {
-                Xpp3Dom parameterConfiguration = executionConfiguration.getChild(parameter.getName());
-
-                if (parameterConfiguration == null) {
-                    parameterConfiguration = executionConfiguration.getChild(parameter.getAlias());
-                }
-
-                Xpp3Dom parameterDefaults = defaultConfiguration.getChild(parameter.getName());
-
-                parameterConfiguration = Xpp3Dom.mergeXpp3Dom(parameterConfiguration, parameterDefaults, Boolean.TRUE);
-
-                if (parameterConfiguration != null) {
-                    parameterConfiguration = new Xpp3Dom(parameterConfiguration, parameter.getName());
-
-                    if (StringUtils.isEmpty(parameterConfiguration.getAttribute("implementation"))
-                            && StringUtils.isNotEmpty(parameter.getImplementation())) {
-                        parameterConfiguration.setAttribute("implementation", parameter.getImplementation());
-                    }
-
-                    finalConfiguration.addChild(parameterConfiguration);
-                }
-            }
-        }
-
-        mojoExecution.setConfiguration(finalConfiguration);
-    }
-
-    /**
-     * @param artifactId
-     * @param pom
-     * @return the plexus configuration
-     * @throws Exception
-     */
-    protected PlexusConfiguration extractPluginConfiguration(String artifactId, File pom) throws Exception {
-
-        try (Reader reader = ReaderFactory.newXmlReader(pom)) {
-            Xpp3Dom pomDom = Xpp3DomBuilder.build(reader);
-            return extractPluginConfiguration(artifactId, pomDom);
-        }
-    }
-
-    /**
-     * @param artifactId
-     * @param pomDom
-     * @return the plexus configuration
-     * @throws Exception
-     */
-    protected PlexusConfiguration extractPluginConfiguration(String artifactId, Xpp3Dom pomDom) throws Exception {
-        Xpp3Dom pluginConfigurationElement = null;
-
-        Xpp3Dom buildElement = pomDom.getChild("build");
-        if (buildElement != null) {
-            Xpp3Dom pluginsRootElement = buildElement.getChild("plugins");
-
-            if (pluginsRootElement != null) {
-                Xpp3Dom[] pluginElements = pluginsRootElement.getChildren();
-
-                for (Xpp3Dom pluginElement : pluginElements) {
-                    String pluginElementArtifactId =
-                            pluginElement.getChild("artifactId").getValue();
-
-                    if (pluginElementArtifactId.equals(artifactId)) {
-                        pluginConfigurationElement = pluginElement.getChild("configuration");
-
-                        break;
-                    }
-                }
-
-                if (pluginConfigurationElement == null) {
-                    throw new ConfigurationException("Cannot find a configuration element for a plugin with an "
-                            + "artifactId of " + artifactId + ".");
-                }
-            }
-        }
-
-        if (pluginConfigurationElement == null) {
-            throw new ConfigurationException(
-                    "Cannot find a configuration element for a plugin with an artifactId of " + artifactId + ".");
-        }
-
-        return new XmlPlexusConfiguration(pluginConfigurationElement);
-    }
-
-    /**
-     * Configure the mojo
-     *
-     * @param mojo
-     * @param artifactId
-     * @param pom
-     * @return a Mojo instance
-     * @throws Exception
-     */
-    protected <T extends Mojo> T configureMojo(T mojo, String artifactId, File pom) throws Exception {
-        validateContainerStatus();
-
-        PlexusConfiguration pluginConfiguration = extractPluginConfiguration(artifactId, pom);
-
-        ExpressionEvaluator evaluator = new ResolverExpressionEvaluatorStub();
-
-        configurator.configureComponent(
-                mojo, pluginConfiguration, evaluator, getContainer().getContainerRealm());
-
-        return mojo;
-    }
-
-    /**
-     * Configure the mojo with the given plexus configuration
-     *
-     * @param mojo
-     * @param pluginConfiguration
-     * @return a Mojo instance
-     * @throws Exception
-     */
-    protected <T extends Mojo> T configureMojo(T mojo, PlexusConfiguration pluginConfiguration) throws Exception {
-        validateContainerStatus();
-
-        ExpressionEvaluator evaluator = new ResolverExpressionEvaluatorStub();
-
-        configurator.configureComponent(
-                mojo, pluginConfiguration, evaluator, getContainer().getContainerRealm());
-
-        return mojo;
-    }
-
-    /**
-     * Convenience method to obtain the value of a variable on a mojo that might not have a getter.
-     *
-     * NOTE: the caller is responsible for casting to to what the desired type is.
-     *
-     * @param object
-     * @param variable
-     * @return object value of variable
-     * @throws IllegalArgumentException
-     */
-    protected <T> T getVariableValueFromObject(Object object, String variable) throws IllegalAccessException {
-        Field field = ReflectionUtils.getFieldByNameIncludingSuperclasses(variable, object.getClass());
-
-        field.setAccessible(true);
-
-        return (T) field.get(object);
-    }
-
-    /**
-     * Convenience method to obtain all variables and values from the mojo (including its superclasses)
-     *
-     * Note: the values in the map are of type Object so the caller is responsible for casting to desired types.
-     *
-     * @param object
-     * @return map of variable names and values
-     */
-    protected Map<String, Object> getVariablesAndValuesFromObject(Object object) throws IllegalAccessException {
-        return getVariablesAndValuesFromObject(object.getClass(), object);
-    }
-
-    /**
-     * Convenience method to obtain all variables and values from the mojo (including its superclasses)
-     *
-     * Note: the values in the map are of type Object so the caller is responsible for casting to desired types.
-     *
-     * @param clazz
-     * @param object
-     * @return map of variable names and values
-     */
-    protected Map<String, Object> getVariablesAndValuesFromObject(Class<?> clazz, Object object)
-            throws IllegalAccessException {
-        Map<String, Object> map = new HashMap<>();
-
-        Field[] fields = clazz.getDeclaredFields();
-
-        AccessibleObject.setAccessible(fields, true);
-
-        for (Field field : fields) {
-            map.put(field.getName(), field.get(object));
-        }
-
-        Class<?> superclass = clazz.getSuperclass();
-
-        if (!Object.class.equals(superclass)) {
-            map.putAll(getVariablesAndValuesFromObject(superclass, object));
-        }
-
-        return map;
-    }
-
-    /**
-     * Convenience method to set values to variables in objects that don't have setters
-     *
-     * @param object
-     * @param variable
-     * @param value
-     * @throws IllegalAccessException
-     */
-    protected <T> void setVariableValueToObject(Object object, String variable, T value) throws IllegalAccessException {
-        Field field = ReflectionUtils.getFieldByNameIncludingSuperclasses(variable, object.getClass());
-
-        field.setAccessible(true);
-
-        field.set(object, value);
-    }
-
-    /**
-     * sometimes the parent element might contain the correct value so generalize that access
-     *
-     * TODO find out where this is probably done elsewhere
-     *
-     * @param pluginPomDom
-     * @param element
-     * @return
-     * @throws Exception
-     */
-    private String resolveFromRootThenParent(Xpp3Dom pluginPomDom, String element) throws Exception {
-        Xpp3Dom elementDom = pluginPomDom.getChild(element);
-
-        // parent might have the group Id so resolve it
-        if (elementDom == null) {
-            Xpp3Dom pluginParentDom = pluginPomDom.getChild("parent");
-
-            if (pluginParentDom != null) {
-                elementDom = pluginParentDom.getChild(element);
-
-                if (elementDom == null) {
-                    throw new Exception("unable to determine " + element);
-                }
-
-                return elementDom.getValue();
-            }
-
-            throw new Exception("unable to determine " + element);
-        }
-
-        return elementDom.getValue();
-    }
-
-    /**
-     * We should make sure this is called in each method that makes use of the container,
-     * otherwise we throw ugly NPE's
-     *
-     * crops up when the subclassing code defines the setUp method but doesn't call super.setUp()
-     *
-     * @throws Exception
-     */
-    private void validateContainerStatus() throws Exception {
-        if (getContainer() != null) {
-            return;
-        }
-
-        throw new Exception("container is null, make sure super.setUp() is called");
-    }
-}
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ArtifactStubFactory.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ArtifactStubFactory.java
deleted file mode 100644
index d510314..0000000
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ArtifactStubFactory.java
+++ /dev/null
@@ -1,510 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.Field;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.DefaultArtifact;
-import org.apache.maven.artifact.handler.ArtifactHandler;
-import org.apache.maven.artifact.versioning.VersionRange;
-import org.apache.maven.plugin.testing.stubs.DefaultArtifactHandlerStub;
-import org.codehaus.plexus.archiver.Archiver;
-import org.codehaus.plexus.archiver.ArchiverException;
-import org.codehaus.plexus.archiver.manager.ArchiverManager;
-import org.codehaus.plexus.archiver.manager.NoSuchArchiverException;
-import org.codehaus.plexus.archiver.war.WarArchiver;
-import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.util.ReflectionUtils;
-import org.codehaus.plexus.util.StringUtils;
-
-/**
- * This class creates artifacts to be used for testing purposes. It can optionally create actual files on the local disk
- * for things like copying. It can create these files as archives with named files inside to be used for testing things
- * like unpack. Also provided are some utility methods to quickly get a set of artifacts distinguished by various things
- * like group,artifact,type,scope, etc It was originally developed for the dependency plugin, but can be useful in other
- * plugins that need to simulate artifacts for unit tests.
- *
- * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
- */
-public class ArtifactStubFactory {
-    private File workingDir;
-
-    private boolean createFiles;
-
-    private File srcFile;
-
-    private boolean createUnpackableFile;
-
-    private ArchiverManager archiverManager;
-
-    /**
-     * Default constructor. This should be used only if real files aren't needed...just the artifact objects
-     */
-    public ArtifactStubFactory() {
-        this.workingDir = null;
-        this.createFiles = false;
-    }
-
-    /**
-     * This constructor is to be used if files are needed and to set a working dir
-     *
-     * @param workingDir
-     * @param createFiles
-     */
-    public ArtifactStubFactory(File workingDir, boolean createFiles) {
-        this.workingDir = new File(workingDir, "localTestRepo");
-        this.createFiles = createFiles;
-    }
-
-    /**
-     * If set, the file will be created as a zip/jar/war with a file inside that can be checked to exist after
-     * unpacking.
-     *
-     * @param archiverManager
-     */
-    public void setUnpackableFile(ArchiverManager archiverManager) {
-        this.createUnpackableFile = true;
-        this.archiverManager = archiverManager;
-    }
-
-    /**
-     * @param groupId
-     * @param artifactId
-     * @param version
-     * @return a <code>DefaultArtifact</code> instance for the given parameters
-     * @throws IOException if any
-     * @see #createArtifact(String, String, String, String, String, String)
-     */
-    public Artifact createArtifact(String groupId, String artifactId, String version) throws IOException {
-        return createArtifact(groupId, artifactId, version, Artifact.SCOPE_COMPILE, "jar", "");
-    }
-
-    /**
-     * @param groupId
-     * @param artifactId
-     * @param version
-     * @param scope
-     * @return a <code>DefaultArtifact</code> instance for the given parameters
-     * @throws IOException if any
-     * @see #createArtifact(String, String, String, String, String, String)
-     */
-    public Artifact createArtifact(String groupId, String artifactId, String version, String scope) throws IOException {
-        return createArtifact(groupId, artifactId, version, scope, "jar", "");
-    }
-
-    /**
-     * @param groupId
-     * @param artifactId
-     * @param version
-     * @param scope
-     * @param type
-     * @param classifier
-     * @return a <code>DefaultArtifact</code> instance for the given parameters
-     * @throws IOException if any
-     * @see #createArtifact(String, String, VersionRange, String, String, String, boolean)
-     */
-    public Artifact createArtifact(
-            String groupId, String artifactId, String version, String scope, String type, String classifier)
-            throws IOException {
-        VersionRange vr = VersionRange.createFromVersion(version);
-        return createArtifact(groupId, artifactId, vr, scope, type, classifier, false);
-    }
-
-    /**
-     * @param groupId not null
-     * @param artifactId not null
-     * @param versionRange not null
-     * @param scope not null
-     * @param type not null
-     * @param classifier
-     * @param optional not null
-     * @return a <code>DefaultArtifact</code> instance
-     * @throws IOException if any
-     */
-    public Artifact createArtifact(
-            String groupId,
-            String artifactId,
-            VersionRange versionRange,
-            String scope,
-            String type,
-            String classifier,
-            boolean optional)
-            throws IOException {
-        ArtifactHandler ah = new DefaultArtifactHandlerStub(type, classifier);
-
-        Artifact artifact =
-                new DefaultArtifact(groupId, artifactId, versionRange, scope, type, classifier, ah, optional);
-
-        // i have no idea why this needs to be done manually when isSnapshot is able to figure it out.
-        artifact.setRelease(!artifact.isSnapshot());
-
-        if (createFiles) {
-            setArtifactFile(artifact, this.workingDir, this.srcFile, this.createUnpackableFile);
-        }
-        return artifact;
-    }
-
-    /**
-     * Creates a new empty file and attaches it to the artifact.
-     *
-     * @param artifact to attach the file to.
-     * @param workingDir where to locate the new file
-     * @throws IOException
-     */
-    public void setArtifactFile(Artifact artifact, File workingDir) throws IOException {
-        setArtifactFile(artifact, workingDir, null, false);
-    }
-
-    /**
-     * Copyies the srcFile to the workingDir and then attaches it to the artifact. If srcFile is null, a new empty file
-     * will be created.
-     *
-     * @param artifact to attach
-     * @param workingDir where to copy the srcFile.
-     * @param srcFile file to be attached.
-     * @throws IOException
-     */
-    public void setArtifactFile(Artifact artifact, File workingDir, File srcFile) throws IOException {
-        setArtifactFile(artifact, workingDir, srcFile, false);
-    }
-
-    /**
-     * Creates an unpackable file (zip,jar etc) containing an empty file.
-     *
-     * @param artifact to attach
-     * @param workingDir where to create the file.
-     * @throws IOException
-     */
-    public void setUnpackableArtifactFile(Artifact artifact, File workingDir) throws IOException {
-        setArtifactFile(artifact, workingDir, null, true);
-    }
-
-    /**
-     * Creates an unpackable file (zip,jar etc) containing the srcFile. If srcFile is null, a new empty file will be
-     * created.
-     *
-     * @param artifact to attach
-     * @param workingDir where to create the file.
-     * @param srcFile
-     * @throws IOException if any
-     */
-    public void setUnpackableArtifactFile(Artifact artifact, File workingDir, File srcFile) throws IOException {
-        setArtifactFile(artifact, workingDir, srcFile, true);
-    }
-
-    /**
-     * Creates a file that can be copied or unpacked based on the passed in artifact
-     *
-     * @param artifact
-     * @param workingDir
-     * @param srcFile
-     * @param createUnpackableFile
-     * @throws IOException if any
-     */
-    private void setArtifactFile(Artifact artifact, File workingDir, File srcFile, boolean createUnpackableFile)
-            throws IOException {
-        if (workingDir == null) {
-            throw new IllegalArgumentException("The workingDir must be set.");
-        }
-
-        String fileName = getFormattedFileName(artifact, false);
-
-        File theFile = new File(workingDir, fileName);
-        theFile.getParentFile().mkdirs();
-
-        if (srcFile == null) {
-            theFile.createNewFile();
-        } else if (createUnpackableFile) {
-            try {
-                createUnpackableFile(artifact, theFile);
-            } catch (NoSuchArchiverException e) {
-                throw new IOException("NoSuchArchiverException: " + e.getMessage());
-            } catch (ArchiverException e) {
-                throw new IOException("ArchiverException: " + e.getMessage());
-            }
-        } else {
-            FileUtils.copyFile(srcFile, theFile);
-        }
-
-        artifact.setFile(theFile);
-    }
-
-    /**
-     * @param artifact
-     * @return
-     */
-    public static String getUnpackableFileName(Artifact artifact) {
-        return "" + artifact.getGroupId() + "-" + artifact.getArtifactId() + "-" + artifact.getVersion() + "-"
-                + artifact.getClassifier() + "-" + artifact.getType() + ".txt";
-    }
-
-    /**
-     * @param artifact
-     * @param destFile
-     * @throws NoSuchArchiverException
-     * @throws ArchiverException if any
-     * @throws IOException if any
-     */
-    public void createUnpackableFile(Artifact artifact, File destFile)
-            throws NoSuchArchiverException, ArchiverException, IOException {
-        Archiver archiver = archiverManager.getArchiver(destFile);
-
-        archiver.setDestFile(destFile);
-        archiver.addFile(srcFile, getUnpackableFileName(artifact));
-
-        if (archiver instanceof WarArchiver) {
-            WarArchiver war = (WarArchiver) archiver;
-            war.setExpectWebXml(false);
-        }
-        archiver.createArchive();
-    }
-
-    /**
-     * @return a <code>DefaultArtifact</code> instance for <code>testGroupId:release:jar:1.0</code>
-     * @throws IOException if any
-     */
-    public Artifact getReleaseArtifact() throws IOException {
-        return createArtifact("testGroupId", "release", "1.0");
-    }
-
-    /**
-     * @return a default <code>DefaultArtifact</code> instance for <code>testGroupId:snapshot:jar:2.0-SNAPSHOT</code>
-     * @throws IOException if any
-     */
-    public Artifact getSnapshotArtifact() throws IOException {
-        return createArtifact("testGroupId", "snapshot", "2.0-SNAPSHOT");
-    }
-
-    /**
-     * @return a default set of release and snapshot <code>DefaultArtifact</code>, i.e.:
-     * <code>testGroupId:snapshot:jar:2.0-SNAPSHOT, testGroupId:release:jar:1.0</code>
-     * @throws IOException if any
-     * @see #getReleaseArtifact()
-     * @see #getSnapshotArtifact()
-     */
-    public Set<Artifact> getReleaseAndSnapshotArtifacts() throws IOException {
-        Set<Artifact> set = new HashSet<>();
-        set.add(getReleaseArtifact());
-        set.add(getSnapshotArtifact());
-        return set;
-    }
-
-    /**
-     * @return a default set of <code>DefaultArtifact</code>, i.e.:
-     * <code>g:provided:jar:1.0, g:compile:jar:1.0, g:system:jar:1.0, g:test:jar:1.0, g:runtime:jar:1.0</code>
-     * @throws IOException if any
-     */
-    public Set<Artifact> getScopedArtifacts() throws IOException {
-        Set<Artifact> set = new HashSet<>();
-        set.add(createArtifact("g", "compile", "1.0", Artifact.SCOPE_COMPILE));
-        set.add(createArtifact("g", "provided", "1.0", Artifact.SCOPE_PROVIDED));
-        set.add(createArtifact("g", "test", "1.0", Artifact.SCOPE_TEST));
-        set.add(createArtifact("g", "runtime", "1.0", Artifact.SCOPE_RUNTIME));
-        set.add(createArtifact("g", "system", "1.0", Artifact.SCOPE_SYSTEM));
-        return set;
-    }
-
-    /**
-     * @return a set of <code>DefaultArtifact</code>, i.e.:
-     * <code>g:d:zip:1.0, g:a:war:1.0, g:b:jar:1.0, g:c:sources:1.0, g:e:rar:1.0</code>
-     * @throws IOException if any
-     */
-    public Set<Artifact> getTypedArtifacts() throws IOException {
-        Set<Artifact> set = new HashSet<>();
-        set.add(createArtifact("g", "a", "1.0", Artifact.SCOPE_COMPILE, "war", null));
-        set.add(createArtifact("g", "b", "1.0", Artifact.SCOPE_COMPILE, "jar", null));
-        set.add(createArtifact("g", "c", "1.0", Artifact.SCOPE_COMPILE, "sources", null));
-        set.add(createArtifact("g", "d", "1.0", Artifact.SCOPE_COMPILE, "zip", null));
-        set.add(createArtifact("g", "e", "1.0", Artifact.SCOPE_COMPILE, "rar", null));
-        return set;
-    }
-
-    /**
-     * @return a set of <code>DefaultArtifact</code>, i.e.:
-     * <code>g:c:jar:three:1.0, g:b:jar:two:1.0, g:d:jar:four:1.0, g:a:jar:one:1.0</code>
-     * @throws IOException if any
-     */
-    public Set<Artifact> getClassifiedArtifacts() throws IOException {
-        Set<Artifact> set = new HashSet<>();
-        set.add(createArtifact("g", "a", "1.0", Artifact.SCOPE_COMPILE, "jar", "one"));
-        set.add(createArtifact("g", "b", "1.0", Artifact.SCOPE_COMPILE, "jar", "two"));
-        set.add(createArtifact("g", "c", "1.0", Artifact.SCOPE_COMPILE, "jar", "three"));
-        set.add(createArtifact("g", "d", "1.0", Artifact.SCOPE_COMPILE, "jar", "four"));
-        return set;
-    }
-
-    /**
-     * @return a set of <code>DefaultArtifact</code>, i.e.:
-     * <code>g:d:zip:1.0, g:a:war:1.0, g:b:jar:1.0, g:e:rar:1.0</code>
-     * @throws IOException if any
-     */
-    public Set<Artifact> getTypedArchiveArtifacts() throws IOException {
-        Set<Artifact> set = new HashSet<>();
-        set.add(createArtifact("g", "a", "1.0", Artifact.SCOPE_COMPILE, "war", null));
-        set.add(createArtifact("g", "b", "1.0", Artifact.SCOPE_COMPILE, "jar", null));
-        set.add(createArtifact("g", "d", "1.0", Artifact.SCOPE_COMPILE, "zip", null));
-        set.add(createArtifact("g", "e", "1.0", Artifact.SCOPE_COMPILE, "rar", null));
-        return set;
-    }
-
-    /**
-     * @return a set of <code>DefaultArtifact</code>, i.e.:
-     * <code>g:one:jar:a:1.0, g:two:jar:a:1.0, g:four:jar:a:1.0, g:three:jar:a:1.0</code>
-     * @throws IOException if any
-     */
-    public Set<Artifact> getArtifactArtifacts() throws IOException {
-        Set<Artifact> set = new HashSet<>();
-        set.add(createArtifact("g", "one", "1.0", Artifact.SCOPE_COMPILE, "jar", "a"));
-        set.add(createArtifact("g", "two", "1.0", Artifact.SCOPE_COMPILE, "jar", "a"));
-        set.add(createArtifact("g", "three", "1.0", Artifact.SCOPE_COMPILE, "jar", "a"));
-        set.add(createArtifact("g", "four", "1.0", Artifact.SCOPE_COMPILE, "jar", "a"));
-        return set;
-    }
-
-    /**
-     * @return a set of <code>DefaultArtifact</code>, i.e.:
-     * <code>one:group-one:jar:a:1.0, three:group-three:jar:a:1.0, four:group-four:jar:a:1.0,
-     * two:group-two:jar:a:1.0</code>
-     * @throws IOException if any
-     */
-    public Set<Artifact> getGroupIdArtifacts() throws IOException {
-        Set<Artifact> set = new HashSet<>();
-        set.add(createArtifact("one", "group-one", "1.0", Artifact.SCOPE_COMPILE, "jar", "a"));
-        set.add(createArtifact("two", "group-two", "1.0", Artifact.SCOPE_COMPILE, "jar", "a"));
-        set.add(createArtifact("three", "group-three", "1.0", Artifact.SCOPE_COMPILE, "jar", "a"));
-        set.add(createArtifact("four", "group-four", "1.0", Artifact.SCOPE_COMPILE, "jar", "a"));
-        return set;
-    }
-
-    /**
-     * @return a set of <code>DefaultArtifact</code>
-     * @throws IOException if any
-     * @see #getTypedArtifacts()
-     * @see #getScopedArtifacts()
-     * @see #getReleaseAndSnapshotArtifacts()
-     */
-    public Set<Artifact> getMixedArtifacts() throws IOException {
-        Set<Artifact> set = new HashSet<>();
-        set.addAll(getTypedArtifacts());
-        set.addAll(getScopedArtifacts());
-        set.addAll(getReleaseAndSnapshotArtifacts());
-        return set;
-    }
-
-    /**
-     * @return Returns the createFiles.
-     */
-    public boolean isCreateFiles() {
-        return this.createFiles;
-    }
-
-    /**
-     * @param createFiles The createFiles to set.
-     */
-    public void setCreateFiles(boolean createFiles) {
-        this.createFiles = createFiles;
-    }
-
-    /**
-     * @return Returns the workingDir.
-     */
-    public File getWorkingDir() {
-        return this.workingDir;
-    }
-
-    /**
-     * @param workingDir The workingDir to set.
-     */
-    public void setWorkingDir(File workingDir) {
-        this.workingDir = workingDir;
-    }
-
-    /**
-     * @return Returns the srcFile.
-     */
-    public File getSrcFile() {
-        return this.srcFile;
-    }
-
-    /**
-     * @param srcFile The srcFile to set.
-     */
-    public void setSrcFile(File srcFile) {
-        this.srcFile = srcFile;
-    }
-
-    /**
-     * Convenience method to set values to variables in objects that don't have setters
-     *
-     * @param object
-     * @param variable
-     * @param value
-     * @throws IllegalAccessException
-     */
-    public static void setVariableValueToObject(Object object, String variable, Object value)
-            throws IllegalAccessException {
-        Field field = ReflectionUtils.getFieldByNameIncludingSuperclasses(variable, object.getClass());
-
-        field.setAccessible(true);
-
-        field.set(object, value);
-    }
-
-    /**
-     * Builds the file name. If removeVersion is set, then the file name must be reconstructed from the artifactId,
-     * Classifier (if used) and Type. Otherwise, this method returns the artifact file name.
-     *
-     * @param artifact File to be formatted.
-     * @param removeVersion Specifies if the version should be removed from the file name.
-     * @return Formatted file name in the format artifactId-[version]-[classifier].[type]
-     */
-    public static String getFormattedFileName(Artifact artifact, boolean removeVersion) {
-        String destFileName = null;
-
-        // if there is a file and we aren't stripping the version, just get the
-        // name directly
-        if (artifact.getFile() != null && !removeVersion) {
-            destFileName = artifact.getFile().getName();
-        } else
-        // if offline
-        {
-            String versionString = null;
-            if (!removeVersion) {
-                versionString = "-" + artifact.getVersion();
-            } else {
-                versionString = "";
-            }
-
-            String classifierString = "";
-
-            if (StringUtils.isNotEmpty(artifact.getClassifier())) {
-                classifierString = "-" + artifact.getClassifier();
-            }
-
-            destFileName = artifact.getArtifactId() + versionString + classifierString + "."
-                    + artifact.getArtifactHandler().getExtension();
-        }
-        return destFileName;
-    }
-}
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ConfigurationException.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ConfigurationException.java
deleted file mode 100644
index 9b8150c..0000000
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ConfigurationException.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing;
-
-/**
- * ConfigurationException
- *
- * @author jesse
- */
-public class ConfigurationException extends Exception {
-    /** serialVersionUID */
-    static final long serialVersionUID = -6180939638742159065L;
-
-    /**
-     * @param message The detailed message.
-     */
-    public ConfigurationException(String message) {
-        super(message);
-    }
-
-    /**
-     * @param cause The detailed cause.
-     */
-    public ConfigurationException(Throwable cause) {
-        super(cause);
-    }
-
-    /**
-     * @param message The detailed message.
-     * @param cause The detailed cause.
-     */
-    public ConfigurationException(String message, Throwable cause) {
-        super(message, cause);
-    }
-}
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/MojoLogWrapper.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/MojoLogWrapper.java
deleted file mode 100644
index 869525c..0000000
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/MojoLogWrapper.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing;
-
-import org.apache.maven.plugin.logging.Log;
-import org.slf4j.Logger;
-
-import static java.util.Objects.requireNonNull;
-
-/**
- * @author jdcasey
- */
-public class MojoLogWrapper implements Log {
-    private final Logger logger;
-
-    public MojoLogWrapper(Logger logger) {
-        this.logger = requireNonNull(logger);
-    }
-
-    public void debug(CharSequence content) {
-        logger.debug(toString(content));
-    }
-
-    private String toString(CharSequence content) {
-        if (content == null) {
-            return "";
-        } else {
-            return content.toString();
-        }
-    }
-
-    @Override
-    public void debug(CharSequence content, Throwable error) {
-        logger.debug(toString(content), error);
-    }
-
-    @Override
-    public void debug(Throwable error) {
-        logger.debug("", error);
-    }
-
-    @Override
-    public void info(CharSequence content) {
-        logger.info(toString(content));
-    }
-
-    @Override
-    public void info(CharSequence content, Throwable error) {
-        logger.info(toString(content), error);
-    }
-
-    @Override
-    public void info(Throwable error) {
-        logger.info("", error);
-    }
-
-    @Override
-    public void warn(CharSequence content) {
-        logger.warn(toString(content));
-    }
-
-    @Override
-    public void warn(CharSequence content, Throwable error) {
-        logger.warn(toString(content), error);
-    }
-
-    @Override
-    public void warn(Throwable error) {
-        logger.warn("", error);
-    }
-
-    @Override
-    public void error(CharSequence content) {
-        logger.error(toString(content));
-    }
-
-    @Override
-    public void error(CharSequence content, Throwable error) {
-        logger.error(toString(content), error);
-    }
-
-    @Override
-    public void error(Throwable error) {
-        logger.error("", error);
-    }
-
-    @Override
-    public boolean isDebugEnabled() {
-        return logger.isDebugEnabled();
-    }
-
-    @Override
-    public boolean isInfoEnabled() {
-        return logger.isInfoEnabled();
-    }
-
-    @Override
-    public boolean isWarnEnabled() {
-        return logger.isWarnEnabled();
-    }
-
-    @Override
-    public boolean isErrorEnabled() {
-        return logger.isErrorEnabled();
-    }
-}
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/MojoParameters.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/MojoParameters.java
deleted file mode 100644
index 842fba6..0000000
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/MojoParameters.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing;
-
-import org.codehaus.plexus.util.xml.Xpp3Dom;
-
-/**
- * Static helpers to create and manipulate mojo execution configuration parameters
- *
- * @since 3.2.0
- */
-public class MojoParameters {
-    public static Xpp3Dom newParameter(String name, String value) {
-        Xpp3Dom child = new Xpp3Dom(name);
-        child.setValue(value);
-        return child;
-    }
-}
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/MojoRule.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/MojoRule.java
deleted file mode 100644
index 878d750..0000000
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/MojoRule.java
+++ /dev/null
@@ -1,363 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing;
-
-import java.io.File;
-import java.io.InputStream;
-import java.util.Map;
-
-import org.apache.maven.api.Session;
-import org.apache.maven.execution.DefaultMavenExecutionRequest;
-import org.apache.maven.execution.MavenExecutionRequest;
-import org.apache.maven.execution.MavenSession;
-import org.apache.maven.execution.MojoExecutionEvent;
-import org.apache.maven.execution.MojoExecutionListener;
-import org.apache.maven.execution.scope.internal.MojoExecutionScope;
-import org.apache.maven.plugin.Mojo;
-import org.apache.maven.plugin.MojoExecution;
-import org.apache.maven.project.MavenProject;
-import org.apache.maven.project.ProjectBuilder;
-import org.apache.maven.project.ProjectBuildingRequest;
-import org.apache.maven.session.scope.internal.SessionScope;
-import org.codehaus.plexus.ContainerConfiguration;
-import org.codehaus.plexus.PlexusContainer;
-import org.codehaus.plexus.component.configurator.ComponentConfigurationException;
-import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
-import org.codehaus.plexus.configuration.PlexusConfiguration;
-import org.codehaus.plexus.util.xml.Xpp3Dom;
-import org.eclipse.aether.DefaultRepositorySystemSession;
-import org.junit.Assert;
-import org.junit.rules.TestRule;
-import org.junit.runner.Description;
-import org.junit.runners.model.Statement;
-
-/**
- * {@link TestRule} for usage with Junit-4.10ff. This is just a wrapper for an embedded
- * {@link AbstractMojoTestCase}, so all {@code protected} methods of the TestCase are
- * exhibited as {@code public} in the rule. You may annotate single tests methods with
- * {@link WithoutMojo} to prevent the rule from firing.
- *
- * @author Mirko Friedenhagen
- * @since 2.2
- */
-public class MojoRule implements TestRule {
-    private final AbstractMojoTestCase testCase;
-
-    public MojoRule() {
-        this(new AbstractMojoTestCase() {});
-    }
-
-    public MojoRule(AbstractMojoTestCase testCase) {
-        this.testCase = testCase;
-    }
-
-    /**
-     * May be overridden in the implementation to do stuff <em>after</em> the embedded test case
-     * is set up but <em>before</em> the current test is actually run.
-     *
-     * @throws Throwable
-     */
-    protected void before() throws Throwable {}
-
-    /**
-     * May be overridden in the implementation to do stuff after the current test was run.
-     */
-    protected void after() {}
-
-    public InputStream getPublicDescriptorStream() throws Exception {
-        return testCase.getPublicDescriptorStream();
-    }
-
-    public String getPluginDescriptorPath() {
-        return testCase.getPluginDescriptorPath();
-    }
-
-    public String getPluginDescriptorLocation() {
-        return testCase.getPluginDescriptorLocation();
-    }
-
-    public void setupContainer() {
-        testCase.setupContainer();
-    }
-
-    public ContainerConfiguration setupContainerConfiguration() {
-        return testCase.setupContainerConfiguration();
-    }
-
-    public PlexusContainer getContainer() {
-        return testCase.getContainer();
-    }
-
-    /**
-     * Lookup the mojo leveraging the subproject pom
-     *
-     * @param goal
-     * @param pluginPom
-     * @return a Mojo instance
-     * @throws Exception
-     */
-    public <T extends Mojo> T lookupMojo(String goal, String pluginPom) throws Exception {
-        return testCase.lookupMojo(goal, pluginPom);
-    }
-
-    /**
-     * Lookup an empty mojo
-     *
-     * @param goal
-     * @param pluginPom
-     * @return a Mojo instance
-     * @throws Exception
-     */
-    public <T extends Mojo> T lookupEmptyMojo(String goal, String pluginPom) throws Exception {
-        return testCase.lookupEmptyMojo(goal, new File(pluginPom));
-    }
-
-    /**
-     * Lookup the mojo leveraging the actual subprojects pom
-     *
-     * @param goal
-     * @param pom
-     * @return a Mojo instance
-     * @throws Exception
-     */
-    public <T extends Mojo> T lookupMojo(String goal, File pom) throws Exception {
-        return testCase.lookupMojo(goal, pom);
-    }
-
-    /**
-     * Lookup the mojo leveraging the actual subprojects pom
-     *
-     * @param goal
-     * @param pom
-     * @return a Mojo instance
-     * @throws Exception
-     */
-    public <T extends Mojo> T lookupEmptyMojo(String goal, File pom) throws Exception {
-        return testCase.lookupEmptyMojo(goal, pom);
-    }
-
-    public <T extends Mojo> T lookupMojo(
-            String groupId, String artifactId, String version, String goal, PlexusConfiguration pluginConfiguration)
-            throws Exception {
-        return testCase.lookupMojo(groupId, artifactId, version, goal, pluginConfiguration);
-    }
-
-    public <T extends Mojo> T lookupConfiguredMojo(MavenProject project, String goal) throws Exception {
-        return testCase.lookupConfiguredMojo(project, goal);
-    }
-
-    public <T extends Mojo> T lookupConfiguredMojo(MavenSession session, MojoExecution execution)
-            throws Exception, ComponentConfigurationException {
-        return testCase.lookupConfiguredMojo(session, execution);
-    }
-
-    public MavenSession newMavenSession(MavenProject project) {
-        return testCase.newMavenSession(project);
-    }
-
-    public MojoExecution newMojoExecution(String goal) {
-        return testCase.newMojoExecution(goal);
-    }
-
-    public PlexusConfiguration extractPluginConfiguration(String artifactId, File pom) throws Exception {
-        return testCase.extractPluginConfiguration(artifactId, pom);
-    }
-
-    public PlexusConfiguration extractPluginConfiguration(String artifactId, Xpp3Dom pomDom) throws Exception {
-        return testCase.extractPluginConfiguration(artifactId, pomDom);
-    }
-
-    public <T extends Mojo> T configureMojo(T mojo, String artifactId, File pom) throws Exception {
-        return testCase.configureMojo(mojo, artifactId, pom);
-    }
-
-    public <T extends Mojo> T configureMojo(T mojo, PlexusConfiguration pluginConfiguration) throws Exception {
-        return testCase.configureMojo(mojo, pluginConfiguration);
-    }
-
-    /**
-     * Convenience method to obtain the value of a variable on a mojo that might not have a getter.
-     *
-     * NOTE: the caller is responsible for casting to to what the desired type is.
-     *
-     * @param object
-     * @param variable
-     * @return object value of variable
-     * @throws IllegalArgumentException
-     */
-    public <T> T getVariableValueFromObject(Object object, String variable) throws IllegalAccessException {
-        return testCase.getVariableValueFromObject(object, variable);
-    }
-
-    /**
-     * Convenience method to obtain all variables and values from the mojo (including its superclasses)
-     *
-     * Note: the values in the map are of type Object so the caller is responsible for casting to desired types.
-     *
-     * @param object
-     * @return map of variable names and values
-     */
-    public Map<String, Object> getVariablesAndValuesFromObject(Object object) throws IllegalAccessException {
-        return testCase.getVariablesAndValuesFromObject(object);
-    }
-
-    /**
-     * Convenience method to obtain all variables and values from the mojo (including its superclasses)
-     *
-     * Note: the values in the map are of type Object so the caller is responsible for casting to desired types.
-     *
-     * @param clazz
-     * @param object
-     * @return map of variable names and values
-     */
-    public Map<String, Object> getVariablesAndValuesFromObject(Class<?> clazz, Object object)
-            throws IllegalAccessException {
-        return testCase.getVariablesAndValuesFromObject(clazz, object);
-    }
-
-    /**
-     * Convenience method to set values to variables in objects that don't have setters
-     *
-     * @param object
-     * @param variable
-     * @param value
-     * @throws IllegalAccessException
-     */
-    public <T> void setVariableValueToObject(Object object, String variable, T value) throws IllegalAccessException {
-        testCase.setVariableValueToObject(object, variable, value);
-    }
-
-    @Override
-    public Statement apply(final Statement base, Description description) {
-        if (description.getAnnotation(WithoutMojo.class) != null) // skip.
-        {
-            return base;
-        }
-        return new Statement() {
-            @Override
-            public void evaluate() throws Throwable {
-                testCase.setUp();
-                before();
-                try {
-                    base.evaluate();
-                } finally {
-                    after();
-                }
-            }
-        };
-    }
-
-    /**
-     * @since 3.1.0
-     */
-    public MavenProject readMavenProject(File basedir) throws Exception {
-        File pom = new File(basedir, "pom.xml");
-        MavenExecutionRequest request = new DefaultMavenExecutionRequest();
-        request.setBaseDirectory(basedir);
-        ProjectBuildingRequest configuration = request.getProjectBuildingRequest();
-        configuration.setRepositorySession(new DefaultRepositorySystemSession());
-        MavenProject project =
-                lookup(ProjectBuilder.class).build(pom, configuration).getProject();
-        Assert.assertNotNull(project);
-        return project;
-    }
-
-    /**
-     * @since 3.1.0
-     */
-    public void executeMojo(File basedir, String goal) throws Exception {
-        MavenProject project = readMavenProject(basedir);
-        MavenSession session = newMavenSession(project);
-        MojoExecution execution = newMojoExecution(goal);
-        executeMojo(session, project, execution);
-    }
-
-    /**
-     * @since 3.1.0
-     */
-    public <T extends Mojo> T lookupConfiguredMojo(File basedir, String goal)
-            throws Exception, ComponentConfigurationException {
-        MavenProject project = readMavenProject(basedir);
-        MavenSession session = newMavenSession(project);
-        MojoExecution execution = newMojoExecution(goal);
-        return lookupConfiguredMojo(session, execution);
-    }
-
-    /**
-     * @since 3.1.0
-     */
-    public final <T> T lookup(final Class<T> role) throws ComponentLookupException {
-        return getContainer().lookup(role);
-    }
-
-    /**
-     * @since 3.2.0
-     */
-    public void executeMojo(MavenProject project, String goal, Xpp3Dom... parameters) throws Exception {
-        MavenSession session = newMavenSession(project);
-        executeMojo(session, project, goal, parameters);
-    }
-
-    /**
-     * @since 3.2.0
-     */
-    public void executeMojo(MavenSession session, MavenProject project, String goal, Xpp3Dom... parameters)
-            throws Exception {
-        MojoExecution execution = newMojoExecution(goal);
-        if (parameters != null) {
-            Xpp3Dom configuration = execution.getConfiguration();
-            for (Xpp3Dom parameter : parameters) {
-                configuration.addChild(parameter);
-            }
-        }
-        executeMojo(session, project, execution);
-    }
-
-    /**
-     * @since 3.2.0
-     */
-    public void executeMojo(MavenSession session, MavenProject project, MojoExecution execution) throws Exception {
-        SessionScope sessionScope = lookup(SessionScope.class);
-        try {
-            sessionScope.enter();
-            sessionScope.seed(MavenSession.class, session);
-            sessionScope.seed(Session.class, session.getSession());
-
-            MojoExecutionScope executionScope = lookup(MojoExecutionScope.class);
-            try {
-                executionScope.enter();
-
-                executionScope.seed(MavenProject.class, project);
-                executionScope.seed(MojoExecution.class, execution);
-
-                Mojo mojo = lookupConfiguredMojo(session, execution);
-                mojo.execute();
-
-                MojoExecutionEvent event = new MojoExecutionEvent(session, project, execution, mojo);
-                for (MojoExecutionListener listener : getContainer().lookupList(MojoExecutionListener.class)) {
-                    listener.afterMojoExecutionSuccess(event);
-                }
-            } finally {
-                executionScope.exit();
-            }
-        } finally {
-            sessionScope.exit();
-        }
-    }
-}
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ResolverExpressionEvaluatorStub.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ResolverExpressionEvaluatorStub.java
deleted file mode 100644
index f4af2e7..0000000
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ResolverExpressionEvaluatorStub.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing;
-
-import java.io.File;
-
-import org.apache.maven.artifact.repository.MavenArtifactRepository;
-import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
-import org.codehaus.plexus.PlexusTestCase;
-import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException;
-import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator;
-
-/**
- * Stub for {@link ExpressionEvaluator}
- *
- * @author jesse
- */
-public class ResolverExpressionEvaluatorStub implements ExpressionEvaluator {
-    /** {@inheritDoc} */
-    @Override
-    public Object evaluate(String expr) throws ExpressionEvaluationException {
-
-        Object value = null;
-
-        if (expr == null) {
-            return null;
-        }
-
-        String expression = stripTokens(expr);
-
-        if (expression.equals(expr)) {
-            int index = expr.indexOf("${");
-            if (index >= 0) {
-                int lastIndex = expr.indexOf("}", index);
-                if (lastIndex >= 0) {
-                    String retVal = expr.substring(0, index);
-
-                    if (index > 0 && expr.charAt(index - 1) == '$') {
-                        retVal += expr.substring(index + 1, lastIndex + 1);
-                    } else {
-                        retVal += evaluate(expr.substring(index, lastIndex + 1));
-                    }
-
-                    retVal += evaluate(expr.substring(lastIndex + 1));
-                    return retVal;
-                }
-            }
-
-            // Was not an expression
-            if (expression.indexOf("$$") > -1) {
-                return expression.replaceAll("\\$\\$", "\\$");
-            }
-        }
-
-        if ("basedir".equals(expression) || "project.basedir".equals(expression)) {
-            return PlexusTestCase.getBasedir();
-        } else if (expression.startsWith("basedir") || expression.startsWith("project.basedir")) {
-            int pathSeparator = expression.indexOf("/");
-
-            if (pathSeparator > 0) {
-                value = PlexusTestCase.getBasedir() + expression.substring(pathSeparator);
-            } else {
-                System.out.println("Got expression '" + expression + "' that was not recognised");
-            }
-            return value;
-        } else if ("localRepository".equals(expression)) {
-            File localRepo = new File(PlexusTestCase.getBasedir(), "target/local-repo");
-            return new MavenArtifactRepository(
-                    "localRepository",
-                    "file://" + localRepo.getAbsolutePath(),
-                    new DefaultRepositoryLayout(),
-                    null,
-                    null);
-        } else {
-            return expr;
-        }
-    }
-
-    private String stripTokens(String expr) {
-        if (expr.startsWith("${") && expr.indexOf("}") == expr.length() - 1) {
-            expr = expr.substring(2, expr.length() - 1);
-        }
-
-        return expr;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public File alignToBaseDirectory(File file) {
-        if (file.getAbsolutePath().startsWith(PlexusTestCase.getBasedir())) {
-            return file;
-        } else if (file.isAbsolute()) {
-            return file;
-        } else {
-            return new File(PlexusTestCase.getBasedir(), file.getPath());
-        }
-    }
-}
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/SilentLog.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/SilentLog.java
deleted file mode 100644
index e94d81b..0000000
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/SilentLog.java
+++ /dev/null
@@ -1,330 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing;
-
-import org.apache.maven.plugin.logging.Log;
-import org.codehaus.plexus.logging.Logger;
-
-/**
- * This logger implements both types of logs currently in use. It can be injected where needed
- * to turn off logs during testing where they aren't desired.
- *
- * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
- */
-public class SilentLog implements Log, Logger {
-    /**
-     * @return <code>false</code>
-     * @see org.apache.maven.plugin.logging.Log#isDebugEnabled()
-     */
-    @Override
-    public boolean isDebugEnabled() {
-        return false;
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.plugin.logging.Log#debug(java.lang.CharSequence)
-     */
-    @Override
-    public void debug(CharSequence content) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.plugin.logging.Log#debug(java.lang.CharSequence, java.lang.Throwable)
-     */
-    @Override
-    public void debug(CharSequence content, Throwable error) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.plugin.logging.Log#debug(java.lang.Throwable)
-     */
-    @Override
-    public void debug(Throwable error) {
-        // nop
-    }
-
-    /**
-     * @return <code>false</code>
-     * @see org.apache.maven.plugin.logging.Log#isInfoEnabled()
-     */
-    @Override
-    public boolean isInfoEnabled() {
-        return false;
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.plugin.logging.Log#info(java.lang.CharSequence)
-     */
-    @Override
-    public void info(CharSequence content) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.plugin.logging.Log#info(java.lang.CharSequence, java.lang.Throwable)
-     */
-    @Override
-    public void info(CharSequence content, Throwable error) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.plugin.logging.Log#info(java.lang.Throwable)
-     */
-    @Override
-    public void info(Throwable error) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.plugin.logging.Log#isWarnEnabled()
-     */
-    @Override
-    public boolean isWarnEnabled() {
-        // nop
-        return false;
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.plugin.logging.Log#warn(java.lang.CharSequence)
-     */
-    @Override
-    public void warn(CharSequence content) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.plugin.logging.Log#warn(java.lang.CharSequence, java.lang.Throwable)
-     */
-    @Override
-    public void warn(CharSequence content, Throwable error) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.plugin.logging.Log#warn(java.lang.Throwable)
-     */
-    @Override
-    public void warn(Throwable error) {
-        // nop
-    }
-
-    /**
-     * @return <code>false</code>
-     * @see org.apache.maven.plugin.logging.Log#isErrorEnabled()
-     */
-    @Override
-    public boolean isErrorEnabled() {
-        return false;
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.plugin.logging.Log#error(java.lang.CharSequence)
-     */
-    @Override
-    public void error(CharSequence content) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.plugin.logging.Log#error(java.lang.CharSequence, java.lang.Throwable)
-     */
-    @Override
-    public void error(CharSequence content, Throwable error) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.plugin.logging.Log#error(java.lang.Throwable)
-     */
-    @Override
-    public void error(Throwable error) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.codehaus.plexus.logging.Logger#debug(java.lang.String)
-     */
-    @Override
-    public void debug(String message) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.codehaus.plexus.logging.Logger#debug(java.lang.String, java.lang.Throwable)
-     */
-    @Override
-    public void debug(String message, Throwable throwable) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.codehaus.plexus.logging.Logger#info(java.lang.String)
-     */
-    @Override
-    public void info(String message) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.codehaus.plexus.logging.Logger#info(java.lang.String, java.lang.Throwable)
-     */
-    @Override
-    public void info(String message, Throwable throwable) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.codehaus.plexus.logging.Logger#warn(java.lang.String)
-     */
-    @Override
-    public void warn(String message) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.codehaus.plexus.logging.Logger#warn(java.lang.String, java.lang.Throwable)
-     */
-    @Override
-    public void warn(String message, Throwable throwable) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.codehaus.plexus.logging.Logger#error(java.lang.String)
-     */
-    @Override
-    public void error(String message) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.codehaus.plexus.logging.Logger#error(java.lang.String, java.lang.Throwable)
-     */
-    @Override
-    public void error(String message, Throwable throwable) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.codehaus.plexus.logging.Logger#fatalError(java.lang.String)
-     */
-    @Override
-    public void fatalError(String message) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.codehaus.plexus.logging.Logger#fatalError(java.lang.String, java.lang.Throwable)
-     */
-    @Override
-    public void fatalError(String message, Throwable throwable) {
-        // nop
-    }
-
-    /**
-     * @return <code>false</code>
-     * @see org.codehaus.plexus.logging.Logger#isFatalErrorEnabled()
-     */
-    @Override
-    public boolean isFatalErrorEnabled() {
-        return false;
-    }
-
-    /**
-     * @return <code>null</code>
-     * @see org.codehaus.plexus.logging.Logger#getChildLogger(java.lang.String)
-     */
-    @Override
-    public Logger getChildLogger(String name) {
-        return null;
-    }
-
-    /**
-     * @return <code>0</code>
-     * @see org.codehaus.plexus.logging.Logger#getThreshold()
-     */
-    @Override
-    public int getThreshold() {
-        return 0;
-    }
-
-    /**
-     * @return <code>null</code>
-     * @see org.codehaus.plexus.logging.Logger#getName()
-     */
-    @Override
-    public String getName() {
-        return null;
-    }
-
-    @Override
-    public void setThreshold(int threshold) {
-        // TODO Auto-generated method stub
-
-    }
-}
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/WithoutMojo.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/WithoutMojo.java
deleted file mode 100644
index 4fa6bbf..0000000
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/WithoutMojo.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-/**
- *
- * An annotation for test methods that do not require the {@link MojoRule} to create and tear down the instance.
- *
- * @author Mirko Friedenhagen
- */
-@Retention(RUNTIME)
-@Documented
-@Target(METHOD)
-public @interface WithoutMojo {}
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/junit5/InjectMojo.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/junit5/InjectMojo.java
deleted file mode 100644
index 7b2fbdc..0000000
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/junit5/InjectMojo.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing.junit5;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- *
- */
-@Retention(RetentionPolicy.RUNTIME)
-public @interface InjectMojo {
-
-    String goal();
-
-    String pom();
-
-    boolean empty() default false;
-}
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/junit5/MojoExtension.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/junit5/MojoExtension.java
deleted file mode 100644
index c7746c2..0000000
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/junit5/MojoExtension.java
+++ /dev/null
@@ -1,454 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing.junit5;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.InputStream;
-import java.io.Reader;
-import java.io.StringReader;
-import java.lang.reflect.AccessibleObject;
-import java.lang.reflect.Field;
-import java.net.URL;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Optional;
-import java.util.Properties;
-import java.util.Set;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-import com.google.inject.internal.ProviderMethodsModule;
-import org.apache.maven.api.plugin.testing.MojoTest;
-import org.apache.maven.execution.MavenSession;
-import org.apache.maven.lifecycle.internal.MojoDescriptorCreator;
-import org.apache.maven.plugin.Mojo;
-import org.apache.maven.plugin.MojoExecution;
-import org.apache.maven.plugin.PluginParameterExpressionEvaluator;
-import org.apache.maven.plugin.descriptor.MojoDescriptor;
-import org.apache.maven.plugin.descriptor.Parameter;
-import org.apache.maven.plugin.descriptor.PluginDescriptor;
-import org.apache.maven.plugin.descriptor.PluginDescriptorBuilder;
-import org.apache.maven.plugin.logging.Log;
-import org.apache.maven.plugin.testing.ConfigurationException;
-import org.apache.maven.plugin.testing.MojoLogWrapper;
-import org.apache.maven.project.MavenProject;
-import org.codehaus.plexus.DefaultPlexusContainer;
-import org.codehaus.plexus.PlexusContainer;
-import org.codehaus.plexus.component.configurator.BasicComponentConfigurator;
-import org.codehaus.plexus.component.configurator.ComponentConfigurator;
-import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException;
-import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator;
-import org.codehaus.plexus.component.configurator.expression.TypeAwareExpressionEvaluator;
-import org.codehaus.plexus.component.repository.ComponentDescriptor;
-import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
-import org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration;
-import org.codehaus.plexus.testing.PlexusExtension;
-import org.codehaus.plexus.util.InterpolationFilterReader;
-import org.codehaus.plexus.util.ReaderFactory;
-import org.codehaus.plexus.util.ReflectionUtils;
-import org.codehaus.plexus.util.xml.XmlStreamReader;
-import org.codehaus.plexus.util.xml.Xpp3Dom;
-import org.codehaus.plexus.util.xml.Xpp3DomBuilder;
-import org.junit.jupiter.api.extension.ExtensionContext;
-import org.junit.jupiter.api.extension.ParameterContext;
-import org.junit.jupiter.api.extension.ParameterResolutionException;
-import org.junit.jupiter.api.extension.ParameterResolver;
-import org.mockito.Mockito;
-import org.slf4j.LoggerFactory;
-
-/**
- * JUnit extension to help testing Mojos. The extension should be automatically registered
- * by adding the {@link org.apache.maven.api.plugin.testing.MojoTest} annotation on the test class.
- *
- * @see MojoTest
- * @see org.apache.maven.api.plugin.testing.InjectMojo
- * @see org.apache.maven.api.plugin.testing.MojoParameter
- */
-public class MojoExtension extends PlexusExtension implements ParameterResolver {
-
-    @Override
-    public boolean supportsParameter(ParameterContext parameterContext, ExtensionContext extensionContext)
-            throws ParameterResolutionException {
-        return parameterContext.isAnnotated(InjectMojo.class)
-                || parameterContext.getDeclaringExecutable().isAnnotationPresent(InjectMojo.class);
-    }
-
-    @Override
-    public Object resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext)
-            throws ParameterResolutionException {
-        try {
-            InjectMojo injectMojo = parameterContext
-                    .findAnnotation(InjectMojo.class)
-                    .orElseGet(() -> parameterContext.getDeclaringExecutable().getAnnotation(InjectMojo.class));
-
-            Set<MojoParameter> mojoParameters =
-                    new HashSet<>(parameterContext.findRepeatableAnnotations(MojoParameter.class));
-
-            Optional.ofNullable(parameterContext.getDeclaringExecutable().getAnnotation(MojoParameter.class))
-                    .ifPresent(mojoParameters::add);
-
-            Optional.ofNullable(parameterContext.getDeclaringExecutable().getAnnotation(MojoParameters.class))
-                    .map(MojoParameters::value)
-                    .map(Arrays::asList)
-                    .ifPresent(mojoParameters::addAll);
-
-            Class<?> holder = parameterContext.getTarget().get().getClass();
-            PluginDescriptor descriptor = extensionContext
-                    .getStore(ExtensionContext.Namespace.GLOBAL)
-                    .get(PluginDescriptor.class, PluginDescriptor.class);
-            return lookupMojo(holder, injectMojo, mojoParameters, descriptor);
-        } catch (Exception e) {
-            throw new ParameterResolutionException("Unable to resolve parameter", e);
-        }
-    }
-
-    @Override
-    public void beforeEach(ExtensionContext context) throws Exception {
-        // TODO provide protected setters in PlexusExtension
-        Field field = PlexusExtension.class.getDeclaredField("basedir");
-        field.setAccessible(true);
-        field.set(null, getBasedir());
-        field = PlexusExtension.class.getDeclaredField("context");
-        field.setAccessible(true);
-        field.set(this, context);
-
-        getContainer().addComponent(getContainer(), PlexusContainer.class.getName());
-
-        ((DefaultPlexusContainer) getContainer()).addPlexusInjector(Collections.emptyList(), binder -> {
-            binder.install(ProviderMethodsModule.forObject(context.getRequiredTestInstance()));
-            binder.requestInjection(context.getRequiredTestInstance());
-            binder.bind(Log.class).toInstance(new MojoLogWrapper(LoggerFactory.getLogger("anonymous")));
-            binder.bind(MavenSession.class).toInstance(mockMavenSession());
-            binder.bind(MojoExecution.class).toInstance(mockMojoExecution());
-        });
-
-        Map<Object, Object> map = getContainer().getContext().getContextData();
-
-        ClassLoader classLoader = context.getRequiredTestClass().getClassLoader();
-        try (InputStream is = Objects.requireNonNull(
-                        classLoader.getResourceAsStream(getPluginDescriptorLocation()),
-                        "Unable to find plugin descriptor: " + getPluginDescriptorLocation());
-                Reader reader = new BufferedReader(new XmlStreamReader(is));
-                InterpolationFilterReader interpolationReader = new InterpolationFilterReader(reader, map, "${", "}")) {
-
-            PluginDescriptor pluginDescriptor = new PluginDescriptorBuilder().build(interpolationReader);
-
-            context.getStore(ExtensionContext.Namespace.GLOBAL).put(PluginDescriptor.class, pluginDescriptor);
-
-            for (ComponentDescriptor<?> desc : pluginDescriptor.getComponents()) {
-                getContainer().addComponentDescriptor(desc);
-            }
-        }
-    }
-
-    /**
-     * Default MojoExecution mock
-     *
-     * @return a MojoExecution mock
-     */
-    private MojoExecution mockMojoExecution() {
-        return Mockito.mock(MojoExecution.class);
-    }
-
-    /**
-     * Default MavenSession mock
-     *
-     * @return a MavenSession mock
-     */
-    private MavenSession mockMavenSession() {
-        MavenSession session = Mockito.mock(MavenSession.class);
-        Mockito.when(session.getUserProperties()).thenReturn(new Properties());
-        Mockito.when(session.getSystemProperties()).thenReturn(new Properties());
-        return session;
-    }
-
-    protected String getPluginDescriptorLocation() {
-        return "META-INF/maven/plugin.xml";
-    }
-
-    private Mojo lookupMojo(
-            Class<?> holder,
-            InjectMojo injectMojo,
-            Collection<MojoParameter> mojoParameters,
-            PluginDescriptor descriptor)
-            throws Exception {
-        String goal = injectMojo.goal();
-        String pom = injectMojo.pom();
-        String[] coord = mojoCoordinates(goal);
-        Xpp3Dom pomDom;
-        if (pom.startsWith("file:")) {
-            Path path = Paths.get(getBasedir()).resolve(pom.substring("file:".length()));
-            pomDom = Xpp3DomBuilder.build(ReaderFactory.newXmlReader(path.toFile()));
-        } else if (pom.startsWith("classpath:")) {
-            URL url = holder.getResource(pom.substring("classpath:".length()));
-            if (url == null) {
-                throw new IllegalStateException("Unable to find pom on classpath: " + pom);
-            }
-            pomDom = Xpp3DomBuilder.build(ReaderFactory.newXmlReader(url.openStream()));
-        } else if (pom.contains("<project>")) {
-            pomDom = Xpp3DomBuilder.build(new StringReader(pom));
-        } else {
-            Path path = Paths.get(getBasedir()).resolve(pom);
-            pomDom = Xpp3DomBuilder.build(ReaderFactory.newXmlReader(path.toFile()));
-        }
-        Xpp3Dom pluginConfiguration = extractPluginConfiguration(coord[1], pomDom);
-        if (!mojoParameters.isEmpty()) {
-            List<Xpp3Dom> children = mojoParameters.stream()
-                    .map(mp -> {
-                        Xpp3Dom c = new Xpp3Dom(mp.name());
-                        c.setValue(mp.value());
-                        return c;
-                    })
-                    .collect(Collectors.toList());
-            Xpp3Dom config = new Xpp3Dom("configuration");
-            children.forEach(config::addChild);
-            pluginConfiguration = Xpp3Dom.mergeXpp3Dom(config, pluginConfiguration);
-        }
-        Mojo mojo = lookupMojo(coord, pluginConfiguration, descriptor);
-        return mojo;
-    }
-
-    protected String[] mojoCoordinates(String goal) throws Exception {
-        if (goal.matches(".*:.*:.*:.*")) {
-            return goal.split(":");
-        } else {
-            Path pluginPom = Paths.get(getBasedir(), "pom.xml");
-            Xpp3Dom pluginPomDom = Xpp3DomBuilder.build(ReaderFactory.newXmlReader(pluginPom.toFile()));
-            String artifactId = pluginPomDom.getChild("artifactId").getValue();
-            String groupId = resolveFromRootThenParent(pluginPomDom, "groupId");
-            String version = resolveFromRootThenParent(pluginPomDom, "version");
-            return new String[] {groupId, artifactId, version, goal};
-        }
-    }
-
-    /**
-     * lookup the mojo while we have all the relevent information
-     */
-    protected Mojo lookupMojo(String[] coord, Xpp3Dom pluginConfiguration, PluginDescriptor descriptor)
-            throws Exception {
-        // pluginkey = groupId : artifactId : version : goal
-        Mojo mojo = lookup(Mojo.class, coord[0] + ":" + coord[1] + ":" + coord[2] + ":" + coord[3]);
-        for (MojoDescriptor mojoDescriptor : descriptor.getMojos()) {
-            if (Objects.equals(
-                    mojoDescriptor.getImplementation(), mojo.getClass().getName())) {
-                if (pluginConfiguration != null) {
-                    pluginConfiguration = finalizeConfig(pluginConfiguration, mojoDescriptor);
-                }
-            }
-        }
-        if (pluginConfiguration != null) {
-            MavenSession session = getContainer().lookup(MavenSession.class);
-            MavenProject project;
-            try {
-                project = getContainer().lookup(MavenProject.class);
-            } catch (ComponentLookupException e) {
-                project = null;
-            }
-            MojoExecution mojoExecution;
-            try {
-                mojoExecution = getContainer().lookup(MojoExecution.class);
-            } catch (ComponentLookupException e) {
-                mojoExecution = null;
-            }
-            ExpressionEvaluator evaluator =
-                    new WrapEvaluator(getContainer(), new PluginParameterExpressionEvaluator(session, mojoExecution));
-            ComponentConfigurator configurator = new BasicComponentConfigurator();
-            configurator.configureComponent(
-                    mojo,
-                    new XmlPlexusConfiguration(pluginConfiguration),
-                    evaluator,
-                    getContainer().getContainerRealm());
-        }
-
-        mojo.setLog(getContainer().lookup(Log.class));
-
-        return mojo;
-    }
-
-    private Xpp3Dom finalizeConfig(Xpp3Dom config, MojoDescriptor mojoDescriptor) {
-        List<Xpp3Dom> children = new ArrayList<>();
-        if (mojoDescriptor != null && mojoDescriptor.getParameters() != null) {
-            Xpp3Dom defaultConfiguration = MojoDescriptorCreator.convert(mojoDescriptor);
-            for (Parameter parameter : mojoDescriptor.getParameters()) {
-                Xpp3Dom parameterConfiguration = config.getChild(parameter.getName());
-                if (parameterConfiguration == null) {
-                    parameterConfiguration = config.getChild(parameter.getAlias());
-                }
-                Xpp3Dom parameterDefaults = defaultConfiguration.getChild(parameter.getName());
-                parameterConfiguration = Xpp3Dom.mergeXpp3Dom(parameterConfiguration, parameterDefaults, Boolean.TRUE);
-                if (parameterConfiguration != null) {
-                    if (isEmpty(parameterConfiguration.getAttribute("implementation"))
-                            && !isEmpty(parameter.getImplementation())) {
-                        parameterConfiguration.setAttribute("implementation", parameter.getImplementation());
-                    }
-                    children.add(parameterConfiguration);
-                }
-            }
-        }
-        Xpp3Dom c = new Xpp3Dom("configuration");
-        children.forEach(c::addChild);
-        return c;
-    }
-
-    private boolean isEmpty(String str) {
-        return str == null || str.isEmpty();
-    }
-
-    private static Optional<Xpp3Dom> child(Xpp3Dom element, String name) {
-        return Optional.ofNullable(element.getChild(name));
-    }
-
-    private static Stream<Xpp3Dom> children(Xpp3Dom element) {
-        return Stream.of(element.getChildren());
-    }
-
-    public static Xpp3Dom extractPluginConfiguration(String artifactId, Xpp3Dom pomDom) throws Exception {
-        Xpp3Dom pluginConfigurationElement = child(pomDom, "build")
-                .flatMap(buildElement -> child(buildElement, "plugins"))
-                .map(MojoExtension::children)
-                .orElseGet(Stream::empty)
-                .filter(e -> e.getChild("artifactId").getValue().equals(artifactId))
-                .findFirst()
-                .flatMap(buildElement -> child(buildElement, "configuration"))
-                .orElseThrow(
-                        () -> new ConfigurationException("Cannot find a configuration element for a plugin with an "
-                                + "artifactId of " + artifactId + "."));
-        return pluginConfigurationElement;
-    }
-
-    /**
-     * sometimes the parent element might contain the correct value so generalize that access
-     *
-     * TODO find out where this is probably done elsewhere
-     */
-    private static String resolveFromRootThenParent(Xpp3Dom pluginPomDom, String element) throws Exception {
-        return Optional.ofNullable(child(pluginPomDom, element).orElseGet(() -> child(pluginPomDom, "parent")
-                        .flatMap(e -> child(e, element))
-                        .orElse(null)))
-                .map(Xpp3Dom::getValue)
-                .orElseThrow(() -> new Exception("unable to determine " + element));
-    }
-
-    /**
-     * Convenience method to obtain the value of a variable on a mojo that might not have a getter.
-     * <br>
-     * Note: the caller is responsible for casting to what the desired type is.
-     */
-    public static Object getVariableValueFromObject(Object object, String variable) throws IllegalAccessException {
-        Field field = ReflectionUtils.getFieldByNameIncludingSuperclasses(variable, object.getClass());
-        field.setAccessible(true);
-        return field.get(object);
-    }
-
-    /**
-     * Convenience method to obtain all variables and values from the mojo (including its superclasses)
-     * <br>
-     * Note: the values in the map are of type Object so the caller is responsible for casting to desired types.
-     */
-    public static Map<String, Object> getVariablesAndValuesFromObject(Object object) throws IllegalAccessException {
-        return getVariablesAndValuesFromObject(object.getClass(), object);
-    }
-
-    /**
-     * Convenience method to obtain all variables and values from the mojo (including its superclasses)
-     * <br>
-     * Note: the values in the map are of type Object so the caller is responsible for casting to desired types.
-     *
-     * @return map of variable names and values
-     */
-    public static Map<String, Object> getVariablesAndValuesFromObject(Class<?> clazz, Object object)
-            throws IllegalAccessException {
-        Map<String, Object> map = new HashMap<>();
-        Field[] fields = clazz.getDeclaredFields();
-        AccessibleObject.setAccessible(fields, true);
-        for (Field field : fields) {
-            map.put(field.getName(), field.get(object));
-        }
-        Class<?> superclass = clazz.getSuperclass();
-        if (!Object.class.equals(superclass)) {
-            map.putAll(getVariablesAndValuesFromObject(superclass, object));
-        }
-        return map;
-    }
-
-    /**
-     * Convenience method to set values to variables in objects that don't have setters
-     */
-    public static void setVariableValueToObject(Object object, String variable, Object value)
-            throws IllegalAccessException {
-        Field field = ReflectionUtils.getFieldByNameIncludingSuperclasses(variable, object.getClass());
-        Objects.requireNonNull(field, "Field " + variable + " not found");
-        field.setAccessible(true);
-        field.set(object, value);
-    }
-
-    static class WrapEvaluator implements TypeAwareExpressionEvaluator {
-
-        private final PlexusContainer container;
-        private final TypeAwareExpressionEvaluator evaluator;
-
-        WrapEvaluator(PlexusContainer container, TypeAwareExpressionEvaluator evaluator) {
-            this.container = container;
-            this.evaluator = evaluator;
-        }
-
-        @Override
-        public Object evaluate(String expression) throws ExpressionEvaluationException {
-            return evaluate(expression, null);
-        }
-
-        @Override
-        public Object evaluate(String expression, Class<?> type) throws ExpressionEvaluationException {
-            Object value = evaluator.evaluate(expression, type);
-            if (value == null) {
-                String expr = stripTokens(expression);
-                if (expr != null) {
-                    try {
-                        value = container.lookup(type, expr);
-                    } catch (ComponentLookupException e) {
-                        // nothing
-                    }
-                }
-            }
-            return value;
-        }
-
-        private String stripTokens(String expr) {
-            if (expr.startsWith("${") && expr.endsWith("}")) {
-                return expr.substring(2, expr.length() - 1);
-            }
-            return null;
-        }
-
-        @Override
-        public File alignToBaseDirectory(File path) {
-            return evaluator.alignToBaseDirectory(path);
-        }
-    }
-}
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/junit5/MojoParameter.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/junit5/MojoParameter.java
deleted file mode 100644
index a3a8294..0000000
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/junit5/MojoParameter.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing.junit5;
-
-import java.lang.annotation.Repeatable;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * Mojo parameter
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Repeatable(MojoParameters.class)
-public @interface MojoParameter {
-    String name();
-
-    String value();
-}
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/junit5/MojoParameters.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/junit5/MojoParameters.java
deleted file mode 100644
index 33c0a23..0000000
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/junit5/MojoParameters.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing.junit5;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * Mojo parameters container
- */
-@Retention(RetentionPolicy.RUNTIME)
-public @interface MojoParameters {
-    MojoParameter[] value();
-}
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/junit5/MojoTest.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/junit5/MojoTest.java
deleted file mode 100644
index 09461bd..0000000
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/junit5/MojoTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing.junit5;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.junit.jupiter.api.extension.ExtendWith;
-
-/**
- *
- */
-@Retention(RetentionPolicy.RUNTIME)
-@ExtendWith(MojoExtension.class)
-@Target(ElementType.TYPE)
-public @interface MojoTest {}
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/resources/TestResources.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/resources/TestResources.java
deleted file mode 100644
index 54343f1..0000000
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/resources/TestResources.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing.resources;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Set;
-import java.util.TreeSet;
-
-import org.codehaus.plexus.util.DirectoryScanner;
-import org.codehaus.plexus.util.FileUtils;
-import org.junit.Assert;
-import org.junit.Rule;
-import org.junit.rules.TestWatcher;
-import org.junit.runner.Description;
-
-/**
- * Junit4 test {@link Rule} to extract and assert test resources.
- *
- * @since 3.1.0
- */
-public class TestResources extends TestWatcher {
-
-    private final String projectsDir;
-
-    private final String workDir;
-
-    public TestResources() {
-        this("src/test/projects", "target/test-projects");
-    }
-
-    public TestResources(String projectsDir, String workDir) {
-        this.projectsDir = projectsDir;
-        this.workDir = workDir;
-    }
-
-    private String name;
-
-    @Override
-    protected void starting(Description d) {
-        String methodName = d.getMethodName();
-        if (methodName != null) {
-            methodName = methodName.replace('/', '_').replace('\\', '_');
-        }
-        name = d.getTestClass().getSimpleName() + "_" + methodName;
-    }
-
-    /**
-     * Creates new clean copy of test project directory structure. The copy is named after both the test being executed
-     * and test project name, which allows the same test project can be used by multiple tests and by different
-     * instances of the same parametrized tests.
-     * <p>
-     * TODO Provide alternative working directory naming for Windows, which still limits path names to ~250 charecters
-     */
-    public File getBasedir(String project) throws IOException {
-        if (name == null) {
-            throw new IllegalStateException(
-                    getClass().getSimpleName() + " must be a test class field annotated with org.junit.Rule");
-        }
-        File src = new File(projectsDir, project).getCanonicalFile();
-        Assert.assertTrue("Test project directory does not exist: " + src.getPath(), src.isDirectory());
-        File basedir = new File(workDir, name + "_" + project).getCanonicalFile();
-        FileUtils.deleteDirectory(basedir);
-        Assert.assertTrue("Test project working directory created", basedir.mkdirs());
-        FileUtils.copyDirectoryStructure(src, basedir);
-        return basedir;
-    }
-
-    // static helpers
-
-    public static void cp(File basedir, String from, String to) throws IOException {
-        // TODO ensure destination lastModified timestamp changes
-        FileUtils.copyFile(new File(basedir, from), new File(basedir, to));
-    }
-
-    public static void assertFileContents(File basedir, String expectedPath, String actualPath) throws IOException {
-        String expected = FileUtils.fileRead(new File(basedir, expectedPath));
-        String actual = FileUtils.fileRead(new File(basedir, actualPath));
-        Assert.assertEquals(expected, actual);
-    }
-
-    public static void assertDirectoryContents(File dir, String... expectedPaths) {
-        DirectoryScanner scanner = new DirectoryScanner();
-        scanner.setBasedir(dir);
-        scanner.addDefaultExcludes();
-        scanner.scan();
-
-        Set<String> actual = new TreeSet<>();
-        for (String path : scanner.getIncludedFiles()) {
-            actual.add(path);
-        }
-        for (String path : scanner.getIncludedDirectories()) {
-            if (path.length() > 0) {
-                actual.add(path + "/");
-            }
-        }
-
-        Set<String> expected = new TreeSet<>();
-        if (expectedPaths != null) {
-            for (String path : expectedPaths) {
-                expected.add(path);
-            }
-        }
-
-        // compare textual representation to make diff easier to understand
-        Assert.assertEquals(toString(expected), toString(actual));
-    }
-
-    private static String toString(Collection<String> strings) {
-        StringBuilder sb = new StringBuilder();
-        for (String string : strings) {
-            sb.append(string).append('\n');
-        }
-        return sb.toString();
-    }
-
-    public static void touch(File basedir, String path) throws InterruptedException {
-        touch(new File(basedir, path));
-    }
-
-    public static void touch(File file) throws InterruptedException {
-        if (!file.isFile()) {
-            throw new IllegalArgumentException("Not a file " + file);
-        }
-        long lastModified = file.lastModified();
-        file.setLastModified(System.currentTimeMillis());
-
-        // TODO do modern filesystems still have this silly lastModified resolution?
-        if (lastModified == file.lastModified()) {
-            Thread.sleep(1000L);
-            file.setLastModified(System.currentTimeMillis());
-        }
-    }
-
-    public static void rm(File basedir, String path) {
-        Assert.assertTrue("delete " + path, new File(basedir, path).delete());
-    }
-
-    /**
-     * @since 3.2.0
-     */
-    public static void create(File basedir, String... paths) throws IOException {
-        if (paths == null || paths.length == 0) {
-            throw new IllegalArgumentException();
-        }
-        for (String path : paths) {
-            File file = new File(basedir, path);
-            Assert.assertTrue(file.getParentFile().mkdirs());
-            file.createNewFile();
-            Assert.assertTrue(file.isFile() && file.canRead());
-        }
-    }
-}
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/ArtifactStub.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/ArtifactStub.java
deleted file mode 100644
index edbaa9e..0000000
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/ArtifactStub.java
+++ /dev/null
@@ -1,496 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing.stubs;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.handler.ArtifactHandler;
-import org.apache.maven.artifact.metadata.ArtifactMetadata;
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
-import org.apache.maven.artifact.versioning.ArtifactVersion;
-import org.apache.maven.artifact.versioning.OverConstrainedVersionException;
-import org.apache.maven.artifact.versioning.VersionRange;
-
-/**
- * Stub class for {@link Artifact} testing.
- *
- * @author jesse
- */
-public class ArtifactStub implements Artifact {
-    private String groupId;
-
-    private String artifactId;
-
-    private String version;
-
-    private String scope;
-
-    private String type;
-
-    private String classifier;
-
-    private File file;
-
-    private ArtifactRepository artifactRepository;
-
-    /**
-     * By default, return <code>0</code>
-     *
-     * @see java.lang.Comparable#compareTo(java.lang.Object)
-     */
-    @Override
-    public int compareTo(Artifact artifact) {
-        return 0;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String getGroupId() {
-        return groupId;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String getArtifactId() {
-        return artifactId;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String getVersion() {
-        return version;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setVersion(String version) {
-        this.version = version;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String getScope() {
-        return scope;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String getType() {
-        return type;
-    }
-
-    /**
-     * Set a new type
-     *
-     * @param type
-     */
-    public void setType(String type) {
-        this.type = type;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String getClassifier() {
-        return classifier;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public boolean hasClassifier() {
-        return classifier != null;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public File getFile() {
-        return file;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setFile(File file) {
-        this.file = file;
-    }
-
-    /**
-     * @return <code>null</code>.
-     * @see org.apache.maven.artifact.Artifact#getBaseVersion()
-     */
-    @Override
-    public String getBaseVersion() {
-        return null;
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.artifact.Artifact#setBaseVersion(java.lang.String)
-     */
-    @Override
-    public void setBaseVersion(String string) {
-        // nop
-    }
-
-    /**
-     * @return <code>null</code>.
-     * @see org.apache.maven.artifact.Artifact#getId()
-     */
-    @Override
-    public String getId() {
-        return null;
-    }
-
-    /**
-     * @return <code>groupId:artifactId:type:classifier</code>.
-     * @see org.apache.maven.artifact.Artifact#getDependencyConflictId()
-     */
-    @Override
-    public String getDependencyConflictId() {
-        StringBuffer buffer = new StringBuffer();
-
-        buffer.append(getGroupId());
-        buffer.append(":").append(getArtifactId());
-        buffer.append(":").append(getType());
-        buffer.append(":").append(getClassifier());
-
-        return buffer.toString();
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.artifact.Artifact#addMetadata(org.apache.maven.artifact.metadata.ArtifactMetadata)
-     */
-    @Override
-    public void addMetadata(ArtifactMetadata artifactMetadata) {
-        // nop
-    }
-
-    /**
-     * @return <code>null</code>.
-     * @see org.apache.maven.artifact.Artifact#getMetadataList()
-     */
-    @Override
-    public Collection<ArtifactMetadata> getMetadataList() {
-        return null;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setRepository(ArtifactRepository artifactRepository) {
-        this.artifactRepository = artifactRepository;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public ArtifactRepository getRepository() {
-        return artifactRepository;
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.artifact.Artifact#updateVersion(java.lang.String, org.apache.maven.artifact.repository.ArtifactRepository)
-     */
-    @Override
-    public void updateVersion(String string, ArtifactRepository artifactRepository) {
-        // nop
-    }
-
-    /**
-     * @return <code>null</code>.
-     * @see org.apache.maven.artifact.Artifact#getDownloadUrl()
-     */
-    @Override
-    public String getDownloadUrl() {
-        return null;
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.artifact.Artifact#setDownloadUrl(java.lang.String)
-     */
-    @Override
-    public void setDownloadUrl(String string) {
-        // nop
-    }
-
-    /**
-     * @return <code>null</code>.
-     * @see org.apache.maven.artifact.Artifact#getDependencyFilter()
-     */
-    @Override
-    public ArtifactFilter getDependencyFilter() {
-        return null;
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.artifact.Artifact#setDependencyFilter(org.apache.maven.artifact.resolver.filter.ArtifactFilter)
-     */
-    @Override
-    public void setDependencyFilter(ArtifactFilter artifactFilter) {
-        // nop
-    }
-
-    /**
-     * @return <code>null</code>.
-     * @see org.apache.maven.artifact.Artifact#getArtifactHandler()
-     */
-    @Override
-    public ArtifactHandler getArtifactHandler() {
-        return null;
-    }
-
-    /**
-     * @return <code>null</code>.
-     * @see org.apache.maven.artifact.Artifact#getDependencyTrail()
-     */
-    @Override
-    public List<String> getDependencyTrail() {
-        return null;
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.artifact.Artifact#setDependencyTrail(java.util.List)
-     */
-    @Override
-    public void setDependencyTrail(List<String> list) {
-        // nop
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setScope(String scope) {
-        this.scope = scope;
-    }
-
-    /**
-     * @return <code>null</code>.
-     * @see org.apache.maven.artifact.Artifact#getVersionRange()
-     */
-    @Override
-    public VersionRange getVersionRange() {
-        return null;
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.artifact.Artifact#setVersionRange(org.apache.maven.artifact.versioning.VersionRange)
-     */
-    @Override
-    public void setVersionRange(VersionRange versionRange) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.artifact.Artifact#selectVersion(java.lang.String)
-     */
-    @Override
-    public void selectVersion(String string) {
-        // nop
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setGroupId(String groupId) {
-        this.groupId = groupId;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setArtifactId(String artifactId) {
-        this.artifactId = artifactId;
-    }
-
-    /**
-     * @return <code>false</code>.
-     * @see org.apache.maven.artifact.Artifact#isSnapshot()
-     */
-    @Override
-    public boolean isSnapshot() {
-        return Artifact.VERSION_FILE_PATTERN.matcher(getVersion()).matches()
-                || getVersion().endsWith(Artifact.SNAPSHOT_VERSION);
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.artifact.Artifact#setResolved(boolean)
-     */
-    @Override
-    public void setResolved(boolean b) {
-        // nop
-    }
-
-    /**
-     * @return <code>false</code>.
-     * @see org.apache.maven.artifact.Artifact#isResolved()
-     */
-    @Override
-    public boolean isResolved() {
-        return false;
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.artifact.Artifact#setResolvedVersion(java.lang.String)
-     */
-    @Override
-    public void setResolvedVersion(String string) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.artifact.Artifact#setArtifactHandler(org.apache.maven.artifact.handler.ArtifactHandler)
-     */
-    @Override
-    public void setArtifactHandler(ArtifactHandler artifactHandler) {
-        // nop
-    }
-
-    /**
-     * @return <code>false</code>.
-     * @see org.apache.maven.artifact.Artifact#isRelease()
-     */
-    @Override
-    public boolean isRelease() {
-        return !isSnapshot();
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.artifact.Artifact#setRelease(boolean)
-     */
-    @Override
-    public void setRelease(boolean b) {
-        // nop
-    }
-
-    /**
-     * @return <code>null</code>.
-     * @see org.apache.maven.artifact.Artifact#getAvailableVersions()
-     */
-    @Override
-    public List<ArtifactVersion> getAvailableVersions() {
-        return null;
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.artifact.Artifact#setAvailableVersions(java.util.List)
-     */
-    @Override
-    public void setAvailableVersions(List<ArtifactVersion> list) {
-        // nop
-    }
-
-    /**
-     * @return <code>false</code>.
-     * @see org.apache.maven.artifact.Artifact#isOptional()
-     */
-    @Override
-    public boolean isOptional() {
-        return false;
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @param b
-     */
-    @Override
-    public void setOptional(boolean b) {
-        // nop
-    }
-
-    /**
-     * @return <code>null</code>.
-     * @see org.apache.maven.artifact.Artifact#getSelectedVersion()
-     */
-    @Override
-    public ArtifactVersion getSelectedVersion() throws OverConstrainedVersionException {
-        return null;
-    }
-
-    /**
-     * @return <code>false</code>.
-     * @see org.apache.maven.artifact.Artifact#isSelectedVersionKnown()
-     */
-    @Override
-    public boolean isSelectedVersionKnown() throws OverConstrainedVersionException {
-        return false;
-    }
-
-    /**
-     * @see java.lang.Object#toString()
-     */
-    @Override
-    public String toString() {
-        StringBuffer sb = new StringBuffer();
-        if (getGroupId() != null) {
-            sb.append(getGroupId());
-            sb.append(":");
-        }
-        appendArtifactTypeClassifierString(sb);
-        if (version != null) {
-            sb.append(":");
-            sb.append(getVersion());
-        }
-        if (scope != null) {
-            sb.append(":");
-            sb.append(scope);
-        }
-        return sb.toString();
-    }
-
-    private void appendArtifactTypeClassifierString(StringBuffer sb) {
-        sb.append(getArtifactId());
-        sb.append(":");
-        sb.append(getType());
-        if (hasClassifier()) {
-            sb.append(":");
-            sb.append(getClassifier());
-        }
-    }
-
-    public boolean isFromAuthoritativeRepository() {
-        return true;
-    }
-
-    public void setFromAuthoritativeRepository(boolean fromAuthoritativeRepository) {
-        // nothing
-    }
-}
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/DefaultArtifactHandlerStub.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/DefaultArtifactHandlerStub.java
deleted file mode 100644
index 5c5fe7a..0000000
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/DefaultArtifactHandlerStub.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing.stubs;
-
-import org.apache.maven.artifact.handler.ArtifactHandler;
-
-/**
- * Minimal artifact handler used by the stub factory to create unpackable archives.
- *
- * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
- */
-public class DefaultArtifactHandlerStub implements ArtifactHandler {
-    private String extension;
-
-    private String type;
-
-    private String classifier;
-
-    private String directory;
-
-    private String packaging;
-
-    private boolean includesDependencies;
-
-    private String language;
-
-    private boolean addedToClasspath;
-
-    /**
-     * @param t the artifact handler type
-     * @param c the artifact handler classifier
-     */
-    public DefaultArtifactHandlerStub(String t, String c) {
-        type = t;
-        classifier = c;
-        if (t.equals("test-jar")) {
-            extension = "jar";
-        }
-    }
-
-    /**
-     * @param type the artifact handler type
-     */
-    public DefaultArtifactHandlerStub(String type) {
-        this.type = type;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String getExtension() {
-        if (extension == null) {
-            extension = type;
-        }
-        return extension;
-    }
-
-    /**
-     * @return the artifact handler type
-     */
-    public String getType() {
-        return type;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String getClassifier() {
-        return classifier;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String getDirectory() {
-        if (directory == null) {
-            directory = getPackaging() + "s";
-        }
-        return directory;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String getPackaging() {
-        if (packaging == null) {
-            packaging = getType();
-        }
-        return packaging;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public boolean isIncludesDependencies() {
-        return includesDependencies;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String getLanguage() {
-        if (language == null) {
-            language = "none";
-        }
-
-        return language;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public boolean isAddedToClasspath() {
-        return addedToClasspath;
-    }
-
-    /**
-     * @param theAddedToClasspath The addedToClasspath to set.
-     */
-    public void setAddedToClasspath(boolean theAddedToClasspath) {
-        this.addedToClasspath = theAddedToClasspath;
-    }
-
-    /**
-     * @param theClassifier The classifier to set.
-     */
-    public void setClassifier(String theClassifier) {
-        this.classifier = theClassifier;
-    }
-
-    /**
-     * @param theDirectory The directory to set.
-     */
-    public void setDirectory(String theDirectory) {
-        this.directory = theDirectory;
-    }
-
-    /**
-     * @param theExtension The extension to set.
-     */
-    public void setExtension(String theExtension) {
-        this.extension = theExtension;
-    }
-
-    /**
-     * @param theIncludesDependencies The includesDependencies to set.
-     */
-    public void setIncludesDependencies(boolean theIncludesDependencies) {
-        this.includesDependencies = theIncludesDependencies;
-    }
-
-    /**
-     * @param theLanguage The language to set.
-     */
-    public void setLanguage(String theLanguage) {
-        this.language = theLanguage;
-    }
-
-    /**
-     * @param thePackaging The packaging to set.
-     */
-    public void setPackaging(String thePackaging) {
-        this.packaging = thePackaging;
-    }
-
-    /**
-     * @param theType The type to set.
-     */
-    public void setType(String theType) {
-        this.type = theType;
-    }
-}
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/MavenProjectStub.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/MavenProjectStub.java
deleted file mode 100644
index 513629b..0000000
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/MavenProjectStub.java
+++ /dev/null
@@ -1,1487 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing.stubs;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.Writer;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.DependencyResolutionRequiredException;
-import org.apache.maven.artifact.factory.ArtifactFactory;
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
-import org.apache.maven.model.Build;
-import org.apache.maven.model.CiManagement;
-import org.apache.maven.model.Contributor;
-import org.apache.maven.model.Dependency;
-import org.apache.maven.model.DependencyManagement;
-import org.apache.maven.model.Developer;
-import org.apache.maven.model.DistributionManagement;
-import org.apache.maven.model.Extension;
-import org.apache.maven.model.IssueManagement;
-import org.apache.maven.model.License;
-import org.apache.maven.model.MailingList;
-import org.apache.maven.model.Model;
-import org.apache.maven.model.Organization;
-import org.apache.maven.model.Plugin;
-import org.apache.maven.model.PluginManagement;
-import org.apache.maven.model.Prerequisites;
-import org.apache.maven.model.Profile;
-import org.apache.maven.model.ReportPlugin;
-import org.apache.maven.model.Reporting;
-import org.apache.maven.model.Repository;
-import org.apache.maven.model.Resource;
-import org.apache.maven.model.Scm;
-import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
-import org.apache.maven.project.MavenProject;
-import org.codehaus.plexus.PlexusTestCase;
-import org.codehaus.plexus.util.ReaderFactory;
-import org.codehaus.plexus.util.xml.Xpp3Dom;
-import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
-
-/**
- * Very simple stub of <code>MavenProject</code> object, going to take a lot of work to make it
- * useful as a stub though.
- *
- * @author jesse
- */
-public class MavenProjectStub extends MavenProject {
-    private String groupId;
-
-    private String artifactId;
-
-    private String name;
-
-    private Model model;
-
-    private MavenProject parent;
-
-    private File file;
-
-    private List<MavenProject> collectedProjects;
-
-    private List<Artifact> attachedArtifacts;
-
-    private List<String> compileSourceRoots;
-
-    private List<String> testCompileSourceRoots;
-
-    private List<String> scriptSourceRoots;
-
-    private List<ArtifactRepository> pluginArtifactRepositories;
-
-    private ArtifactRepository releaseArtifactRepository;
-
-    private ArtifactRepository snapshotArtifactRepository;
-
-    private List<Profile> activeProfiles;
-
-    private Set<Artifact> dependencyArtifacts;
-
-    private Artifact artifact;
-
-    private Map<String, Artifact> artifactMap;
-
-    private Model originalModel;
-
-    private Map<String, Artifact> pluginArtifactMap;
-
-    private Map<String, Artifact> reportArtifactMap;
-
-    private Map<String, Artifact> extensionArtifactMap;
-
-    private Map<String, MavenProject> projectReferences;
-
-    private Build buildOverlay;
-
-    private boolean executionRoot;
-
-    private List<Artifact> compileArtifacts;
-
-    private List<Dependency> compileDependencies;
-
-    private List<Dependency> systemDependencies;
-
-    private List<String> testClasspathElements;
-
-    private List<Dependency> testDependencies;
-
-    private List<String> systemClasspathElements;
-
-    private List<Artifact> systemArtifacts;
-
-    private List<Artifact> testArtifacts;
-
-    private List<Artifact> runtimeArtifacts;
-
-    private List<Dependency> runtimeDependencies;
-
-    private List<String> runtimeClasspathElements;
-
-    private String modelVersion;
-
-    private String packaging;
-
-    private String inceptionYear;
-
-    private String url;
-
-    private String description;
-
-    private String version;
-
-    private String defaultGoal;
-
-    private List<License> licenses;
-
-    private Build build;
-
-    /**
-     * Default constructor
-     */
-    public MavenProjectStub() {
-        this(new Model());
-    }
-
-    /**
-     * @param model the given model
-     */
-    public MavenProjectStub(Model model) {
-        super((Model) null);
-        this.model = model;
-    }
-
-    /**
-     * Loads the model for this stub from the specified POM. For convenience, any checked exception caused by I/O or
-     * parser errors will be wrapped into an unchecked exception.
-     *
-     * @param pomFile The path to the POM file to load, must not be <code>null</code>. If this path is relative, it
-     *            is resolved against the return value of {@link #getBasedir()}.
-     */
-    protected void readModel(File pomFile) {
-        if (!pomFile.isAbsolute()) {
-            pomFile = new File(getBasedir(), pomFile.getPath());
-        }
-        try {
-            setModel(new MavenXpp3Reader().read(ReaderFactory.newXmlReader(pomFile)));
-        } catch (IOException e) {
-            throw new RuntimeException("Failed to read POM file: " + pomFile, e);
-        } catch (XmlPullParserException e) {
-            throw new RuntimeException("Failed to parse POM file: " + pomFile, e);
-        }
-    }
-
-    /**
-     * No project model is associated
-     *
-     * @param project the given project
-     */
-    public MavenProjectStub(MavenProject project) {
-        super((Model) null);
-    }
-
-    /**
-     * @param mavenProject
-     * @return an empty String
-     * @throws IOException if any
-     */
-    @Override
-    public String getModulePathAdjustment(MavenProject mavenProject) throws IOException {
-        return "";
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public Artifact getArtifact() {
-        return artifact;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setArtifact(Artifact artifact) {
-        this.artifact = artifact;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public Model getModel() {
-        return model;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public MavenProject getParent() {
-        return parent;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setParent(MavenProject mavenProject) {
-        this.parent = mavenProject;
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#setRemoteArtifactRepositories(java.util.List)
-     */
-    @Override
-    public void setRemoteArtifactRepositories(List<ArtifactRepository> list) {
-        // nop
-    }
-
-    /**
-     * By default, return <code>Collections.EMPTY_LIST</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getRemoteArtifactRepositories()
-     */
-    @Override
-    public List<ArtifactRepository> getRemoteArtifactRepositories() {
-        return Collections.<ArtifactRepository>emptyList();
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public boolean hasParent() {
-        if (parent != null) {
-            return true;
-        }
-
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public File getFile() {
-        return file;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setFile(File file) {
-        this.file = file;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public File getBasedir() {
-        return new File(PlexusTestCase.getBasedir());
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#setDependencies(java.util.List)
-     */
-    @Override
-    public void setDependencies(List<Dependency> list) {
-        // nop
-    }
-
-    /**
-     * By default, return <code>Collections.EMPTY_LIST</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getDependencies()
-     */
-    @Override
-    public List<Dependency> getDependencies() {
-        return Collections.<Dependency>emptyList();
-    }
-
-    /**
-     * By default, return <code>null</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getDependencyManagement()
-     */
-    @Override
-    public DependencyManagement getDependencyManagement() {
-        return null;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void addCompileSourceRoot(String string) {
-        if (compileSourceRoots == null) {
-            compileSourceRoots = new ArrayList<>(Collections.singletonList(string));
-        } else {
-            compileSourceRoots.add(string);
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void addScriptSourceRoot(String string) {
-        if (scriptSourceRoots == null) {
-            scriptSourceRoots = new ArrayList<>(Collections.singletonList(string));
-        } else {
-            scriptSourceRoots.add(string);
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void addTestCompileSourceRoot(String string) {
-        if (testCompileSourceRoots == null) {
-            testCompileSourceRoots = new ArrayList<>(Collections.singletonList(string));
-        } else {
-            testCompileSourceRoots.add(string);
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public List<String> getCompileSourceRoots() {
-        return compileSourceRoots;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public List<String> getScriptSourceRoots() {
-        return scriptSourceRoots;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public List<String> getTestCompileSourceRoots() {
-        return testCompileSourceRoots;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public List<String> getCompileClasspathElements() throws DependencyResolutionRequiredException {
-        return compileSourceRoots;
-    }
-
-    /**
-     * @param compileArtifacts
-     */
-    public void setCompileArtifacts(List<Artifact> compileArtifacts) {
-        this.compileArtifacts = compileArtifacts;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public List<Artifact> getCompileArtifacts() {
-        return compileArtifacts;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public List<Dependency> getCompileDependencies() {
-        return compileDependencies;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public List<String> getTestClasspathElements() throws DependencyResolutionRequiredException {
-        return testClasspathElements;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public List<Artifact> getTestArtifacts() {
-        return testArtifacts;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public List<Dependency> getTestDependencies() {
-        return testDependencies;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public List<String> getRuntimeClasspathElements() throws DependencyResolutionRequiredException {
-        return runtimeClasspathElements;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public List<Artifact> getRuntimeArtifacts() {
-        return runtimeArtifacts;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public List<Dependency> getRuntimeDependencies() {
-        return runtimeDependencies;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public List<String> getSystemClasspathElements() throws DependencyResolutionRequiredException {
-        return systemClasspathElements;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public List<Artifact> getSystemArtifacts() {
-        return systemArtifacts;
-    }
-
-    /**
-     * @param runtimeClasspathElements
-     */
-    public void setRuntimeClasspathElements(List<String> runtimeClasspathElements) {
-        this.runtimeClasspathElements = runtimeClasspathElements;
-    }
-
-    /**
-     * @param attachedArtifacts
-     */
-    @Override
-    public void setAttachedArtifacts(List<Artifact> attachedArtifacts) {
-        this.attachedArtifacts = attachedArtifacts;
-    }
-
-    /**
-     * @param compileSourceRoots
-     */
-    @Override
-    public void setCompileSourceRoots(List<String> compileSourceRoots) {
-        this.compileSourceRoots = compileSourceRoots;
-    }
-
-    /**
-     * @param testCompileSourceRoots
-     */
-    @Override
-    public void setTestCompileSourceRoots(List<String> testCompileSourceRoots) {
-        this.testCompileSourceRoots = testCompileSourceRoots;
-    }
-
-    /**
-     * @param scriptSourceRoots
-     */
-    @Override
-    public void setScriptSourceRoots(List<String> scriptSourceRoots) {
-        this.scriptSourceRoots = scriptSourceRoots;
-    }
-
-    /**
-     * @param artifactMap
-     */
-    public void setArtifactMap(Map<String, Artifact> artifactMap) {
-        this.artifactMap = artifactMap;
-    }
-
-    /**
-     * @param pluginArtifactMap
-     */
-    public void setPluginArtifactMap(Map<String, Artifact> pluginArtifactMap) {
-        this.pluginArtifactMap = pluginArtifactMap;
-    }
-
-    /**
-     * @param reportArtifactMap
-     */
-    public void setReportArtifactMap(Map<String, Artifact> reportArtifactMap) {
-        this.reportArtifactMap = reportArtifactMap;
-    }
-
-    /**
-     * @param extensionArtifactMap
-     */
-    public void setExtensionArtifactMap(Map<String, Artifact> extensionArtifactMap) {
-        this.extensionArtifactMap = extensionArtifactMap;
-    }
-
-    /**
-     * @param projectReferences
-     */
-    public void setProjectReferences(Map<String, MavenProject> projectReferences) {
-        this.projectReferences = projectReferences;
-    }
-
-    /**
-     * @param buildOverlay
-     */
-    public void setBuildOverlay(Build buildOverlay) {
-        this.buildOverlay = buildOverlay;
-    }
-
-    /**
-     * @param compileDependencies
-     */
-    public void setCompileDependencies(List<Dependency> compileDependencies) {
-        this.compileDependencies = compileDependencies;
-    }
-
-    /**
-     * @param systemDependencies
-     */
-    public void setSystemDependencies(List<Dependency> systemDependencies) {
-        this.systemDependencies = systemDependencies;
-    }
-
-    /**
-     * @param testClasspathElements
-     */
-    public void setTestClasspathElements(List<String> testClasspathElements) {
-        this.testClasspathElements = testClasspathElements;
-    }
-
-    /**
-     * @param testDependencies
-     */
-    public void setTestDependencies(List<Dependency> testDependencies) {
-        this.testDependencies = testDependencies;
-    }
-
-    /**
-     * @param systemClasspathElements
-     */
-    public void setSystemClasspathElements(List<String> systemClasspathElements) {
-        this.systemClasspathElements = systemClasspathElements;
-    }
-
-    /**
-     * @param systemArtifacts
-     */
-    public void setSystemArtifacts(List<Artifact> systemArtifacts) {
-        this.systemArtifacts = systemArtifacts;
-    }
-
-    /**
-     * @param testArtifacts
-     */
-    public void setTestArtifacts(List<Artifact> testArtifacts) {
-        this.testArtifacts = testArtifacts;
-    }
-
-    /**
-     * @param runtimeArtifacts
-     */
-    public void setRuntimeArtifacts(List<Artifact> runtimeArtifacts) {
-        this.runtimeArtifacts = runtimeArtifacts;
-    }
-
-    /**
-     * @param runtimeDependencies
-     */
-    public void setRuntimeDependencies(List<Dependency> runtimeDependencies) {
-        this.runtimeDependencies = runtimeDependencies;
-    }
-
-    /**
-     * @param model
-     */
-    @Override
-    public void setModel(Model model) {
-        this.model = model;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public List<Dependency> getSystemDependencies() {
-        return systemDependencies;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setModelVersion(String string) {
-        this.modelVersion = string;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String getModelVersion() {
-        return modelVersion;
-    }
-
-    /**
-     * By default, return an empty String.
-     *
-     * @see org.apache.maven.project.MavenProject#getId()
-     */
-    @Override
-    public String getId() {
-        return "";
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setGroupId(String string) {
-        this.groupId = string;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String getGroupId() {
-        return groupId;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setArtifactId(String string) {
-        this.artifactId = string;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String getArtifactId() {
-        return artifactId;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setName(String string) {
-        this.name = string;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String getName() {
-        return name;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setVersion(String string) {
-        this.version = string;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String getVersion() {
-        return version;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String getPackaging() {
-        return packaging;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setPackaging(String string) {
-        this.packaging = string;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setInceptionYear(String string) {
-        this.inceptionYear = string;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String getInceptionYear() {
-        return inceptionYear;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setUrl(String string) {
-        this.url = string;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String getUrl() {
-        return url;
-    }
-
-    /**
-     * By default, return <code>null</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getPrerequisites()
-     */
-    @Override
-    public Prerequisites getPrerequisites() {
-        return null;
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#setIssueManagement(org.apache.maven.model.IssueManagement)
-     */
-    @Override
-    public void setIssueManagement(IssueManagement issueManagement) {
-        // nop
-    }
-
-    /**
-     * By default, return <code>null</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getCiManagement()
-     */
-    @Override
-    public CiManagement getCiManagement() {
-        return null;
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#setCiManagement(org.apache.maven.model.CiManagement)
-     */
-    @Override
-    public void setCiManagement(CiManagement ciManagement) {
-        // nop
-    }
-
-    /**
-     * By default, return <code>null</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getIssueManagement()
-     */
-    @Override
-    public IssueManagement getIssueManagement() {
-        return null;
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#setDistributionManagement(org.apache.maven.model.DistributionManagement)
-     */
-    @Override
-    public void setDistributionManagement(DistributionManagement distributionManagement) {
-        // nop
-    }
-
-    /**
-     * By default, return <code>null</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getDistributionManagement()
-     */
-    @Override
-    public DistributionManagement getDistributionManagement() {
-        return null;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setDescription(String string) {
-        this.description = string;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String getDescription() {
-        return description;
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#setOrganization(org.apache.maven.model.Organization)
-     */
-    @Override
-    public void setOrganization(Organization organization) {
-        // nop
-    }
-
-    /**
-     * By default, return <code>null</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getOrganization()
-     */
-    @Override
-    public Organization getOrganization() {
-        return null;
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#setScm(org.apache.maven.model.Scm)
-     */
-    @Override
-    public void setScm(Scm scm) {
-        // nop
-    }
-
-    /**
-     * By default, return <code>null</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getScm()
-     */
-    @Override
-    public Scm getScm() {
-        return null;
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#setMailingLists(java.util.List)
-     */
-    @Override
-    public void setMailingLists(List<MailingList> list) {
-        // nop
-    }
-
-    /**
-     * By default, return <code>Collections.EMPTY_LIST</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getMailingLists()
-     */
-    @Override
-    public List<MailingList> getMailingLists() {
-        return Collections.<MailingList>emptyList();
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#addMailingList(org.apache.maven.model.MailingList)
-     */
-    @Override
-    public void addMailingList(MailingList mailingList) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#setDevelopers(java.util.List)
-     */
-    @Override
-    public void setDevelopers(List<Developer> list) {
-        // nop
-    }
-
-    /**
-     * By default, return <code>Collections.EMPTY_LIST</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getDevelopers()
-     */
-    @Override
-    public List<Developer> getDevelopers() {
-        return Collections.<Developer>emptyList();
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#addDeveloper(org.apache.maven.model.Developer)
-     */
-    @Override
-    public void addDeveloper(Developer developer) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#setContributors(java.util.List)
-     */
-    @Override
-    public void setContributors(List<Contributor> list) {
-        // nop
-    }
-
-    /**
-     * By default, return <code>Collections.EMPTY_LIST</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getContributors()
-     */
-    @Override
-    public List<Contributor> getContributors() {
-        return Collections.<Contributor>emptyList();
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#addContributor(org.apache.maven.model.Contributor)
-     */
-    @Override
-    public void addContributor(Contributor contributor) {
-        // nop
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setBuild(Build build) {
-        this.build = build;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public Build getBuild() {
-        return build;
-    }
-
-    /**
-     * By default, return <code>Collections.EMPTY_LIST</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getResources()
-     */
-    @Override
-    public List<Resource> getResources() {
-        return Collections.<Resource>emptyList();
-    }
-
-    /**
-     * By default, return <code>Collections.EMPTY_LIST</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getTestResources()
-     */
-    @Override
-    public List<Resource> getTestResources() {
-        return Collections.<Resource>emptyList();
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#addResource(org.apache.maven.model.Resource)
-     */
-    @Override
-    public void addResource(Resource resource) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#addTestResource(org.apache.maven.model.Resource)
-     */
-    @Override
-    public void addTestResource(Resource resource) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#setReporting(org.apache.maven.model.Reporting)
-     */
-    @Override
-    public void setReporting(Reporting reporting) {
-        // nop
-    }
-
-    /**
-     * By default, return <code>null</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getReporting()
-     */
-    @Override
-    public Reporting getReporting() {
-        return null;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setLicenses(List<License> licenses) {
-        this.licenses = licenses;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public List<License> getLicenses() {
-        return licenses;
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#addLicense(org.apache.maven.model.License)
-     */
-    @Override
-    public void addLicense(License license) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#setArtifacts(java.util.Set)
-     */
-    @Override
-    public void setArtifacts(Set<Artifact> set) {
-        // nop
-    }
-
-    /**
-     * By default, return <code>Collections.EMPTY_SET</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getArtifacts()
-     */
-    @Override
-    public Set<Artifact> getArtifacts() {
-        return Collections.<Artifact>emptySet();
-    }
-
-    /**
-     * By default, return <code>Collections.EMPTY_MAP</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getArtifactMap()
-     */
-    @Override
-    public Map<String, Artifact> getArtifactMap() {
-        return Collections.<String, Artifact>emptyMap();
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#setPluginArtifacts(java.util.Set)
-     */
-    @Override
-    public void setPluginArtifacts(Set<Artifact> set) {
-        // nop
-    }
-
-    /**
-     * By default, return <code>Collections.EMPTY_SET</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getPluginArtifacts()
-     */
-    @Override
-    public Set<Artifact> getPluginArtifacts() {
-        return Collections.<Artifact>emptySet();
-    }
-
-    /**
-     * By default, return <code>Collections.EMPTY_MAP</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getPluginArtifactMap()
-     */
-    @Override
-    public Map<String, Artifact> getPluginArtifactMap() {
-        return Collections.<String, Artifact>emptyMap();
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#setReportArtifacts(java.util.Set)
-     */
-    @Override
-    public void setReportArtifacts(Set<Artifact> set) {
-        // nop
-    }
-
-    /**
-     * By default, return <code>Collections.EMPTY_SET</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getReportArtifacts()
-     */
-    @Override
-    public Set<Artifact> getReportArtifacts() {
-        return Collections.<Artifact>emptySet();
-    }
-
-    /**
-     * By default, return <code>Collections.EMPTY_MAP</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getReportArtifactMap()
-     */
-    @Override
-    public Map<String, Artifact> getReportArtifactMap() {
-        return Collections.<String, Artifact>emptyMap();
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#setExtensionArtifacts(java.util.Set)
-     */
-    @Override
-    public void setExtensionArtifacts(Set<Artifact> set) {
-        // nop
-    }
-
-    /**
-     * By default, return <code>Collections.EMPTY_SET</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getExtensionArtifacts()
-     */
-    @Override
-    public Set<Artifact> getExtensionArtifacts() {
-        return Collections.<Artifact>emptySet();
-    }
-
-    /**
-     * By default, return <code>Collections.EMPTY_MAP</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getExtensionArtifactMap()
-     */
-    @Override
-    public Map<String, Artifact> getExtensionArtifactMap() {
-        return Collections.<String, Artifact>emptyMap();
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#setParentArtifact(org.apache.maven.artifact.Artifact)
-     */
-    @Override
-    public void setParentArtifact(Artifact artifact) {
-        // nop
-    }
-
-    /**
-     * By default, return <code>null</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getParentArtifact()
-     */
-    @Override
-    public Artifact getParentArtifact() {
-        return null;
-    }
-
-    /**
-     * By default, return <code>Collections.EMPTY_LIST</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getRepositories()
-     */
-    @Override
-    public List<Repository> getRepositories() {
-        return Collections.<Repository>emptyList();
-    }
-
-    /**
-     * By default, return <code>Collections.EMPTY_LIST</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getReportPlugins()
-     */
-    @Override
-    public List<ReportPlugin> getReportPlugins() {
-        return Collections.<ReportPlugin>emptyList();
-    }
-
-    /**
-     * By default, return <code>Collections.EMPTY_LIST</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getBuildPlugins()
-     */
-    @Override
-    public List<Plugin> getBuildPlugins() {
-        return Collections.<Plugin>emptyList();
-    }
-
-    /**
-     * By default, return <code>Collections.EMPTY_LIST</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getModules()
-     */
-    @Override
-    public List<String> getModules() {
-        return Collections.<String>emptyList();
-    }
-
-    /**
-     * By default, return <code>null</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getPluginManagement()
-     */
-    @Override
-    public PluginManagement getPluginManagement() {
-        return null;
-    }
-
-    /**
-     * By default, do nothing.
-     */
-    public void addPlugin(Plugin plugin) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @param plugin
-     */
-    public void injectPluginManagementInfo(Plugin plugin) {
-        // nop
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public List<MavenProject> getCollectedProjects() {
-        return collectedProjects;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setCollectedProjects(List<MavenProject> list) {
-        this.collectedProjects = list;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setPluginArtifactRepositories(List<ArtifactRepository> list) {
-        this.pluginArtifactRepositories = list;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public List<ArtifactRepository> getPluginArtifactRepositories() {
-        return pluginArtifactRepositories;
-    }
-
-    /**
-     * By default, return <code>null</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getDistributionManagementArtifactRepository()
-     */
-    @Override
-    public ArtifactRepository getDistributionManagementArtifactRepository() {
-        return null;
-    }
-
-    /**
-     * By default, return <code>Collections.EMPTY_LIST</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getPluginRepositories()
-     */
-    @Override
-    public List<Repository> getPluginRepositories() {
-        return Collections.<Repository>emptyList();
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setActiveProfiles(List<Profile> list) {
-        activeProfiles = list;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public List<Profile> getActiveProfiles() {
-        return activeProfiles;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void addAttachedArtifact(Artifact artifact) {
-        if (attachedArtifacts == null) {
-            this.attachedArtifacts = new ArrayList<>(Collections.singletonList(artifact));
-        } else {
-            attachedArtifacts.add(artifact);
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public List<Artifact> getAttachedArtifacts() {
-        return attachedArtifacts;
-    }
-
-    /**
-     * By default, return <code>null</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getGoalConfiguration(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
-     */
-    @Override
-    public Xpp3Dom getGoalConfiguration(String string, String string1, String string2, String string3) {
-        return null;
-    }
-
-    /**
-     * By default, return <code>null</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getReportConfiguration(java.lang.String, java.lang.String, java.lang.String)
-     */
-    @Override
-    public Xpp3Dom getReportConfiguration(String string, String string1, String string2) {
-        return null;
-    }
-
-    /**
-     * By default, return <code>null</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getExecutionProject()
-     */
-    @Override
-    public MavenProject getExecutionProject() {
-        return null;
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#setExecutionProject(org.apache.maven.project.MavenProject)
-     */
-    @Override
-    public void setExecutionProject(MavenProject mavenProject) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#writeModel(java.io.Writer)
-     */
-    @Override
-    public void writeModel(Writer writer) throws IOException {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#writeOriginalModel(java.io.Writer)
-     */
-    @Override
-    public void writeOriginalModel(Writer writer) throws IOException {
-        // nop
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public Set<Artifact> getDependencyArtifacts() {
-        return dependencyArtifacts;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setDependencyArtifacts(Set<Artifact> set) {
-        this.dependencyArtifacts = set;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setReleaseArtifactRepository(ArtifactRepository artifactRepository) {
-        this.releaseArtifactRepository = artifactRepository;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setSnapshotArtifactRepository(ArtifactRepository artifactRepository) {
-        this.snapshotArtifactRepository = artifactRepository;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setOriginalModel(Model model) {
-        this.originalModel = model;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public Model getOriginalModel() {
-        return originalModel;
-    }
-
-    /**
-     * By default, return <code>Collections.EMPTY_LIST</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getBuildExtensions()
-     */
-    @Override
-    public List<Extension> getBuildExtensions() {
-        return Collections.<Extension>emptyList();
-    }
-
-    /**
-     * By default, return <code>Collections.EMPTY_SET</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#createArtifacts(org.apache.maven.artifact.factory.ArtifactFactory, java.lang.String, org.apache.maven.artifact.resolver.filter.ArtifactFilter)
-     */
-    @Override
-    public Set<Artifact> createArtifacts(
-            ArtifactFactory artifactFactory, String string, ArtifactFilter artifactFilter) {
-        return Collections.<Artifact>emptySet();
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#addProjectReference(org.apache.maven.project.MavenProject)
-     */
-    @Override
-    public void addProjectReference(MavenProject mavenProject) {
-        // nop
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.project.MavenProject#attachArtifact(java.lang.String, java.lang.String, java.io.File)
-     */
-    @Override
-    public void attachArtifact(String string, String string1, File file) {
-        // nop
-    }
-
-    /**
-     * By default, return a new instance of <code>Properties</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getProperties()
-     */
-    @Override
-    public Properties getProperties() {
-        return new Properties();
-    }
-
-    /**
-     * By default, return <code>Collections.EMPTY_LIST</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getFilters()
-     */
-    @Override
-    public List<String> getFilters() {
-        return Collections.<String>emptyList();
-    }
-
-    /**
-     * By default, return <code>Collections.EMPTY_MAP</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#getProjectReferences()
-     */
-    @Override
-    public Map<String, MavenProject> getProjectReferences() {
-        return Collections.<String, MavenProject>emptyMap();
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public boolean isExecutionRoot() {
-        return executionRoot;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setExecutionRoot(boolean b) {
-        this.executionRoot = b;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String getDefaultGoal() {
-        return defaultGoal;
-    }
-
-    /**
-     * By default, return <code>null</code>.
-     *
-     * @see org.apache.maven.project.MavenProject#replaceWithActiveArtifact(org.apache.maven.artifact.Artifact)
-     */
-    @Override
-    public Artifact replaceWithActiveArtifact(Artifact artifact) {
-        return null;
-    }
-}
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactRepository.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactRepository.java
deleted file mode 100644
index f680709..0000000
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactRepository.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing.stubs;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.metadata.ArtifactMetadata;
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
-import org.apache.maven.artifact.repository.Authentication;
-import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
-import org.apache.maven.repository.Proxy;
-
-/**
- * @author <a href="mailto:brianf@apache.org">Brian Fox</a>
- */
-public class StubArtifactRepository implements ArtifactRepository {
-    private String baseDir = null;
-
-    /**
-     * Default constructor
-     *
-     * @param dir the basedir
-     */
-    public StubArtifactRepository(String dir) {
-        baseDir = dir;
-    }
-
-    /**
-     * @return the <code>artifactId</code>.
-     * @see org.apache.maven.artifact.repository.ArtifactRepository#pathOf(org.apache.maven.artifact.Artifact)
-     */
-    @Override
-    public String pathOf(Artifact artifact) {
-        return artifact.getId();
-    }
-
-    /**
-     * @return <code>null</code>.
-     * @see org.apache.maven.artifact.repository.ArtifactRepository#pathOfRemoteRepositoryMetadata(org.apache.maven.artifact.metadata.ArtifactMetadata)
-     */
-    @Override
-    public String pathOfRemoteRepositoryMetadata(ArtifactMetadata artifactMetadata) {
-        return null;
-    }
-
-    /**
-     * @return the filename of this metadata on the local repository.
-     * @see org.apache.maven.artifact.repository.ArtifactRepository#pathOfLocalRepositoryMetadata(org.apache.maven.artifact.metadata.ArtifactMetadata, org.apache.maven.artifact.repository.ArtifactRepository)
-     */
-    @Override
-    public String pathOfLocalRepositoryMetadata(ArtifactMetadata metadata, ArtifactRepository repository) {
-        return metadata.getLocalFilename(repository);
-    }
-
-    /**
-     * @return <code>null</code>.
-     * @see org.apache.maven.artifact.repository.ArtifactRepository#getUrl()
-     */
-    @Override
-    public String getUrl() {
-        return null;
-    }
-
-    /**
-     * @return <code>basedir</code>.
-     * @see org.apache.maven.artifact.repository.ArtifactRepository#getBasedir()
-     */
-    @Override
-    public String getBasedir() {
-        return baseDir;
-    }
-
-    /**
-     * @return <code>null</code>.
-     * @see org.apache.maven.artifact.repository.ArtifactRepository#getProtocol()
-     */
-    @Override
-    public String getProtocol() {
-        return null;
-    }
-
-    /**
-     * @return <code>null</code>.
-     * @see org.apache.maven.artifact.repository.ArtifactRepository#getId()
-     */
-    @Override
-    public String getId() {
-        return null;
-    }
-
-    /**
-     * @return <code>null</code>.
-     * @see org.apache.maven.artifact.repository.ArtifactRepository#getSnapshots()
-     */
-    @Override
-    public ArtifactRepositoryPolicy getSnapshots() {
-        return null;
-    }
-
-    /**
-     * @return <code>null</code>.
-     * @see org.apache.maven.artifact.repository.ArtifactRepository#getReleases()
-     */
-    @Override
-    public ArtifactRepositoryPolicy getReleases() {
-        return null;
-    }
-
-    /**
-     * @return <code>null</code>.
-     * @see org.apache.maven.artifact.repository.ArtifactRepository#getLayout()
-     */
-    @Override
-    public ArtifactRepositoryLayout getLayout() {
-        return null;
-    }
-
-    /**
-     * @return <code>null</code>.
-     * @see org.apache.maven.artifact.repository.ArtifactRepository#getKey()
-     */
-    @Override
-    public String getKey() {
-        return null;
-    }
-
-    /**
-     * @return <code>false</code>.
-     * @see org.apache.maven.artifact.repository.ArtifactRepository#isUniqueVersion()
-     */
-    @Override
-    public boolean isUniqueVersion() {
-        return false;
-    }
-
-    /**
-     * By default, do nothing.
-     *
-     * @see org.apache.maven.artifact.repository.ArtifactRepository#setBlacklisted(boolean)
-     */
-    @Override
-    public void setBlacklisted(boolean blackListed) {
-        // nop
-    }
-
-    /**
-     * @return <code>false</code>.
-     * @see org.apache.maven.artifact.repository.ArtifactRepository#isBlacklisted()
-     */
-    @Override
-    public boolean isBlacklisted() {
-        return false;
-    }
-
-    @Override
-    public Artifact find(Artifact artifact) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    @Override
-    public Authentication getAuthentication() {
-        return null;
-    }
-
-    @Override
-    public Proxy getProxy() {
-        return null;
-    }
-
-    @Override
-    public void setAuthentication(Authentication authentication) {}
-
-    @Override
-    public void setId(String id) {}
-
-    @Override
-    public void setLayout(ArtifactRepositoryLayout layout) {}
-
-    @Override
-    public void setProxy(Proxy proxy) {}
-
-    @Override
-    public void setReleaseUpdatePolicy(ArtifactRepositoryPolicy policy) {}
-
-    @Override
-    public void setSnapshotUpdatePolicy(ArtifactRepositoryPolicy policy) {}
-
-    @Override
-    public void setUrl(String url) {}
-
-    @Override
-    public List<String> findVersions(Artifact artifact) {
-        return Collections.emptyList();
-    }
-
-    @Override
-    public boolean isProjectAware() {
-        return false;
-    }
-
-    @Override
-    public List<ArtifactRepository> getMirroredRepositories() {
-        return new ArrayList<>(0);
-    }
-
-    @Override
-    public void setMirroredRepositories(List<ArtifactRepository> artifactRepositories) {
-        // no op
-    }
-
-    @Override
-    public boolean isBlocked() {
-        return false;
-    }
-
-    @Override
-    public void setBlocked(boolean blocked) {
-        // no op
-    }
-}
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ArtifactStubFactoryTest.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ArtifactStubFactoryTest.java
deleted file mode 100644
index b7c9097..0000000
--- a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ArtifactStubFactoryTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing;
-
-import java.io.IOException;
-
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertFalse;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-public class ArtifactStubFactoryTest {
-    @Test
-    public void testVersionChecks() throws IOException {
-        ArtifactStubFactory factory = new ArtifactStubFactory();
-        assertTrue(factory.getReleaseArtifact().isRelease());
-        assertFalse(factory.getReleaseArtifact().isSnapshot());
-        assertTrue(factory.getSnapshotArtifact().isSnapshot());
-        assertFalse(factory.getSnapshotArtifact().isRelease());
-    }
-
-    @Test
-    public void testCreateFiles() throws IOException {
-        ArtifactStubFactory factory = new ArtifactStubFactory();
-        assertFalse(factory.isCreateFiles());
-    }
-}
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ExpressionEvaluatorMojo.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ExpressionEvaluatorMojo.java
deleted file mode 100644
index 3586f9f..0000000
--- a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ExpressionEvaluatorMojo.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing;
-
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-
-/**
- * @author Edwin Punzalan
- */
-public class ExpressionEvaluatorMojo extends AbstractMojo {
-    private String basedir;
-
-    private ArtifactRepository localRepository;
-
-    private String workdir;
-
-    /** {@inheritDoc} */
-    @Override
-    public void execute() throws MojoExecutionException, MojoFailureException {
-        if (basedir == null || basedir.isEmpty()) {
-            throw new MojoExecutionException("basedir was not injected.");
-        }
-
-        if (localRepository == null) {
-            throw new MojoExecutionException("localRepository was not injected.");
-        }
-
-        if (workdir == null || workdir.isEmpty()) {
-            throw new MojoExecutionException("workdir was not injected.");
-        } else if (!workdir.startsWith(basedir)) {
-            throw new MojoExecutionException("workdir does not start with basedir.");
-        }
-    }
-}
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ExpressionEvaluatorTest.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ExpressionEvaluatorTest.java
deleted file mode 100644
index 08849c5..0000000
--- a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ExpressionEvaluatorTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing;
-
-import java.io.StringReader;
-
-import org.apache.maven.plugin.MojoExecutionException;
-import org.codehaus.plexus.configuration.PlexusConfiguration;
-import org.codehaus.plexus.util.xml.Xpp3Dom;
-import org.codehaus.plexus.util.xml.Xpp3DomBuilder;
-
-/**
- * @author Edwin Punzalan
- */
-public class ExpressionEvaluatorTest extends AbstractMojoTestCase {
-    private Xpp3Dom pomDom;
-
-    private PlexusConfiguration pluginConfiguration;
-
-    /** {@inheritDoc} */
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        StringBuffer pom = new StringBuffer();
-
-        pom.append("<project>").append("\n");
-        pom.append("  <build>").append("\n");
-        pom.append("    <plugins>").append("\n");
-        pom.append("      <plugin>").append("\n");
-        pom.append("        <artifactId>maven-test-mojo</artifactId>").append("\n");
-        pom.append("        <configuration>").append("\n");
-        pom.append("          <basedir>${basedir}</basedir>").append("\n");
-        pom.append("          <workdir>${basedir}/workDirectory</workdir>").append("\n");
-        pom.append("          <localRepository>${localRepository}</localRepository>")
-                .append("\n");
-        pom.append("        </configuration>").append("\n");
-        pom.append("      </plugin>").append("\n");
-        pom.append("    </plugins>").append("\n");
-        pom.append("  </build>").append("\n");
-        pom.append("</project>").append("\n");
-
-        pomDom = Xpp3DomBuilder.build(new StringReader(pom.toString()));
-
-        pluginConfiguration = extractPluginConfiguration("maven-test-mojo", pomDom);
-    }
-
-    /**
-     * @throws Exception if any
-     */
-    public void testInjection() throws Exception {
-        ExpressionEvaluatorMojo mojo = new ExpressionEvaluatorMojo();
-
-        mojo = (ExpressionEvaluatorMojo) configureMojo(mojo, pluginConfiguration);
-
-        try {
-            mojo.execute();
-        } catch (MojoExecutionException e) {
-            fail(e.getMessage());
-        }
-    }
-}
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/MojoRuleTest.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/MojoRuleTest.java
deleted file mode 100644
index 105623d..0000000
--- a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/MojoRuleTest.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing;
-
-import java.io.File;
-import java.io.StringReader;
-import java.util.Map;
-
-import org.codehaus.plexus.configuration.PlexusConfiguration;
-import org.codehaus.plexus.util.xml.Xpp3Dom;
-import org.codehaus.plexus.util.xml.Xpp3DomBuilder;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-/**
- * @author Mirko Friedenhagen
- */
-public class MojoRuleTest {
-
-    private boolean beforeWasCalled = false;
-
-    @Rule
-    public MojoRule rule = new MojoRule() {
-
-        @Override
-        protected void before() throws Throwable {
-            beforeWasCalled = true;
-        }
-    };
-
-    private String pom;
-
-    private Xpp3Dom pomDom;
-
-    private PlexusConfiguration pluginConfiguration;
-
-    /** {@inheritDoc} */
-    @Before
-    public void setUp() throws Exception {
-
-        pom = "<project>" + "<build>"
-                + "<plugins>"
-                + "<plugin>"
-                + "<artifactId>maven-simple-plugin</artifactId>"
-                + "<configuration>"
-                + "<keyOne>valueOne</keyOne>"
-                + "<keyTwo>valueTwo</keyTwo>"
-                + "</configuration>"
-                + "</plugin>"
-                + "</plugins>"
-                + "</build>"
-                + "</project>";
-
-        pomDom = Xpp3DomBuilder.build(new StringReader(pom));
-
-        pluginConfiguration = rule.extractPluginConfiguration("maven-simple-plugin", pomDom);
-    }
-
-    /**
-     * @throws Exception if any
-     */
-    @Test
-    public void testPluginConfigurationExtraction() throws Exception {
-        assertEquals("valueOne", pluginConfiguration.getChild("keyOne").getValue());
-
-        assertEquals("valueTwo", pluginConfiguration.getChild("keyTwo").getValue());
-    }
-
-    /**
-     * @throws Exception if any
-     */
-    @Test
-    public void testMojoConfiguration() throws Exception {
-        SimpleMojo mojo = new SimpleMojo();
-
-        mojo = rule.configureMojo(mojo, pluginConfiguration);
-
-        assertEquals("valueOne", mojo.getKeyOne());
-
-        assertEquals("valueTwo", mojo.getKeyTwo());
-    }
-
-    /**
-     * @throws Exception if any
-     */
-    @Test
-    public void testVariableAccessWithoutGetter() throws Exception {
-        SimpleMojo mojo = new SimpleMojo();
-
-        mojo = rule.configureMojo(mojo, pluginConfiguration);
-
-        assertEquals("valueOne", rule.getVariableValueFromObject(mojo, "keyOne"));
-
-        assertEquals("valueTwo", rule.getVariableValueFromObject(mojo, "keyTwo"));
-    }
-
-    /**
-     * @throws Exception if any
-     */
-    @Test
-    public void testVariableAccessWithoutGetter2() throws Exception {
-        SimpleMojo mojo = new SimpleMojo();
-
-        mojo = rule.configureMojo(mojo, pluginConfiguration);
-
-        Map<String, Object> map = rule.getVariablesAndValuesFromObject(mojo);
-
-        assertEquals("valueOne", map.get("keyOne"));
-
-        assertEquals("valueTwo", map.get("keyTwo"));
-    }
-
-    /**
-     * @throws Exception if any
-     */
-    @Test
-    public void testSettingMojoVariables() throws Exception {
-        SimpleMojo mojo = new SimpleMojo();
-
-        mojo = rule.configureMojo(mojo, pluginConfiguration);
-
-        rule.setVariableValueToObject(mojo, "keyOne", "myValueOne");
-
-        assertEquals("myValueOne", rule.getVariableValueFromObject(mojo, "keyOne"));
-    }
-
-    @Test
-    @WithoutMojo
-    public void testNoRuleWrapper() throws Exception {
-        assertFalse("before executed although WithMojo annotation was added", beforeWasCalled);
-    }
-
-    @Test
-    public void testWithRuleWrapper() throws Exception {
-        assertTrue("before executed because WithMojo annotation was not added", beforeWasCalled);
-    }
-
-    /**
-     * @throws Exception if any
-     */
-    @Test
-    public void testLookupInitializedMojo() throws Exception {
-        File pomBaseDir = new File("src/test/projects/property");
-        ParametersMojo mojo = rule.lookupConfiguredMojo(pomBaseDir, "parameters");
-        assertEquals("default", rule.getVariableValueFromObject(mojo, "withDefault"));
-        assertEquals("propertyValue", rule.getVariableValueFromObject(mojo, "withProperty"));
-        assertEquals("propertyValue", rule.getVariableValueFromObject(mojo, "withPropertyAndDefault"));
-    }
-}
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/MojoTestCaseTest.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/MojoTestCaseTest.java
deleted file mode 100644
index 1fa8947..0000000
--- a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/MojoTestCaseTest.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing;
-
-import java.io.StringReader;
-import java.util.Map;
-
-import org.apache.maven.api.plugin.testing.MojoTest;
-import org.codehaus.plexus.configuration.PlexusConfiguration;
-import org.codehaus.plexus.util.xml.Xpp3Dom;
-import org.codehaus.plexus.util.xml.Xpp3DomBuilder;
-
-/**
- * @author Jason van Zyl
- */
-@MojoTest
-public class MojoTestCaseTest extends AbstractMojoTestCase {
-    private String pom;
-
-    private Xpp3Dom pomDom;
-
-    private PlexusConfiguration pluginConfiguration;
-
-    /** {@inheritDoc} */
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        pom = "<project>" + "<build>"
-                + "<plugins>"
-                + "<plugin>"
-                + "<artifactId>maven-simple-plugin</artifactId>"
-                + "<configuration>"
-                + "<keyOne>valueOne</keyOne>"
-                + "<keyTwo>valueTwo</keyTwo>"
-                + "</configuration>"
-                + "</plugin>"
-                + "</plugins>"
-                + "</build>"
-                + "</project>";
-
-        pomDom = Xpp3DomBuilder.build(new StringReader(pom));
-
-        pluginConfiguration = extractPluginConfiguration("maven-simple-plugin", pomDom);
-    }
-
-    /**
-     * @throws Exception if any
-     */
-    public void testPluginConfigurationExtraction() throws Exception {
-        assertEquals("valueOne", pluginConfiguration.getChild("keyOne").getValue());
-
-        assertEquals("valueTwo", pluginConfiguration.getChild("keyTwo").getValue());
-    }
-
-    /**
-     * @throws Exception if any
-     */
-    public void testMojoConfiguration() throws Exception {
-        SimpleMojo mojo = new SimpleMojo();
-
-        mojo = (SimpleMojo) configureMojo(mojo, pluginConfiguration);
-
-        assertEquals("valueOne", mojo.getKeyOne());
-
-        assertEquals("valueTwo", mojo.getKeyTwo());
-    }
-
-    /**
-     * @throws Exception if any
-     */
-    public void testVariableAccessWithoutGetter() throws Exception {
-        SimpleMojo mojo = new SimpleMojo();
-
-        mojo = (SimpleMojo) configureMojo(mojo, pluginConfiguration);
-
-        assertEquals("valueOne", (String) getVariableValueFromObject(mojo, "keyOne"));
-
-        assertEquals("valueTwo", (String) getVariableValueFromObject(mojo, "keyTwo"));
-    }
-
-    /**
-     * @throws Exception if any
-     */
-    public void testVariableAccessWithoutGetter2() throws Exception {
-        SimpleMojo mojo = new SimpleMojo();
-
-        mojo = (SimpleMojo) configureMojo(mojo, pluginConfiguration);
-
-        Map<String, Object> map = getVariablesAndValuesFromObject(mojo);
-
-        assertEquals("valueOne", (String) map.get("keyOne"));
-
-        assertEquals("valueTwo", (String) map.get("keyTwo"));
-    }
-
-    /**
-     * @throws Exception if any
-     */
-    public void testSettingMojoVariables() throws Exception {
-        SimpleMojo mojo = new SimpleMojo();
-
-        mojo = (SimpleMojo) configureMojo(mojo, pluginConfiguration);
-
-        setVariableValueToObject(mojo, "keyOne", "myValueOne");
-
-        assertEquals("myValueOne", (String) getVariableValueFromObject(mojo, "keyOne"));
-    }
-}
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ParametersMojo.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ParametersMojo.java
deleted file mode 100644
index 77e52d9..0000000
--- a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ParametersMojo.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing;
-
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-
-public class ParametersMojo extends AbstractMojo {
-    public String plain;
-
-    public String withProperty;
-
-    public String withDefault;
-
-    public String withPropertyAndDefault;
-
-    @Override
-    public void execute() throws MojoExecutionException, MojoFailureException {
-        getLog().info("Plain value = " + plain);
-    }
-}
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ParametersMojoTest.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ParametersMojoTest.java
deleted file mode 100644
index ce7869c..0000000
--- a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ParametersMojoTest.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing;
-
-import java.io.File;
-
-import org.apache.maven.execution.DefaultMavenExecutionRequest;
-import org.apache.maven.execution.MavenExecutionRequest;
-import org.apache.maven.execution.MavenSession;
-import org.apache.maven.plugin.MojoExecution;
-import org.apache.maven.project.MavenProject;
-import org.apache.maven.project.ProjectBuilder;
-import org.apache.maven.project.ProjectBuildingException;
-import org.apache.maven.project.ProjectBuildingRequest;
-import org.eclipse.aether.DefaultRepositorySystemSession;
-
-public class ParametersMojoTest extends AbstractMojoTestCase {
-    public void testDefault() throws Exception {
-        MavenProject project = readMavenProject(new File("src/test/projects/default"));
-
-        ParametersMojo mojo = (ParametersMojo) lookupConfiguredMojo(project, "parameters");
-
-        assertNull(mojo.plain);
-        assertNull(mojo.withProperty);
-        assertEquals("default", mojo.withDefault);
-        assertEquals("default", mojo.withPropertyAndDefault);
-    }
-
-    public void testExplicit() throws Exception {
-        MavenProject project = readMavenProject(new File("src/test/projects/explicit"));
-
-        ParametersMojo mojo = (ParametersMojo) lookupConfiguredMojo(project, "parameters");
-
-        assertEquals("explicitValue", mojo.plain);
-        assertEquals("explicitWithPropertyValue", mojo.withProperty);
-        assertEquals("explicitWithDefaultValue", mojo.withDefault);
-        assertEquals("explicitWithPropertyAndDefaultValue", mojo.withPropertyAndDefault);
-    }
-
-    public void testDefaultWithProperty() throws Exception {
-        MavenProject project = readMavenProject(new File("src/test/projects/default"));
-        MavenSession session = newMavenSession(project);
-        MojoExecution execution = newMojoExecution("parameters");
-
-        session.getUserProperties().put("property", "propertyValue");
-        ParametersMojo mojo = (ParametersMojo) lookupConfiguredMojo(session, execution);
-
-        assertNull(mojo.plain);
-        assertEquals("propertyValue", mojo.withProperty);
-        assertEquals("default", mojo.withDefault);
-        assertEquals("propertyValue", mojo.withPropertyAndDefault);
-    }
-
-    public void testExplicitWithProperty() throws Exception {
-        MavenProject project = readMavenProject(new File("src/test/projects/explicit"));
-        MavenSession session = newMavenSession(project);
-        MojoExecution execution = newMojoExecution("parameters");
-
-        session.getUserProperties().put("property", "propertyValue");
-        ParametersMojo mojo = (ParametersMojo) lookupConfiguredMojo(session, execution);
-
-        assertEquals("explicitValue", mojo.plain);
-        assertEquals("explicitWithPropertyValue", mojo.withProperty);
-        assertEquals("explicitWithDefaultValue", mojo.withDefault);
-        assertEquals("explicitWithPropertyAndDefaultValue", mojo.withPropertyAndDefault);
-    }
-
-    protected MavenProject readMavenProject(File basedir) throws ProjectBuildingException, Exception {
-        File pom = new File(basedir, "pom.xml");
-        MavenExecutionRequest request = new DefaultMavenExecutionRequest();
-        request.setBaseDirectory(basedir);
-        ProjectBuildingRequest configuration = request.getProjectBuildingRequest();
-        configuration.setRepositorySession(new DefaultRepositorySystemSession());
-        MavenProject project =
-                lookup(ProjectBuilder.class).build(pom, configuration).getProject();
-        assertNotNull(project);
-        return project;
-    }
-}
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/PluginArtifactFileTest.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/PluginArtifactFileTest.java
deleted file mode 100644
index 6025f21..0000000
--- a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/PluginArtifactFileTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing;
-
-import java.util.List;
-
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.plugin.MojoExecution;
-
-public class PluginArtifactFileTest extends AbstractMojoTestCase {
-    private static final String FS = System.getProperty("file.separator");
-
-    public void testArtifact() throws Exception {
-        MojoExecution execution = newMojoExecution("parameters"); // TODO dedicated test mojo
-
-        List<Artifact> artifacts =
-                execution.getMojoDescriptor().getPluginDescriptor().getArtifacts();
-
-        assertEquals(1, artifacts.size());
-
-        Artifact artifact = artifacts.get(0);
-        assertEquals("test", artifact.getGroupId());
-        assertEquals("test-plugin", artifact.getArtifactId());
-        assertEquals("0.0.1-SNAPSHOT", artifact.getBaseVersion());
-        assertTrue(artifact.getFile().getAbsolutePath().endsWith(FS + "target" + FS + "test-classes"));
-    }
-
-    // TODO find a way to automate testing of jar:file:/ test plugin URLs
-}
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/SimpleMojo.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/SimpleMojo.java
deleted file mode 100644
index e284ea2..0000000
--- a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/SimpleMojo.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing;
-
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-
-/**
- * @author Jason van Zyl
- */
-public class SimpleMojo extends AbstractMojo {
-    private String keyOne;
-
-    private String keyTwo;
-
-    public String getKeyOne() {
-        return keyOne;
-    }
-
-    public String getKeyTwo() {
-        return keyTwo;
-    }
-
-    @Override
-    public void execute() throws MojoExecutionException {}
-}
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/TestSilentLog.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/TestSilentLog.java
deleted file mode 100644
index 69b2ed3..0000000
--- a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/TestSilentLog.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing;
-
-import junit.framework.TestCase;
-import org.apache.maven.plugin.logging.Log;
-import org.codehaus.plexus.logging.Logger;
-
-public class TestSilentLog extends TestCase {
-
-    public void testLog() {
-        Log log = new SilentLog();
-        String text = new String("Text");
-        Throwable e = new RuntimeException();
-        log.debug(text);
-        log.debug(text, e);
-        log.debug(e);
-        log.info(text);
-        log.info(text, e);
-        log.info(e);
-        log.warn(text);
-        log.warn(text, e);
-        log.warn(e);
-        log.error(text);
-        log.error(text, e);
-        log.error(e);
-        log.isDebugEnabled();
-        log.isErrorEnabled();
-        log.isWarnEnabled();
-        log.isInfoEnabled();
-    }
-
-    public void testLogger() {
-        Logger log = new SilentLog();
-        String text = new String("Text");
-        Throwable e = new RuntimeException();
-
-        log.debug(text);
-        log.debug(text, e);
-        log.error(text);
-        log.error(text, e);
-        log.warn(text);
-        log.warn(text, e);
-        log.info(text);
-        log.info(text, e);
-
-        log.fatalError(text);
-        log.fatalError(text, e);
-        log.getChildLogger(text);
-        log.getName();
-        log.getThreshold();
-        log.isDebugEnabled();
-        log.isErrorEnabled();
-        log.isFatalErrorEnabled();
-        log.isInfoEnabled();
-        log.isWarnEnabled();
-    }
-}
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/junit5/Junit5Test.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/junit5/Junit5Test.java
deleted file mode 100644
index 9da0036..0000000
--- a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/junit5/Junit5Test.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing.junit5;
-
-import javax.inject.Inject;
-
-import org.apache.maven.plugin.logging.Log;
-import org.apache.maven.plugin.testing.ParametersMojo;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-@MojoTest
-class Junit5Test {
-
-    private static final String POM = "<project>"
-            + "<build>"
-            + " <plugins>"
-            + "  <plugin>"
-            + "   <artifactId>test-plugin</artifactId>"
-            + "   <configuration>"
-            + "   </configuration>"
-            + "  </plugin>"
-            + " </plugins>"
-            + "</build>" + "</project>";
-
-    @Inject
-    private Log log;
-
-    @Test
-    @InjectMojo(goal = "test:test-plugin:0.0.1-SNAPSHOT:parameters", pom = POM)
-    void simpleMojo(ParametersMojo mojo) {
-        assertEquals(log, mojo.getLog());
-        assertDoesNotThrow(mojo::execute);
-    }
-
-    @Test
-    @InjectMojo(goal = "test:test-plugin:0.0.1-SNAPSHOT:parameters", pom = POM)
-    @MojoParameter(name = "plain", value = "plainValue")
-    @MojoParameter(name = "withDefault", value = "withDefaultValue")
-    void simpleMojoWithParameters(ParametersMojo mojo) {
-        assertEquals("plainValue", mojo.plain);
-        assertEquals("withDefaultValue", mojo.withDefault);
-        assertDoesNotThrow(mojo::execute);
-    }
-
-    @Test
-    @InjectMojo(goal = "test:test-plugin:0.0.1-SNAPSHOT:parameters", pom = POM)
-    @MojoParameter(name = "plain", value = "plainValue")
-    void simpleMojoWithParameter(ParametersMojo mojo) {
-        assertEquals("plainValue", mojo.plain);
-        assertDoesNotThrow(mojo::execute);
-    }
-}
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/resources/TestResourcesTest.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/resources/TestResourcesTest.java
deleted file mode 100644
index 8ce1ecb..0000000
--- a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/resources/TestResourcesTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.maven.plugin.testing.resources;
-
-import org.junit.Test;
-
-public class TestResourcesTest {
-    public TestResources resources = new TestResources();
-
-    @Test(expected = IllegalStateException.class)
-    public void testNoRuleAnnotation() throws Exception {
-        resources.getBasedir("dummy");
-    }
-}
diff --git a/maven-plugin-testing-harness/src/test/projects/default/pom.xml b/maven-plugin-testing-harness/src/test/projects/default/pom.xml
deleted file mode 100644
index e0dc4b3..0000000
--- a/maven-plugin-testing-harness/src/test/projects/default/pom.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<project>
-  <modelVersion>4.0.0</modelVersion>
-
-  <groupId>test</groupId>
-  <artifactId>test-test</artifactId>
-  <version>1.0-SNAPSHOT</version>
-  <packaging>jar</packaging>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>test</groupId>
-        <artifactId>test-plugin</artifactId>
-        <version>0.0.1-SNAPSHOT</version>
-        <executions>
-          <execution>
-            <id>test</id>
-            <goals>
-              <goal>test</goal>
-            </goals>
-            <phase>compile</phase>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/maven-plugin-testing-harness/src/test/projects/explicit/pom.xml b/maven-plugin-testing-harness/src/test/projects/explicit/pom.xml
deleted file mode 100644
index 06628e9..0000000
--- a/maven-plugin-testing-harness/src/test/projects/explicit/pom.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<project>
-  <modelVersion>4.0.0</modelVersion>
-
-  <groupId>test</groupId>
-  <artifactId>test-test</artifactId>
-  <version>1.0-SNAPSHOT</version>
-  <packaging>jar</packaging>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>test</groupId>
-        <artifactId>test-plugin</artifactId>
-        <version>0.0.1-SNAPSHOT</version>
-        <executions>
-          <execution>
-            <id>test</id>
-            <goals>
-              <goal>test</goal>
-            </goals>
-            <phase>compile</phase>
-          </execution>
-        </executions>
-        <configuration>
-          <plain>explicitValue</plain>
-          <withProperty>explicitWithPropertyValue</withProperty>
-          <withDefault>explicitWithDefaultValue</withDefault>
-          <withPropertyAndDefault>explicitWithPropertyAndDefaultValue</withPropertyAndDefault>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/maven-plugin-testing-harness/src/test/projects/property/pom.xml b/maven-plugin-testing-harness/src/test/projects/property/pom.xml
deleted file mode 100644
index 167b598..0000000
--- a/maven-plugin-testing-harness/src/test/projects/property/pom.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<project>
-  <modelVersion>4.0.0</modelVersion>
-
-  <groupId>test</groupId>
-  <artifactId>test-test</artifactId>
-  <version>1.0-SNAPSHOT</version>
-  <packaging>jar</packaging>
-
-  <properties>
-    <property>propertyValue</property>
-  </properties>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>test</groupId>
-        <artifactId>test-plugin</artifactId>
-        <version>0.0.1-SNAPSHOT</version>
-        <executions>
-          <execution>
-            <id>test</id>
-            <goals>
-              <goal>test</goal>
-            </goals>
-            <phase>compile</phase>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-</project>


(maven-plugin-testing) 03/04: Rename SessionStub to SessionMock and add a real SessionStub

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 407a8831ea3e21f31bfd24c2f5c6d3ce871a6487
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Tue Jun 18 09:08:24 2024 +0200

    Rename SessionStub to SessionMock and add a real SessionStub
---
 .../maven/api/plugin/testing/MojoExtension.java    |   2 +-
 .../api/plugin/testing/stubs/ProjectStub.java      | 101 ++-
 .../stubs/{SessionStub.java => SessionMock.java}   |   2 +-
 .../api/plugin/testing/stubs/SessionStub.java      | 707 +++++++++++----------
 .../apache/maven/api/di/testing/SimpleDITest.java  |   4 +-
 .../plugin/testing/ExpressionEvaluatorTest.java    |   4 +-
 6 files changed, 407 insertions(+), 413 deletions(-)

diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoExtension.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoExtension.java
index 0147261..b855dde 100644
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoExtension.java
+++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoExtension.java
@@ -333,7 +333,7 @@ public class MojoExtension extends MavenDIExtension implements ParameterResolver
             @Singleton
             @Priority(-10)
             private InternalSession createSession() {
-                return SessionStub.getMockSession(getBasedir());
+                return SessionMock.getMockSession(getBasedir());
             }
 
             @Provides
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/ProjectStub.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/ProjectStub.java
index 450cd1a..fd37fa5 100644
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/ProjectStub.java
+++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/ProjectStub.java
@@ -25,9 +25,6 @@ import org.apache.maven.api.*;
 import org.apache.maven.api.annotations.Nonnull;
 import org.apache.maven.api.model.Model;
 import org.apache.maven.api.model.PluginContainer;
-import org.apache.maven.internal.impl.DefaultVersionParser;
-import org.apache.maven.repository.internal.DefaultModelVersionParser;
-import org.eclipse.aether.util.version.GenericVersionScheme;
 
 /**
  * @author Olivier Lamy
@@ -156,10 +153,6 @@ public class ProjectStub implements Project {
         return basedir;
     }
 
-    public void setBasedir(Path basedir) {
-        this.basedir = basedir;
-    }
-
     @Override
     public Optional<Project> getParent() {
         return Optional.empty();
@@ -180,90 +173,74 @@ public class ProjectStub implements Project {
         return rootDirectory;
     }
 
-    public void setGroupId(String groupId) {
+    //
+    // Setters
+    //
+
+    public ProjectStub setBasedir(Path basedir) {
+        this.basedir = basedir;
+        return this;
+    }
+
+    public ProjectStub setGroupId(String groupId) {
         model = model.withGroupId(groupId);
+        return this;
     }
 
-    public void setArtifactId(String artifactId) {
+    public ProjectStub setArtifactId(String artifactId) {
         model = model.withArtifactId(artifactId);
+        return this;
     }
 
-    public void setVersion(String version) {
+    public ProjectStub setVersion(String version) {
         model = model.withVersion(version);
+        return this;
     }
 
-    public void setName(String name) {
+    public ProjectStub setName(String name) {
         model = model.withName(name);
+        return this;
+    }
+
+    public ProjectStub setDescription(String desc) {
+        model = model.withDescription(desc);
+        return this;
     }
 
-    public void setPackaging(String packaging) {
+    public ProjectStub setPackaging(String packaging) {
         model = model.withPackaging(packaging);
+        return this;
     }
 
-    public void setMainArtifact(Artifact mainArtifact) {
+    public ProjectStub setMainArtifact(Artifact mainArtifact) {
         this.mainArtifact = mainArtifact;
+        return this;
     }
 
-    public void setPomPath(Path pomPath) {
+    public ProjectStub setPomPath(Path pomPath) {
         this.pomPath = pomPath;
+        return this;
     }
 
-    public void setTopProject(boolean topProject) {
+    public ProjectStub setTopProject(boolean topProject) {
         this.topProject = topProject;
+        return this;
     }
 
-    public void setMavenModel(org.apache.maven.model.Model model) {
+    public ProjectStub setMavenModel(org.apache.maven.model.Model model) {
         this.model = model.getDelegate();
+        return this;
     }
 
-    public void setRootDirectory(Path rootDirectory) {
+    public ProjectStub setRootDirectory(Path rootDirectory) {
         this.rootDirectory = rootDirectory;
+        return this;
     }
 
-    public void addProperty(String key, String value) {
-        properties.put(key, value);
-    }
-
-    class ProjectArtifact implements Artifact {
-        @Override
-        public String getGroupId() {
-            return ProjectStub.this.getGroupId();
-        }
-
-        @Override
-        public String getArtifactId() {
-            return ProjectStub.this.getArtifactId();
-        }
-
-        @Override
-        public Version getVersion() {
-            return new DefaultVersionParser(new DefaultModelVersionParser(new GenericVersionScheme()))
-                    .parseVersion(ProjectStub.this.getVersion());
-        }
-
-        @Override
-        public Version getBaseVersion() {
-            return null;
-        }
-
-        @Override
-        public String getClassifier() {
-            return "";
-        }
-
-        @Override
-        public String getExtension() {
-            return "pom";
-        }
-
-        @Override
-        public boolean isSnapshot() {
-            return false;
-        }
-
-        @Override
-        public ArtifactCoordinate toCoordinate() {
-            return null;
-        }
+    public ProjectStub addProperty(String key, String value) {
+        Map<String, String> props = new HashMap<>(model.getProperties());
+        props.put(key, value);
+        model = model.withProperties(props);
+        return this;
     }
 }
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/SessionStub.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/SessionMock.java
similarity index 99%
copy from maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/SessionStub.java
copy to maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/SessionMock.java
index 799587a..c620b13 100644
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/SessionStub.java
+++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/SessionMock.java
@@ -75,7 +75,7 @@ import static org.mockito.Mockito.withSettings;
 /**
  *
  */
-public class SessionStub {
+public class SessionMock {
 
     public static InternalSession getMockSession(String localRepo) {
         LocalRepository localRepository = mock(LocalRepository.class);
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/SessionStub.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/SessionStub.java
index 799587a..34b1820 100644
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/SessionStub.java
+++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/stubs/SessionStub.java
@@ -18,376 +18,393 @@
  */
 package org.apache.maven.api.plugin.testing.stubs;
 
-import java.net.URI;
 import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.Arrays;
+import java.time.Instant;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Optional;
-import java.util.Properties;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.function.Supplier;
 
 import org.apache.maven.api.Artifact;
+import org.apache.maven.api.ArtifactCoordinate;
+import org.apache.maven.api.Dependency;
+import org.apache.maven.api.DependencyCoordinate;
+import org.apache.maven.api.DependencyScope;
+import org.apache.maven.api.Language;
+import org.apache.maven.api.Listener;
 import org.apache.maven.api.LocalRepository;
+import org.apache.maven.api.Node;
+import org.apache.maven.api.Packaging;
+import org.apache.maven.api.PathScope;
+import org.apache.maven.api.PathType;
 import org.apache.maven.api.Project;
+import org.apache.maven.api.ProjectScope;
 import org.apache.maven.api.RemoteRepository;
+import org.apache.maven.api.Service;
 import org.apache.maven.api.Session;
 import org.apache.maven.api.SessionData;
-import org.apache.maven.api.model.Model;
+import org.apache.maven.api.Type;
+import org.apache.maven.api.Version;
+import org.apache.maven.api.VersionConstraint;
+import org.apache.maven.api.VersionRange;
+import org.apache.maven.api.annotations.Nonnull;
+import org.apache.maven.api.annotations.Nullable;
 import org.apache.maven.api.model.Repository;
-import org.apache.maven.api.services.ArtifactDeployer;
-import org.apache.maven.api.services.ArtifactDeployerRequest;
-import org.apache.maven.api.services.ArtifactFactory;
-import org.apache.maven.api.services.ArtifactFactoryRequest;
-import org.apache.maven.api.services.ArtifactInstaller;
-import org.apache.maven.api.services.ArtifactInstallerRequest;
-import org.apache.maven.api.services.ArtifactManager;
-import org.apache.maven.api.services.LocalRepositoryManager;
-import org.apache.maven.api.services.ProjectBuilder;
-import org.apache.maven.api.services.ProjectBuilderRequest;
-import org.apache.maven.api.services.ProjectBuilderResult;
-import org.apache.maven.api.services.ProjectManager;
-import org.apache.maven.api.services.RepositoryFactory;
-import org.apache.maven.api.services.VersionParser;
-import org.apache.maven.api.services.xml.ModelXmlFactory;
-import org.apache.maven.internal.impl.DefaultModelXmlFactory;
-import org.apache.maven.internal.impl.DefaultVersionParser;
-import org.apache.maven.internal.impl.InternalSession;
-import org.apache.maven.model.v4.MavenStaxReader;
-import org.apache.maven.repository.internal.DefaultModelVersionParser;
-import org.eclipse.aether.util.version.GenericVersionScheme;
-import org.mockito.ArgumentMatchers;
-
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyString;
-import static org.mockito.ArgumentMatchers.same;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-import static org.mockito.Mockito.withSettings;
+import org.apache.maven.api.settings.Settings;
 
 /**
- *
  */
-public class SessionStub {
-
-    public static InternalSession getMockSession(String localRepo) {
-        LocalRepository localRepository = mock(LocalRepository.class);
-        when(localRepository.getId()).thenReturn("local");
-        when(localRepository.getPath()).thenReturn(Paths.get(localRepo));
-        return getMockSession(localRepository);
-    }
-
-    public static InternalSession getMockSession(LocalRepository localRepository) {
-        InternalSession session = mock(InternalSession.class);
-
-        //
-        // RepositoryFactory
-        //
-        RepositoryFactory repositoryFactory = mock(RepositoryFactory.class);
-        when(session.createRemoteRepository(anyString(), anyString())).thenAnswer(iom -> {
-            String id = iom.getArgument(0, String.class);
-            String url = iom.getArgument(1, String.class);
-            return session.getService(RepositoryFactory.class).createRemote(id, url);
-        });
-        when(session.createRemoteRepository(any()))
-                .thenAnswer(iom -> repositoryFactory.createRemote(iom.getArgument(0, Repository.class)));
-        when(repositoryFactory.createRemote(any(Repository.class))).thenAnswer(iom -> {
-            Repository repository = iom.getArgument(0, Repository.class);
-            return repositoryFactory.createRemote(repository.getId(), repository.getUrl());
-        });
-        when(repositoryFactory.createRemote(anyString(), anyString())).thenAnswer(iom -> {
-            String id = iom.getArgument(0, String.class);
-            String url = iom.getArgument(1, String.class);
-            RemoteRepository remoteRepository =
-                    mock(RemoteRepository.class, withSettings().lenient());
-            when(remoteRepository.getId()).thenReturn(id);
-            when(remoteRepository.getUrl()).thenReturn(url);
-            when(remoteRepository.getProtocol()).thenReturn(URI.create(url).getScheme());
-            return remoteRepository;
-        });
-        when(session.getService(RepositoryFactory.class)).thenReturn(repositoryFactory);
-
-        //
-        // VersionParser
-        //
-        VersionParser versionParser =
-                new DefaultVersionParser(new DefaultModelVersionParser(new GenericVersionScheme()));
-        when(session.parseVersion(any()))
-                .thenAnswer(iom -> versionParser.parseVersion(iom.getArgument(0, String.class)));
-        when(session.getService(VersionParser.class)).thenReturn(versionParser);
-
-        //
-        // LocalRepositoryManager
-        //
-        LocalRepositoryManager localRepositoryManager = mock(LocalRepositoryManager.class);
-        when(session.getPathForLocalArtifact(any(Artifact.class)))
-                .then(iom -> localRepositoryManager.getPathForLocalArtifact(
-                        session, session.getLocalRepository(), iom.getArgument(0, Artifact.class)));
-        when(session.getPathForRemoteArtifact(any(), any()))
-                .thenAnswer(iom -> localRepositoryManager.getPathForRemoteArtifact(
-                        session,
-                        session.getLocalRepository(),
-                        iom.getArgument(0, RemoteRepository.class),
-                        iom.getArgument(1, Artifact.class)));
-        when(localRepositoryManager.getPathForLocalArtifact(any(), any(), any()))
-                .thenAnswer(iom -> {
-                    LocalRepository localRepo = iom.getArgument(1, LocalRepository.class);
-                    Artifact artifact = iom.getArgument(2, Artifact.class);
-                    return localRepo.getPath().resolve(getPathForArtifact(artifact, true));
-                });
-        when(session.getService(LocalRepositoryManager.class)).thenReturn(localRepositoryManager);
-
-        //
-        // ArtifactInstaller
-        //
-        ArtifactInstaller artifactInstaller = mock(ArtifactInstaller.class);
-        doAnswer(iom -> {
-                    artifactInstaller.install(
-                            ArtifactInstallerRequest.build(session, iom.getArgument(0, Collection.class)));
-                    return null;
-                })
-                .when(session)
-                .installArtifacts(any(Collection.class));
-        doAnswer(iom -> {
-                    artifactInstaller.install(ArtifactInstallerRequest.build(
-                            session, Arrays.asList(iom.getArgument(0, Artifact[].class))));
-                    return null;
-                })
-                .when(session)
-                .installArtifacts(any(Artifact[].class));
-        doAnswer(iom -> {
-                    artifactInstaller.install(ArtifactInstallerRequest.build(
-                            iom.getArgument(0, Session.class), iom.getArgument(1, Collection.class)));
-                    return null;
-                })
-                .when(artifactInstaller)
-                .install(any(Session.class), ArgumentMatchers.<Collection<Artifact>>any());
-        when(session.getService(ArtifactInstaller.class)).thenReturn(artifactInstaller);
-
-        //
-        // ArtifactDeployer
-        //
-        ArtifactDeployer artifactDeployer = mock(ArtifactDeployer.class);
-        doAnswer(iom -> {
-                    artifactDeployer.deploy(ArtifactDeployerRequest.build(
-                            iom.getArgument(0, Session.class),
-                            iom.getArgument(1, RemoteRepository.class),
-                            Arrays.asList(iom.getArgument(2, Artifact[].class))));
-                    return null;
-                })
-                .when(session)
-                .deployArtifact(any(), any());
-        doAnswer(iom -> {
-                    artifactDeployer.deploy(ArtifactDeployerRequest.build(
-                            iom.getArgument(0, Session.class),
-                            iom.getArgument(1, RemoteRepository.class),
-                            iom.getArgument(2, Collection.class)));
-                    return null;
-                })
-                .when(artifactDeployer)
-                .deploy(any(), any(), any());
-        when(session.getService(ArtifactDeployer.class)).thenReturn(artifactDeployer);
-
-        //
-        // ArtifactManager
-        //
-        ArtifactManager artifactManager = mock(ArtifactManager.class);
-        Map<Artifact, Path> paths = new HashMap<>();
-        doAnswer(iom -> {
-                    paths.put(iom.getArgument(0), iom.getArgument(1));
-                    return null;
-                })
-                .when(artifactManager)
-                .setPath(any(), any());
-        doAnswer(iom -> Optional.ofNullable(paths.get(iom.getArgument(0, Artifact.class))))
-                .when(artifactManager)
-                .getPath(any());
-        doAnswer(iom -> artifactManager.getPath(iom.getArgument(0, Artifact.class)))
-                .when(session)
-                .getArtifactPath(any());
-        when(session.getService(ArtifactManager.class)).thenReturn(artifactManager);
-
-        //
-        // ProjectManager
-        //
-        ProjectManager projectManager = mock(ProjectManager.class);
-        Map<Project, Collection<Artifact>> attachedArtifacts = new HashMap<>();
-        doAnswer(iom -> {
-                    Project project = iom.getArgument(1, Project.class);
-                    String type = iom.getArgument(2, String.class);
-                    Path path = iom.getArgument(3, Path.class);
-                    Artifact artifact = session.createArtifact(
-                            project.getGroupId(), project.getArtifactId(), project.getVersion(), null, null, type);
-                    artifactManager.setPath(artifact, path);
-                    attachedArtifacts
-                            .computeIfAbsent(project, p -> new ArrayList<>())
-                            .add(artifact);
-                    return null;
-                })
-                .when(projectManager)
-                .attachArtifact(same(session), any(Project.class), any(), any());
-        doAnswer(iom -> {
-                    Project project = iom.getArgument(0, Project.class);
-                    Artifact artifact = iom.getArgument(1, Artifact.class);
-                    Path path = iom.getArgument(2, Path.class);
-                    artifactManager.setPath(artifact, path);
-                    attachedArtifacts
-                            .computeIfAbsent(project, p -> new ArrayList<>())
-                            .add(artifact);
-                    return null;
-                })
-                .when(projectManager)
-                .attachArtifact(any(Project.class), any(Artifact.class), any(Path.class));
-        when(projectManager.getAttachedArtifacts(any()))
-                .then(iom ->
-                        attachedArtifacts.computeIfAbsent(iom.getArgument(0, Project.class), p -> new ArrayList<>()));
-        when(projectManager.getAllArtifacts(any())).then(iom -> {
-            Project project = iom.getArgument(0, Project.class);
-            List<Artifact> result = new ArrayList<>();
-            result.addAll(project.getArtifacts());
-            result.addAll(attachedArtifacts.computeIfAbsent(project, p -> new ArrayList<>()));
-            return result;
-        });
-        when(session.getService(ProjectManager.class)).thenReturn(projectManager);
-
-        //
-        // ArtifactFactory
-        //
-        ArtifactFactory artifactFactory = mock(ArtifactFactory.class);
-        when(artifactFactory.create(any())).then(iom -> {
-            ArtifactFactoryRequest request = iom.getArgument(0, ArtifactFactoryRequest.class);
-            String classifier = request.getClassifier();
-            String extension = request.getExtension();
-            String type = request.getType();
-            if (classifier == null) {
-                classifier = "";
-            }
-            if (extension == null) {
-                extension = type != null ? type : "";
-            }
-            return new ArtifactStub(
-                    request.getGroupId(), request.getArtifactId(), classifier, request.getVersion(), extension);
-        });
-        when(session.createArtifact(any(), any(), any(), any(), any(), any())).thenAnswer(iom -> {
-            String groupId = iom.getArgument(0, String.class);
-            String artifactId = iom.getArgument(1, String.class);
-            String version = iom.getArgument(2, String.class);
-            String classifier = iom.getArgument(3, String.class);
-            String extension = iom.getArgument(4, String.class);
-            String type = iom.getArgument(5, String.class);
-            return session.getService(ArtifactFactory.class)
-                    .create(ArtifactFactoryRequest.builder()
-                            .session(session)
-                            .groupId(groupId)
-                            .artifactId(artifactId)
-                            .version(version)
-                            .classifier(classifier)
-                            .extension(extension)
-                            .type(type)
-                            .build());
-        });
-        when(session.createArtifact(any(), any(), any(), any())).thenAnswer(iom -> {
-            String groupId = iom.getArgument(0, String.class);
-            String artifactId = iom.getArgument(1, String.class);
-            String version = iom.getArgument(2, String.class);
-            String extension = iom.getArgument(3, String.class);
-            return session.getService(ArtifactFactory.class)
-                    .create(ArtifactFactoryRequest.builder()
-                            .session(session)
-                            .groupId(groupId)
-                            .artifactId(artifactId)
-                            .version(version)
-                            .extension(extension)
-                            .build());
-        });
-        when(session.getService(ArtifactFactory.class)).thenReturn(artifactFactory);
-
-        //
-        // ProjectBuilder
-        //
-        ProjectBuilder projectBuilder = mock(ProjectBuilder.class);
-        when(projectBuilder.build(any(ProjectBuilderRequest.class))).then(iom -> {
-            ProjectBuilderRequest request = iom.getArgument(0, ProjectBuilderRequest.class);
-            ProjectBuilderResult result = mock(ProjectBuilderResult.class);
-            Model model = new MavenStaxReader().read(request.getSource().get().openStream());
-            ProjectStub projectStub = new ProjectStub();
-            projectStub.setModel(model);
-            ArtifactStub artifactStub = new ArtifactStub(
-                    model.getGroupId(), model.getArtifactId(), "", model.getVersion(), model.getPackaging());
-            if (!"pom".equals(model.getPackaging())) {
-                projectStub.setMainArtifact(artifactStub);
-            }
-            when(result.getProject()).thenReturn(Optional.of(projectStub));
-            return result;
-        });
-        when(session.getService(ProjectBuilder.class)).thenReturn(projectBuilder);
-
-        //
-        // ModelXmlFactory
-        //
-        when(session.getService(ModelXmlFactory.class)).thenReturn(new DefaultModelXmlFactory());
-
-        //
-        // Other
-        //
-        Properties sysProps = new Properties();
-        Properties usrProps = new Properties();
-        doReturn(sysProps).when(session).getSystemProperties();
-        doReturn(usrProps).when(session).getUserProperties();
-        when(session.getLocalRepository()).thenReturn(localRepository);
-        when(session.getData()).thenReturn(new TestSessionData());
-        when(session.withLocalRepository(any()))
-                .thenAnswer(iom -> getMockSession(iom.getArgument(0, LocalRepository.class)));
-
-        return session;
-    }
-
-    static String getPathForArtifact(Artifact artifact, boolean local) {
-        StringBuilder path = new StringBuilder(128);
-        path.append(artifact.getGroupId().replace('.', '/')).append('/');
-        path.append(artifact.getArtifactId()).append('/');
-        path.append(artifact.getVersion()).append('/');
-        path.append(artifact.getArtifactId()).append('-');
-        path.append(artifact.getVersion());
-        if (artifact.getClassifier().length() > 0) {
-            path.append('-').append(artifact.getClassifier());
-        }
-        if (artifact.getExtension().length() > 0) {
-            path.append('.').append(artifact.getExtension());
-        }
-        return path.toString();
+public class SessionStub implements Session {
+
+    private Map<String, String> userProperties;
+
+    private Map<String, String> systemProperties;
+
+    private final Settings settings;
+
+    public SessionStub(Settings settings) {
+        this(null, null, settings);
     }
 
-    static class TestSessionData implements SessionData {
-        private final Map<Key<?>, Object> map = new ConcurrentHashMap<>();
+    public SessionStub() {
+        this(null, null, null);
+    }
 
-        @Override
-        public <T> void set(Key<T> key, T value) {
-            map.put(key, value);
-        }
+    public SessionStub(Map<String, String> userProperties) {
+        this(null, userProperties, null);
+    }
+
+    public SessionStub(Map<String, String> systemProperties, Map<String, String> userProperties, Settings settings) {
 
-        @Override
-        public <T> boolean replace(Key<T> key, T oldValue, T newValue) {
-            return map.replace(key, oldValue, newValue);
+        this.settings = settings;
+
+        this.systemProperties = new HashMap<>();
+        if (systemProperties != null) {
+            this.systemProperties.putAll(systemProperties);
         }
+        System.getProperties().forEach((k, v) -> this.systemProperties.put(k.toString(), v.toString()));
 
-        @Override
-        @SuppressWarnings("unchecked")
-        public <T> T get(Key<T> key) {
-            return (T) map.get(key);
+        this.userProperties = new HashMap<>();
+        if (userProperties != null) {
+            this.userProperties.putAll(userProperties);
         }
+    }
+
+    @Override
+    public Settings getSettings() {
+        return settings;
+    }
+
+    @Override
+    public Map<String, String> getSystemProperties() {
+        return this.systemProperties;
+    }
 
-        @Override
-        @SuppressWarnings("unchecked")
-        public <T> T computeIfAbsent(Key<T> key, Supplier<T> supplier) {
-            return (T) map.computeIfAbsent(key, k -> supplier.get());
+    @Override
+    public Map<String, String> getUserProperties() {
+        return this.userProperties;
+    }
+
+    @Nonnull
+    public Map<String, String> getEffectiveProperties(@Nullable Project project) {
+        HashMap<String, String> result = new HashMap<>(getSystemProperties());
+        if (project != null) {
+            result.putAll(project.getModel().getProperties());
         }
+        result.putAll(getUserProperties());
+        return result;
+    }
+
+    @Override
+    public LocalRepository getLocalRepository() {
+        return null;
+    }
+
+    @Override
+    public Path getTopDirectory() {
+        return null;
+    }
+
+    @Override
+    public Path getRootDirectory() {
+        return null;
+    }
+
+    @Override
+    public List<RemoteRepository> getRemoteRepositories() {
+        return null;
+    }
+
+    @Override
+    public SessionData getData() {
+        return null;
+    }
+
+    @Override
+    public Version getMavenVersion() {
+        return null;
+    }
+
+    @Override
+    public int getDegreeOfConcurrency() {
+        return 0;
+    }
+
+    @Override
+    public Instant getStartTime() {
+        return null;
+    }
+
+    @Override
+    public List<Project> getProjects() {
+        return null;
+    }
+
+    @Override
+    public Map<String, Object> getPluginContext(Project project) {
+        return null;
+    }
+
+    @Override
+    public <T extends Service> T getService(Class<T> clazz) {
+        return null;
+    }
+
+    @Override
+    public Session withLocalRepository(LocalRepository localRepository) {
+        return null;
+    }
+
+    @Override
+    public Session withRemoteRepositories(List<RemoteRepository> repositories) {
+        return null;
+    }
+
+    @Override
+    public void registerListener(Listener listener) {}
+
+    @Override
+    public void unregisterListener(Listener listener) {}
+
+    @Override
+    public Collection<Listener> getListeners() {
+        return null;
+    }
+
+    @Override
+    public LocalRepository createLocalRepository(Path path) {
+        return null;
+    }
+
+    @Override
+    public RemoteRepository createRemoteRepository(String id, String url) {
+        return null;
+    }
+
+    @Override
+    public RemoteRepository createRemoteRepository(Repository repository) {
+        return null;
+    }
+
+    @Override
+    public Artifact createArtifact(String groupId, String artifactId, String version, String extension) {
+        return null;
+    }
+
+    @Override
+    public Artifact createArtifact(
+            String groupId, String artifactId, String version, String classifier, String extension, String type) {
+        return null;
+    }
+
+    @Override
+    public ArtifactCoordinate createArtifactCoordinate(String s, String s1, String s2, String s3) {
+        return null;
+    }
+
+    @Override
+    public ArtifactCoordinate createArtifactCoordinate(String coordString) {
+        return null;
+    }
+
+    @Override
+    public ArtifactCoordinate createArtifactCoordinate(
+            String s, String s1, String s2, String s3, String s4, String s5) {
+        return null;
+    }
+
+    @Override
+    public ArtifactCoordinate createArtifactCoordinate(Artifact artifact) {
+        return null;
+    }
+
+    @Override
+    public DependencyCoordinate createDependencyCoordinate(ArtifactCoordinate artifactCoordinate) {
+        return null;
+    }
+
+    @Override
+    public DependencyCoordinate createDependencyCoordinate(Dependency dependency) {
+        return null;
+    }
+
+    @Override
+    public Map.Entry<Artifact, Path> resolveArtifact(Artifact artifact) {
+        return null;
+    }
+
+    @Override
+    public Map.Entry<Artifact, Path> resolveArtifact(ArtifactCoordinate coordinate) {
+        return null;
+    }
+
+    @Override
+    public Map<Artifact, Path> resolveArtifacts(ArtifactCoordinate... artifactCoordinates) {
+        return null;
+    }
+
+    @Override
+    public Map<Artifact, Path> resolveArtifacts(Collection<? extends ArtifactCoordinate> collection) {
+        return null;
+    }
+
+    @Override
+    public Map<Artifact, Path> resolveArtifacts(Artifact... artifacts) {
+        return null;
+    }
+
+    @Override
+    public List<Node> flattenDependencies(Node node, PathScope scope) {
+        return null;
+    }
+
+    @Override
+    public List<Path> resolveDependencies(DependencyCoordinate dependencyCoordinate) {
+        return null;
+    }
+
+    @Override
+    public List<Path> resolveDependencies(List<DependencyCoordinate> dependencyCoordinates) {
+        return null;
+    }
+
+    @Override
+    public List<Path> resolveDependencies(Project project, PathScope scope) {
+        return null;
+    }
+
+    @Override
+    public Version resolveVersion(ArtifactCoordinate artifact) {
+        return null;
+    }
+
+    @Override
+    public List<Version> resolveVersionRange(ArtifactCoordinate artifact) {
+        return null;
+    }
+
+    @Override
+    public void installArtifacts(Artifact... artifacts) {}
+
+    @Override
+    public void installArtifacts(Collection<Artifact> artifacts) {}
+
+    @Override
+    public void deployArtifact(RemoteRepository repository, Artifact... artifacts) {}
+
+    @Override
+    public void setArtifactPath(Artifact artifact, Path path) {}
+
+    @Override
+    public Optional<Path> getArtifactPath(Artifact artifact) {
+        return Optional.empty();
+    }
+
+    @Override
+    public boolean isVersionSnapshot(String version) {
+        return false;
+    }
+
+    @Override
+    public Node collectDependencies(Artifact artifact) {
+        return null;
+    }
+
+    @Override
+    public Node collectDependencies(Project project) {
+        return null;
+    }
+
+    @Override
+    public Node collectDependencies(DependencyCoordinate dependencyCoordinate) {
+        return null;
+    }
+
+    @Override
+    public Path getPathForLocalArtifact(Artifact artifact) {
+        return null;
+    }
+
+    @Override
+    public Path getPathForRemoteArtifact(RemoteRepository remote, Artifact artifact) {
+        return null;
+    }
+
+    @Override
+    public Version parseVersion(String version) {
+        return null;
+    }
+
+    @Override
+    public VersionRange parseVersionRange(String versionRange) {
+        return null;
+    }
+
+    @Override
+    public VersionConstraint parseVersionConstraint(String s) {
+        return null;
+    }
+
+    @Override
+    public Map<PathType, List<Path>> resolveDependencies(
+            DependencyCoordinate dependencyCoordinate, PathScope scope, Collection<PathType> desiredTypes) {
+        return Map.of();
+    }
+
+    @Override
+    public Map<PathType, List<Path>> resolveDependencies(
+            Project project, PathScope scope, Collection<PathType> desiredTypes) {
+        return Map.of();
+    }
+
+    @Override
+    public Type requireType(String id) {
+        return null;
+    }
+
+    @Override
+    public Language requireLanguage(String id) {
+        return null;
+    }
+
+    @Override
+    public Packaging requirePackaging(String id) {
+        return null;
+    }
+
+    @Override
+    public ProjectScope requireProjectScope(String id) {
+        return null;
+    }
+
+    @Override
+    public DependencyScope requireDependencyScope(String id) {
+        return null;
+    }
+
+    @Override
+    public PathScope requirePathScope(String id) {
+        return null;
     }
 }
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/api/di/testing/SimpleDITest.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/api/di/testing/SimpleDITest.java
index 429a3f5..49fc6fa 100644
--- a/maven-plugin-testing-harness/src/test/java/org/apache/maven/api/di/testing/SimpleDITest.java
+++ b/maven-plugin-testing-harness/src/test/java/org/apache/maven/api/di/testing/SimpleDITest.java
@@ -23,7 +23,7 @@ import java.io.File;
 import org.apache.maven.api.Session;
 import org.apache.maven.api.di.Inject;
 import org.apache.maven.api.di.Provides;
-import org.apache.maven.api.plugin.testing.stubs.SessionStub;
+import org.apache.maven.api.plugin.testing.stubs.SessionMock;
 import org.junit.jupiter.api.Test;
 
 import static org.apache.maven.api.di.testing.MavenDIExtension.getBasedir;
@@ -45,6 +45,6 @@ public class SimpleDITest {
 
     @Provides
     Session createSession() {
-        return SessionStub.getMockSession(LOCAL_REPO);
+        return SessionMock.getMockSession(LOCAL_REPO);
     }
 }
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/api/plugin/testing/ExpressionEvaluatorTest.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/api/plugin/testing/ExpressionEvaluatorTest.java
index 51b1ed9..30834c5 100644
--- a/maven-plugin-testing-harness/src/test/java/org/apache/maven/api/plugin/testing/ExpressionEvaluatorTest.java
+++ b/maven-plugin-testing-harness/src/test/java/org/apache/maven/api/plugin/testing/ExpressionEvaluatorTest.java
@@ -29,7 +29,7 @@ import org.apache.maven.api.di.Provides;
 import org.apache.maven.api.plugin.MojoException;
 import org.apache.maven.api.plugin.annotations.Mojo;
 import org.apache.maven.api.plugin.testing.stubs.ProjectStub;
-import org.apache.maven.api.plugin.testing.stubs.SessionStub;
+import org.apache.maven.api.plugin.testing.stubs.SessionMock;
 import org.junit.jupiter.api.Test;
 
 import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
@@ -123,7 +123,7 @@ public class ExpressionEvaluatorTest {
     @Provides
     @SuppressWarnings("unused")
     Session session() {
-        Session session = SessionStub.getMockSession(LOCAL_REPO);
+        Session session = SessionMock.getMockSession(LOCAL_REPO);
         doReturn(new Properties()).when(session).getSystemProperties();
         doReturn(new Properties()).when(session).getUserProperties();
         doAnswer(iom -> Paths.get(MojoExtension.getBasedir())).when(session).getRootDirectory();