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

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


The following commit(s) were added to refs/heads/maven-deploy-plugin-3.x by 
this push:
     new b8c9b6c  Migration to JUnit 5 - avoid using AbstractMojoTestCase
b8c9b6c is described below

commit b8c9b6cd113541dae22ceaa13c767bbbbda042a1
Author: Slawomir Jaranowski <[email protected]>
AuthorDate: Mon Feb 16 22:21:40 2026 +0100

    Migration to JUnit 5 - avoid using AbstractMojoTestCase
---
 pom.xml                                            |  31 +-
 .../maven/plugins/deploy/DeployFileMojoTest.java   |  85 +--
 .../maven/plugins/deploy/DeployMojoTest.java       | 660 ++++++---------------
 .../deploy/stubs/ArtifactRepositoryStub.java       | 119 ----
 .../deploy/stubs/ArtifactRepositoryStub2.java      |  50 --
 .../plugins/deploy/stubs/AttachedArtifactStub.java |  34 --
 .../plugins/deploy/stubs/DeployArtifactStub.java   | 116 ----
 .../deploy/stubs/DeployBomArtifactStub.java        |  37 --
 .../deploy/stubs/DeployPomArtifactStub.java        |  37 --
 .../plugins/deploy/stubs/MavenProjectStub.java     |  42 --
 .../unit/basic-deploy-bom/plugin-config.xml        |  39 --
 .../target/deploy-test-file-1.0-SNAPSHOT.pom       |  28 -
 .../unit/basic-deploy-pom/plugin-config.xml        |  39 --
 .../target/deploy-test-file-1.0-SNAPSHOT.pom       |  28 -
 .../unit/basic-deploy-scp/plugin-config.xml        |  38 --
 .../target/deploy-test-file-1.0-SNAPSHOT.jar       |   1 -
 .../target/deploy-test-file-1.0-SNAPSHOT.jar       |   1 -
 .../plugin-config.xml                              |  41 --
 .../target/deploy-test-file-1.0-SNAPSHOT.jar       |   1 -
 .../plugin-config.xml => deploy-test/pom.xml}      | Bin 3254 -> 1984 bytes
 20 files changed, 202 insertions(+), 1225 deletions(-)

diff --git a/pom.xml b/pom.xml
index 8e605c3..679edce 100644
--- a/pom.xml
+++ b/pom.xml
@@ -89,8 +89,6 @@ under the License.
     <mavenWarPluginVersion>${version.maven-war-plugin}</mavenWarPluginVersion>
 
     
<project.build.outputTimestamp>2025-02-23T17:24:00Z</project.build.outputTimestamp>
-
-    <version.maven-invoker-plugin>3.9.1</version.maven-invoker-plugin>
   </properties>
 
   <dependencies>
@@ -119,6 +117,12 @@ under the License.
       <scope>provided</scope>
     </dependency>
 
+    <dependency>
+      <groupId>javax.inject</groupId>
+      <artifactId>javax.inject</artifactId>
+      <version>1</version>
+      <scope>provided</scope>
+    </dependency>
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-api</artifactId>
@@ -162,12 +166,6 @@ under the License.
       <version>3.5.1</version>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-resolver-provider</artifactId>
-      <version>${mavenVersion}</version>
-      <scope>test</scope>
-    </dependency>
     <dependency>
       <groupId>org.apache.maven.resolver</groupId>
       <artifactId>maven-resolver-connector-basic</artifactId>
@@ -180,34 +178,17 @@ under the License.
       <version>${resolverVersion}</version>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>org.apache.maven.resolver</groupId>
-      <artifactId>maven-resolver-transport-http</artifactId>
-      <version>${resolverVersion}</version>
-      <scope>test</scope>
-    </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
       <artifactId>mockito-core</artifactId>
       <version>4.11.0</version>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.13.2</version>
-      <scope>test</scope>
-    </dependency>
     <dependency>
       <groupId>org.junit.jupiter</groupId>
       <artifactId>junit-jupiter-api</artifactId>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>org.junit.vintage</groupId>
-      <artifactId>junit-vintage-engine</artifactId>
-      <scope>test</scope>
-    </dependency>
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-nop</artifactId>
diff --git 
a/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoTest.java 
b/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoTest.java
index f771eca..c4de579 100644
--- a/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoTest.java
+++ b/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoTest.java
@@ -30,10 +30,6 @@ import org.apache.maven.api.plugin.testing.InjectMojo;
 import org.apache.maven.api.plugin.testing.MojoTest;
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.model.Model;
-import org.eclipse.aether.DefaultRepositorySystemSession;
-import org.eclipse.aether.internal.impl.DefaultLocalPathComposer;
-import org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory;
-import org.eclipse.aether.repository.LocalRepository;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
@@ -43,12 +39,11 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.junit.jupiter.api.Assertions.fail;
-import static org.mockito.Mockito.when;
 
 /**
  * @author <a href="mailto:[email protected]";>Allan Ramirez</a>
  */
-@MojoTest
+@MojoTest(realRepositorySession = true)
 class DeployFileMojoTest {
 
     private File remoteRepo;
@@ -57,15 +52,8 @@ class DeployFileMojoTest {
     private MavenSession session;
 
     @BeforeEach
-    void setUp() throws Exception {
-        DefaultRepositorySystemSession repositorySession = new 
DefaultRepositorySystemSession();
-        repositorySession.setLocalRepositoryManager(
-                new SimpleLocalRepositoryManagerFactory(new 
DefaultLocalPathComposer())
-                        .newInstance(repositorySession, new 
LocalRepository(getBasedir() + "/target/local-repo")));
-        when(session.getRepositorySession()).thenReturn(repositorySession);
-
+    void setUp() {
         remoteRepo = new File(getBasedir(), "target/remote-repo");
-
         if (!remoteRepo.exists()) {
             remoteRepo.mkdirs();
         }
@@ -73,7 +61,7 @@ class DeployFileMojoTest {
 
     @Test
     @InjectMojo(goal = "deploy-file")
-    void testDeployTestEnvironment(DeployFileMojo mojo) throws Exception {
+    void testDeployTestEnvironment(DeployFileMojo mojo) {
         assertNotNull(mojo);
     }
 
@@ -84,36 +72,22 @@ class DeployFileMojoTest {
 
         assertNotNull(mojo);
 
-        String groupId = (String) getVariableValueFromObject(mojo, "groupId");
-
-        String artifactId = (String) getVariableValueFromObject(mojo, 
"artifactId");
-
-        String version = (String) getVariableValueFromObject(mojo, "version");
-
-        String packaging = (String) getVariableValueFromObject(mojo, 
"packaging");
-
-        File file = (File) getVariableValueFromObject(mojo, "file");
-
-        String repositoryId = (String) getVariableValueFromObject(mojo, 
"repositoryId");
-
-        String url = (String) getVariableValueFromObject(mojo, "url");
-
-        String skip = (String) getVariableValueFromObject(mojo, "skip");
+        String groupId = getVariableValueFromObject(mojo, "groupId");
+        String artifactId = getVariableValueFromObject(mojo, "artifactId");
+        String version = getVariableValueFromObject(mojo, "version");
+        String packaging = getVariableValueFromObject(mojo, "packaging");
+        File file = getVariableValueFromObject(mojo, "file");
+        String repositoryId = getVariableValueFromObject(mojo, "repositoryId");
+        String url = getVariableValueFromObject(mojo, "url");
+        String skip = getVariableValueFromObject(mojo, "skip");
 
         assertEquals("org.apache.maven.test", groupId);
-
         assertEquals("maven-deploy-file-test", artifactId);
-
         assertEquals("1.0", version);
-
         assertEquals("jar", packaging);
-
         assertEquals("snapshots", skip);
-
         assertTrue(file.exists());
-
         assertEquals("deploy-test", repositoryId);
-
         assertEquals("file://" + getBasedir() + 
"/target/remote-repo/deploy-file-test", url);
 
         mojo.execute();
@@ -130,15 +104,10 @@ class DeployFileMojoTest {
         Model model = mojo.readModel(pom);
 
         assertEquals("4.0.0", model.getModelVersion());
-
         assertEquals(groupId, model.getGroupId());
-
         assertEquals(artifactId, model.getArtifactId());
-
         assertEquals(version, model.getVersion());
-
         assertEquals(packaging, model.getPackaging());
-
         assertEquals("POM was created from deploy:deploy-file", 
model.getDescription());
 
         // check the remote-repo
@@ -181,13 +150,10 @@ class DeployFileMojoTest {
 
         assertNotNull(mojo);
 
-        String classifier = (String) getVariableValueFromObject(mojo, 
"classifier");
-
-        String groupId = (String) getVariableValueFromObject(mojo, "groupId");
-
-        String artifactId = (String) getVariableValueFromObject(mojo, 
"artifactId");
-
-        String version = (String) getVariableValueFromObject(mojo, "version");
+        String classifier = getVariableValueFromObject(mojo, "classifier");
+        String groupId = getVariableValueFromObject(mojo, "groupId");
+        String artifactId = getVariableValueFromObject(mojo, "artifactId");
+        String version = getVariableValueFromObject(mojo, "version");
 
         assertEquals("bin", classifier);
 
@@ -223,16 +189,12 @@ class DeployFileMojoTest {
 
         assertNotNull(mojo);
 
-        String groupId = (String) getVariableValueFromObject(mojo, "groupId");
-
-        String artifactId = (String) getVariableValueFromObject(mojo, 
"artifactId");
-
-        String version = (String) getVariableValueFromObject(mojo, "version");
+        String groupId = getVariableValueFromObject(mojo, "groupId");
+        String artifactId = getVariableValueFromObject(mojo, "artifactId");
+        String version = getVariableValueFromObject(mojo, "version");
 
         assertEquals("org.apache.maven.test", groupId);
-
         assertEquals("maven-deploy-file-test", artifactId);
-
         assertEquals("1.0", version);
 
         mojo.execute();
@@ -253,13 +215,10 @@ class DeployFileMojoTest {
 
         assertNotNull(mojo);
 
-        String packaging = (String) getVariableValueFromObject(mojo, 
"packaging");
-
-        String groupId = (String) getVariableValueFromObject(mojo, "groupId");
-
-        String artifactId = (String) getVariableValueFromObject(mojo, 
"artifactId");
-
-        String version = (String) getVariableValueFromObject(mojo, "version");
+        String packaging = getVariableValueFromObject(mojo, "packaging");
+        String groupId = getVariableValueFromObject(mojo, "groupId");
+        String artifactId = getVariableValueFromObject(mojo, "artifactId");
+        String version = getVariableValueFromObject(mojo, "version");
 
         assertEquals("differentpackaging", packaging);
 
diff --git a/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java 
b/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java
index dc3345a..cd98529 100644
--- a/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java
+++ b/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java
@@ -18,154 +18,103 @@
  */
 package org.apache.maven.plugins.deploy;
 
+import javax.inject.Inject;
+
 import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Objects;
-import java.util.Properties;
 import java.util.concurrent.ConcurrentHashMap;
 
+import org.apache.maven.api.plugin.testing.Basedir;
+import org.apache.maven.api.plugin.testing.InjectMojo;
+import org.apache.maven.api.plugin.testing.MojoParameter;
+import org.apache.maven.api.plugin.testing.MojoTest;
+import org.apache.maven.artifact.DefaultArtifact;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
+import org.apache.maven.bridge.MavenRepositorySystem;
 import org.apache.maven.execution.MavenSession;
+import org.apache.maven.model.Repository;
 import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.descriptor.PluginDescriptor;
-import org.apache.maven.plugin.testing.AbstractMojoTestCase;
-import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
-import org.apache.maven.plugins.deploy.stubs.ArtifactRepositoryStub;
-import org.apache.maven.plugins.deploy.stubs.DeployArtifactStub;
 import org.apache.maven.project.MavenProject;
-import org.codehaus.plexus.util.FileUtils;
-import org.eclipse.aether.DefaultRepositorySystemSession;
-import org.eclipse.aether.RepositorySystem;
-import org.eclipse.aether.internal.impl.DefaultLocalPathComposer;
-import org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory;
-import org.eclipse.aether.repository.LocalRepository;
+import org.apache.maven.project.MavenProjectHelper;
 import org.eclipse.aether.repository.RemoteRepository;
-import org.junit.Ignore;
-import org.mockito.InjectMocks;
-import org.mockito.MockitoAnnotations;
-
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.mock;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.fail;
 import static org.mockito.Mockito.when;
 
 /**
  * @author <a href="mailto:[email protected]";>Allan Ramirez</a>
  */
-public class DeployMojoTest extends AbstractMojoTestCase {
-    private File remoteRepo;
-
-    private File localRepo;
-
-    private static final String LOCAL_REPO = getBasedir() + 
"/target/local-repo";
+@MojoTest(realRepositorySession = true)
+@Basedir("/unit/deploy-test")
+class DeployMojoTest {
 
-    private static final String REMOTE_REPO = getBasedir() + 
"/target/remote-repo";
+    @TempDir
+    private Path tempDir;
 
-    DeployArtifactStub artifact;
-
-    final MavenProjectStub project = new MavenProjectStub();
-
-    private AutoCloseable openMocks;
-
-    private MavenSession session;
+    private File remoteRepo;
 
-    @InjectMocks
-    private DeployMojo mojo;
+    private File localRepo;
 
-    public void setUp() throws Exception {
-        super.setUp();
+    @Inject
+    private MavenSession mavenSession;
 
-        session = mock(MavenSession.class);
-        when(session.getPluginContext(any(PluginDescriptor.class), 
any(MavenProject.class)))
-                .thenReturn(new ConcurrentHashMap<>());
-        DefaultRepositorySystemSession repositorySession = new 
DefaultRepositorySystemSession();
-        repositorySession.setLocalRepositoryManager(
-                new SimpleLocalRepositoryManagerFactory(new 
DefaultLocalPathComposer())
-                        .newInstance(repositorySession, new 
LocalRepository(LOCAL_REPO)));
-        when(session.getRepositorySession()).thenReturn(repositorySession);
+    @Inject
+    private MavenProject mavenProject;
 
-        remoteRepo = new File(REMOTE_REPO);
+    @Inject
+    private MavenRepositorySystem repositorySystem;
 
-        remoteRepo.mkdirs();
+    @Inject
+    private ArtifactHandlerManager artifactHandlerManager;
 
-        localRepo = new File(LOCAL_REPO);
+    @Inject
+    private MavenProjectHelper mavenProjectHelper;
 
-        if (localRepo.exists()) {
-            FileUtils.deleteDirectory(localRepo);
-        }
+    @BeforeEach
+    void setUp() throws Exception {
+        remoteRepo = tempDir.resolve("remote-repo").toFile();
+        localRepo = tempDir.resolve("local-repo").toFile();
 
-        if (remoteRepo.exists()) {
-            FileUtils.deleteDirectory(remoteRepo);
-        }
-    }
+        Repository deploymentRepository = new Repository();
+        deploymentRepository.setId("deploy-test");
+        deploymentRepository.setUrl("file://" + remoteRepo.getAbsolutePath());
 
-    public void tearDown() throws Exception {
-        super.tearDown();
+        mavenProject.setSnapshotArtifactRepository(
+                
repositorySystem.buildArtifactRepositoryFromRepo(deploymentRepository));
 
-        if (remoteRepo.exists()) {
-            // FileUtils.deleteDirectory( remoteRepo );
-        }
+        mavenProject.setGroupId("org.apache.maven.test");
+        mavenProject.setArtifactId("maven-deploy-test");
+        mavenProject.setVersion("1.0-SNAPSHOT");
 
-        if (openMocks != null) {
-            openMocks.close();
-        }
+        
when(mavenSession.getProjects()).thenReturn(Collections.singletonList(mavenProject));
+        mavenSession.getRequest().setLocalRepositoryPath(localRepo);
     }
 
-    public void testDeployTestEnvironment() throws Exception {
-        File testPom = new File(getBasedir(), 
"target/test-classes/unit/basic-deploy-test/plugin-config.xml");
-
-        mojo = (DeployMojo) lookupMojo("deploy", testPom);
-
+    @Test
+    @InjectMojo(goal = "deploy")
+    void testDeployTestEnvironment(DeployMojo mojo) {
         assertNotNull(mojo);
     }
 
-    public void testBasicDeploy() throws Exception {
-        File testPom = new File(getBasedir(), 
"target/test-classes/unit/basic-deploy-test/plugin-config.xml");
-
-        mojo = (DeployMojo) lookupMojo("deploy", testPom);
-
-        openMocks = MockitoAnnotations.openMocks(this);
-
-        assertNotNull(mojo);
-
-        DefaultRepositorySystemSession repositorySession = new 
DefaultRepositorySystemSession();
-        repositorySession.setLocalRepositoryManager(
-                new SimpleLocalRepositoryManagerFactory(new 
DefaultLocalPathComposer())
-                        .newInstance(repositorySession, new 
LocalRepository(LOCAL_REPO)));
-        when(session.getRepositorySession()).thenReturn(repositorySession);
-
-        File file = new File(
-                getBasedir(),
-                "target/test-classes/unit/basic-deploy-test/target/" + 
"deploy-test-file-1.0-SNAPSHOT.jar");
-
-        assertTrue(file.exists());
-
-        MavenProject project = (MavenProject) getVariableValueFromObject(mojo, 
"project");
-        project.setGroupId("org.apache.maven.test");
-        project.setArtifactId("maven-deploy-test");
-        project.setVersion("1.0-SNAPSHOT");
-
-        setVariableValueToObject(mojo, "pluginContext", new 
ConcurrentHashMap<>());
-        setVariableValueToObject(mojo, "reactorProjects", 
Collections.singletonList(project));
-
-        artifact = (DeployArtifactStub) project.getArtifact();
-
-        String packaging = project.getPackaging();
-
-        assertEquals("jar", packaging);
-
-        artifact.setFile(file);
-
-        ArtifactRepositoryStub repo = getRepoStub(mojo);
-
-        assertNotNull(repo);
+    @Test
+    @InjectMojo(goal = "deploy")
+    void testBasicDeploy(DeployMojo mojo) throws Exception {
+        mojo.setPluginContext(new ConcurrentHashMap<>());
 
-        repo.setAppendToUrl("basic-deploy-test");
-
-        assertEquals("deploy-test", repo.getId());
-        assertEquals("deploy-test", repo.getKey());
-        assertEquals("file", repo.getProtocol());
-        assertEquals("file://" + getBasedir() + 
"/target/remote-repo/basic-deploy-test", repo.getUrl());
+        setProjectArtifact(mavenProject, "jar");
+        assertEquals("jar", mavenProject.getPackaging());
 
         mojo.execute();
 
@@ -188,8 +137,6 @@ public class DeployMojoTest extends AbstractMojoTestCase {
         expectedFiles.add("resolver-status.properties");
         expectedFiles.add("resolver-status.properties");
 
-        File localRepo = new File(LOCAL_REPO, "");
-
         File[] files = localRepo.listFiles();
 
         for (File file2 : Objects.requireNonNull(files)) {
@@ -224,8 +171,6 @@ public class DeployMojoTest extends AbstractMojoTestCase {
         expectedFiles.add("maven-metadata.xml.md5");
         expectedFiles.add("maven-metadata.xml.sha1");
 
-        remoteRepo = new File(remoteRepo, "basic-deploy-test");
-
         files = remoteRepo.listFiles();
 
         for (File file1 : Objects.requireNonNull(files)) {
@@ -237,100 +182,28 @@ public class DeployMojoTest extends AbstractMojoTestCase 
{
         assertEquals(0, getSizeOfExpectedFiles(fileList, expectedFiles));
     }
 
-    public void testSkippingDeploy() throws Exception {
-        File testPom = new File(getBasedir(), 
"target/test-classes/unit/basic-deploy-test/plugin-config.xml");
-
-        mojo = (DeployMojo) lookupMojo("deploy", testPom);
-
-        assertNotNull(mojo);
-
-        File file = new File(
-                getBasedir(),
-                "target/test-classes/unit/basic-deploy-test/target/" + 
"deploy-test-file-1.0-SNAPSHOT.jar");
-
-        assertTrue(file.exists());
-
-        MavenProject project = (MavenProject) getVariableValueFromObject(mojo, 
"project");
-
-        setVariableValueToObject(mojo, "pluginDescriptor", new 
PluginDescriptor());
-        setVariableValueToObject(mojo, "pluginContext", new 
ConcurrentHashMap<>());
-        setVariableValueToObject(mojo, "reactorProjects", 
Collections.singletonList(project));
-        setVariableValueToObject(mojo, "session", session);
-
-        artifact = (DeployArtifactStub) project.getArtifact();
-
-        String packaging = project.getPackaging();
-
-        assertEquals("jar", packaging);
-
-        artifact.setFile(file);
-
-        ArtifactRepositoryStub repo = getRepoStub(mojo);
-
-        assertNotNull(repo);
-
-        repo.setAppendToUrl("basic-deploy-test");
-
-        assertEquals("deploy-test", repo.getId());
-        assertEquals("deploy-test", repo.getKey());
-        assertEquals("file", repo.getProtocol());
-        assertEquals("file://" + getBasedir() + 
"/target/remote-repo/basic-deploy-test", repo.getUrl());
-
-        setVariableValueToObject(mojo, "skip", Boolean.TRUE.toString());
+    @Test
+    @InjectMojo(goal = "deploy")
+    @MojoParameter(name = "skip", value = "true")
+    void testSkippingDeploy(DeployMojo mojo) throws Exception {
+        mojo.setPluginContext(new ConcurrentHashMap<>());
 
         mojo.execute();
 
-        File localRepo = new File(LOCAL_REPO, "");
-
         File[] files = localRepo.listFiles();
-
         assertNull(files);
 
-        remoteRepo = new File(remoteRepo, "basic-deploy-test");
-
         files = remoteRepo.listFiles();
-
         assertNull(files);
     }
 
-    public void testBasicDeployWithPackagingAsPom() throws Exception {
-        File testPom = new File(getBasedir(), 
"target/test-classes/unit/basic-deploy-pom/plugin-config.xml");
-
-        mojo = (DeployMojo) lookupMojo("deploy", testPom);
-
-        openMocks = MockitoAnnotations.openMocks(this);
-
-        assertNotNull(mojo);
-
-        DefaultRepositorySystemSession repositorySession = new 
DefaultRepositorySystemSession();
-        repositorySession.setLocalRepositoryManager(
-                new SimpleLocalRepositoryManagerFactory(new 
DefaultLocalPathComposer())
-                        .newInstance(repositorySession, new 
LocalRepository(LOCAL_REPO)));
-        when(session.getRepositorySession()).thenReturn(repositorySession);
-
-        File pomFile = new File(
-                getBasedir(),
-                "target/test-classes/unit/basic-deploy-pom/target/" + 
"deploy-test-file-1.0-SNAPSHOT.pom");
-
-        assertTrue(pomFile.exists());
-
-        MavenProject project = (MavenProject) getVariableValueFromObject(mojo, 
"project");
-        project.setGroupId("org.apache.maven.test");
-        project.setArtifactId("maven-deploy-test");
-        project.setVersion("1.0-SNAPSHOT");
-
-        setVariableValueToObject(mojo, "pluginContext", new 
ConcurrentHashMap<>());
-        setVariableValueToObject(mojo, "reactorProjects", 
Collections.singletonList(project));
-
-        artifact = (DeployArtifactStub) project.getArtifact();
+    @Test
+    @InjectMojo(goal = "deploy")
+    void testBasicDeployWithPackagingAsPom(DeployMojo mojo) throws Exception {
+        mojo.setPluginContext(new ConcurrentHashMap<>());
 
-        artifact.setArtifactHandlerExtension(project.getPackaging());
-
-        artifact.setFile(pomFile);
-
-        ArtifactRepositoryStub repo = getRepoStub(mojo);
-
-        repo.setAppendToUrl("basic-deploy-pom");
+        setProjectArtifact(mavenProject, "pom");
+        mavenProject.setPackaging("pom");
 
         mojo.execute();
 
@@ -353,7 +226,6 @@ public class DeployMojoTest extends AbstractMojoTestCase {
         expectedFiles.add("maven-metadata.xml");
         expectedFiles.add("maven-metadata.xml.md5");
         expectedFiles.add("maven-metadata.xml.sha1");
-        remoteRepo = new File(remoteRepo, "basic-deploy-pom");
 
         File[] files = remoteRepo.listFiles();
 
@@ -366,44 +238,13 @@ public class DeployMojoTest extends AbstractMojoTestCase {
         assertEquals(0, getSizeOfExpectedFiles(fileList, expectedFiles));
     }
 
-    public void testBasicDeployWithPackagingAsBom() throws Exception {
-        File testPom = new File(getBasedir(), 
"target/test-classes/unit/basic-deploy-bom/plugin-config.xml");
-
-        mojo = (DeployMojo) lookupMojo("deploy", testPom);
-
-        openMocks = MockitoAnnotations.openMocks(this);
-
-        assertNotNull(mojo);
-
-        DefaultRepositorySystemSession repositorySession = new 
DefaultRepositorySystemSession();
-        repositorySession.setLocalRepositoryManager(
-                new SimpleLocalRepositoryManagerFactory(new 
DefaultLocalPathComposer())
-                        .newInstance(repositorySession, new 
LocalRepository(LOCAL_REPO)));
-        when(session.getRepositorySession()).thenReturn(repositorySession);
-
-        File pomFile = new File(
-                getBasedir(),
-                "target/test-classes/unit/basic-deploy-bom/target/" + 
"deploy-test-file-1.0-SNAPSHOT.pom");
-
-        assertTrue(pomFile.exists());
-
-        MavenProject project = (MavenProject) getVariableValueFromObject(mojo, 
"project");
-        project.setGroupId("org.apache.maven.test");
-        project.setArtifactId("maven-deploy-test");
-        project.setVersion("1.0-SNAPSHOT");
+    @Test
+    @InjectMojo(goal = "deploy")
+    void testBasicDeployWithPackagingAsBom(DeployMojo mojo) throws Exception {
+        mojo.setPluginContext(new ConcurrentHashMap<>());
 
-        setVariableValueToObject(mojo, "pluginContext", new 
ConcurrentHashMap<>());
-        setVariableValueToObject(mojo, "reactorProjects", 
Collections.singletonList(project));
-
-        artifact = (DeployArtifactStub) project.getArtifact();
-
-        artifact.setArtifactHandlerExtension(project.getPackaging());
-
-        artifact.setFile(pomFile);
-
-        ArtifactRepositoryStub repo = getRepoStub(mojo);
-
-        repo.setAppendToUrl("basic-deploy-bom");
+        setProjectArtifact(mavenProject, "pom");
+        mavenProject.setPackaging("bom");
 
         mojo.execute();
 
@@ -426,7 +267,6 @@ public class DeployMojoTest extends AbstractMojoTestCase {
         expectedFiles.add("maven-metadata.xml");
         expectedFiles.add("maven-metadata.xml.md5");
         expectedFiles.add("maven-metadata.xml.sha1");
-        remoteRepo = new File(remoteRepo, "basic-deploy-bom");
 
         File[] files = remoteRepo.listFiles();
 
@@ -439,30 +279,13 @@ public class DeployMojoTest extends AbstractMojoTestCase {
         assertEquals(0, getSizeOfExpectedFiles(fileList, expectedFiles));
     }
 
-    public void testDeployIfArtifactFileIsNull() throws Exception {
-        File testPom = new File(getBasedir(), 
"target/test-classes/unit/basic-deploy-test/plugin-config.xml");
-
-        mojo = (DeployMojo) lookupMojo("deploy", testPom);
-
-        openMocks = MockitoAnnotations.openMocks(this);
-
-        setVariableValueToObject(mojo, "session", session);
-
-        assertNotNull(mojo);
+    @Test
+    @InjectMojo(goal = "deploy")
+    void testDeployIfArtifactFileIsNull(DeployMojo mojo) throws Exception {
+        mojo.setPluginContext(new ConcurrentHashMap<>());
 
-        MavenProject project = (MavenProject) getVariableValueFromObject(mojo, 
"project");
-        project.setGroupId("org.apache.maven.test");
-        project.setArtifactId("maven-deploy-test");
-        project.setVersion("1.0-SNAPSHOT");
-
-        setVariableValueToObject(mojo, "pluginContext", new 
ConcurrentHashMap<>());
-        setVariableValueToObject(mojo, "reactorProjects", 
Collections.singletonList(project));
-
-        artifact = (DeployArtifactStub) project.getArtifact();
-
-        artifact.setFile(null);
-
-        assertNull(artifact.getFile());
+        setProjectArtifact(mavenProject, "jar");
+        mavenProject.getArtifact().setFile(null);
 
         try {
             mojo.execute();
@@ -475,27 +298,13 @@ public class DeployMojoTest extends AbstractMojoTestCase {
         }
     }
 
-    public void testDeployIfProjectFileIsNull() throws Exception {
-        File testPom = new File(getBasedir(), 
"target/test-classes/unit/basic-deploy-test/plugin-config.xml");
-
-        mojo = (DeployMojo) lookupMojo("deploy", testPom);
-
-        openMocks = MockitoAnnotations.openMocks(this);
-
-        setVariableValueToObject(mojo, "session", session);
-
-        assertNotNull(mojo);
-
-        MavenProject project = (MavenProject) getVariableValueFromObject(mojo, 
"project");
-        project.setGroupId("org.apache.maven.test");
-        project.setArtifactId("maven-deploy-test");
-        project.setVersion("1.0-SNAPSHOT");
-
-        project.setFile(null);
-        assertNull(project.getFile());
+    @Test
+    @InjectMojo(goal = "deploy")
+    void testDeployIfProjectFileIsNull(DeployMojo mojo) throws Exception {
+        mojo.setPluginContext(new ConcurrentHashMap<>());
 
-        setVariableValueToObject(mojo, "pluginContext", new 
ConcurrentHashMap<>());
-        setVariableValueToObject(mojo, "reactorProjects", 
Collections.singletonList(project));
+        setProjectArtifact(mavenProject, "jar");
+        mavenProject.setFile(null);
 
         try {
             mojo.execute();
@@ -506,42 +315,23 @@ public class DeployMojoTest extends AbstractMojoTestCase {
         }
     }
 
-    public void testDeployWithAttachedArtifacts() throws Exception {
-        File testPom = new File(
-                getBasedir(), 
"target/test-classes/unit/basic-deploy-with-attached-artifacts/" + 
"plugin-config.xml");
+    @Test
+    @InjectMojo(goal = "deploy")
+    void testDeployWithAttachedArtifacts(DeployMojo mojo) throws Exception {
+        mojo.setPluginContext(new ConcurrentHashMap<>());
 
-        mojo = (DeployMojo) lookupMojo("deploy", testPom);
+        setProjectArtifact(mavenProject, "jar");
 
-        openMocks = MockitoAnnotations.openMocks(this);
-
-        assertNotNull(mojo);
-
-        DefaultRepositorySystemSession repositorySession = new 
DefaultRepositorySystemSession();
-        repositorySession.setLocalRepositoryManager(
-                new SimpleLocalRepositoryManagerFactory(new 
DefaultLocalPathComposer())
-                        .newInstance(repositorySession, new 
LocalRepository(LOCAL_REPO)));
-        when(session.getRepositorySession()).thenReturn(repositorySession);
-
-        MavenProject project = (MavenProject) getVariableValueFromObject(mojo, 
"project");
-        project.setGroupId("org.apache.maven.test");
-        project.setArtifactId("maven-deploy-test");
-        project.setVersion("1.0-SNAPSHOT");
-
-        setVariableValueToObject(mojo, "pluginContext", new 
ConcurrentHashMap<>());
-        setVariableValueToObject(mojo, "reactorProjects", 
Collections.singletonList(project));
-
-        artifact = (DeployArtifactStub) project.getArtifact();
-
-        File file = new File(
-                getBasedir(),
-                
"target/test-classes/unit/basic-deploy-with-attached-artifacts/target/"
-                        + "deploy-test-file-1.0-SNAPSHOT.jar");
-
-        artifact.setFile(file);
-
-        ArtifactRepositoryStub repo = getRepoStub(mojo);
-
-        repo.setAppendToUrl("basic-deploy-with-attached-artifacts");
+        mavenProjectHelper.attachArtifact(
+                mavenProject,
+                "jar",
+                "next1",
+                Files.createTempFile(tempDir, "test-artifact1", 
"jar").toFile());
+        mavenProjectHelper.attachArtifact(
+                mavenProject,
+                "jar",
+                "next2",
+                Files.createTempFile(tempDir, "test-artifact2", 
"jar").toFile());
 
         mojo.execute();
 
@@ -564,24 +354,19 @@ public class DeployMojoTest extends AbstractMojoTestCase {
         expectedFiles.add("maven-deploy-test-1.0-SNAPSHOT.pom");
         expectedFiles.add("maven-deploy-test-1.0-SNAPSHOT.pom.md5");
         expectedFiles.add("maven-deploy-test-1.0-SNAPSHOT.pom.sha1");
+
+        expectedFiles.add("maven-deploy-test-1.0-SNAPSHOT-next1.jar");
+        expectedFiles.add("maven-deploy-test-1.0-SNAPSHOT-next1.jar.md5");
+        expectedFiles.add("maven-deploy-test-1.0-SNAPSHOT-next1.jar.sha1");
+
+        expectedFiles.add("maven-deploy-test-1.0-SNAPSHOT-next2.jar");
+        expectedFiles.add("maven-deploy-test-1.0-SNAPSHOT-next2.jar.md5");
+        expectedFiles.add("maven-deploy-test-1.0-SNAPSHOT-next2.jar.sha1");
+
         // as we are in SNAPSHOT the file is here twice
         expectedFiles.add("maven-metadata.xml");
         expectedFiles.add("maven-metadata.xml.md5");
         expectedFiles.add("maven-metadata.xml.sha1");
-        expectedFiles.add("attached-artifact-test-0");
-        expectedFiles.add("1.0-SNAPSHOT");
-        expectedFiles.add("maven-metadata.xml");
-        expectedFiles.add("maven-metadata.xml.md5");
-        expectedFiles.add("maven-metadata.xml.sha1");
-        expectedFiles.add("attached-artifact-test-0-1.0-SNAPSHOT.jar");
-        expectedFiles.add("attached-artifact-test-0-1.0-SNAPSHOT.jar.md5");
-        expectedFiles.add("attached-artifact-test-0-1.0-SNAPSHOT.jar.sha1");
-        // as we are in SNAPSHOT the file is here twice
-        expectedFiles.add("maven-metadata.xml");
-        expectedFiles.add("maven-metadata.xml.md5");
-        expectedFiles.add("maven-metadata.xml.sha1");
-
-        remoteRepo = new File(remoteRepo, 
"basic-deploy-with-attached-artifacts");
 
         File[] files = remoteRepo.listFiles();
 
@@ -594,26 +379,19 @@ public class DeployMojoTest extends AbstractMojoTestCase {
         assertEquals(0, getSizeOfExpectedFiles(fileList, expectedFiles));
     }
 
-    public void testNonPomDeployWithAttachedArtifactsOnly() throws Exception {
-        File testPom = new File(
-                getBasedir(), 
"target/test-classes/unit/basic-deploy-with-attached-artifacts/" + 
"plugin-config.xml");
+    @Test
+    @InjectMojo(goal = "deploy")
+    void testNonPomDeployWithAttachedArtifactsOnly(DeployMojo mojo) throws 
Exception {
+        mojo.setPluginContext(new ConcurrentHashMap<>());
 
-        mojo = (DeployMojo) lookupMojo("deploy", testPom);
+        setProjectArtifact(mavenProject, "jar");
+        mavenProjectHelper.attachArtifact(
+                mavenProject,
+                "jar",
+                "next1",
+                Files.createTempFile(tempDir, "test-artifact1", 
"jar").toFile());
 
-        openMocks = MockitoAnnotations.openMocks(this);
-
-        assertNotNull(mojo);
-
-        MavenProject project = (MavenProject) getVariableValueFromObject(mojo, 
"project");
-        project.setGroupId("org.apache.maven.test");
-        project.setArtifactId("maven-deploy-test");
-        project.setVersion("1.0-SNAPSHOT");
-
-        setVariableValueToObject(mojo, "pluginContext", new 
ConcurrentHashMap<>());
-        setVariableValueToObject(mojo, "reactorProjects", 
Collections.singletonList(project));
-
-        artifact = (DeployArtifactStub) project.getArtifact();
-        artifact.setFile(null);
+        mavenProject.getArtifact().setFile(null);
 
         try {
             mojo.execute();
@@ -627,188 +405,90 @@ public class DeployMojoTest extends AbstractMojoTestCase 
{
         }
     }
 
-    @Ignore("SCP is not part of Maven3 distribution. Aether handles transport 
extensions.")
-    public void basicDeployWithScpAsProtocol() throws Exception {
-        String originalUserHome = System.getProperty("user.home");
-
-        // FIX THE DAMN user.home BEFORE YOU DELETE IT!!!
-        File altHome = new File(getBasedir(), "target/ssh-user-home");
-        altHome.mkdirs();
-
-        System.out.println("Testing user.home value for .ssh dir: " + 
altHome.getCanonicalPath());
-
-        Properties props = System.getProperties();
-        props.setProperty("user.home", altHome.getCanonicalPath());
-
-        System.setProperties(props);
-
-        File testPom = new File(getBasedir(), 
"target/test-classes/unit/basic-deploy-scp/plugin-config.xml");
-
-        mojo = (DeployMojo) lookupMojo("deploy", testPom);
-
-        assertNotNull(mojo);
-
-        RepositorySystem repositorySystem = mock(RepositorySystem.class);
-
-        setVariableValueToObject(mojo, "repositorySystem", repositorySystem);
-
-        File file = new File(
-                getBasedir(),
-                "target/test-classes/unit/basic-deploy-scp/target/" + 
"deploy-test-file-1.0-SNAPSHOT.jar");
-
-        assertTrue(file.exists());
-
-        MavenProject project = (MavenProject) getVariableValueFromObject(mojo, 
"project");
-
-        setVariableValueToObject(mojo, "pluginContext", new 
ConcurrentHashMap<>());
-        setVariableValueToObject(mojo, "reactorProjects", 
Collections.singletonList(project));
-
-        artifact = (DeployArtifactStub) project.getArtifact();
-
-        artifact.setFile(file);
-
-        String altUserHome = System.getProperty("user.home");
-
-        if (altUserHome.equals(originalUserHome)) {
-            // this is *very* bad!
-            throw new IllegalStateException(
-                    "Setting 'user.home' system property to alternate value 
did NOT work. Aborting test.");
-        }
-
-        File sshFile = new File(altUserHome, ".ssh");
-
-        System.out.println("Testing .ssh dir: " + sshFile.getCanonicalPath());
-
-        // delete first the .ssh folder if existing before executing the mojo
-        if (sshFile.exists()) {
-            FileUtils.deleteDirectory(sshFile);
-        }
-
-        mojo.execute();
-
-        assertTrue(sshFile.exists());
-
-        FileUtils.deleteDirectory(sshFile);
-    }
-
-    public void testLegacyAltDeploymentRepositoryWithDefaultLayout() throws 
Exception {
-        mojo = new DeployMojo(null, null);
-
-        setVariableValueToObject(mojo, "project", project);
-        setVariableValueToObject(mojo, "session", session);
-        setVariableValueToObject(mojo, "altDeploymentRepository", 
"altDeploymentRepository::default::http://localhost";);
-
-        project.setVersion("1.0-SNAPSHOT");
-
+    @Test
+    @InjectMojo(goal = "deploy")
+    void testLegacyAltDeploymentRepositoryWithDefaultLayout(DeployMojo mojo) 
throws Exception {
         assertEquals(
                 new RemoteRepository.Builder("altDeploymentRepository", 
"default", "http://localhost";).build(),
                 mojo.getDeploymentRepository(
-                        project, null, null, 
"altDeploymentRepository::default::http://localhost";));
+                        mavenProject, null, null, 
"altDeploymentRepository::default::http://localhost";));
     }
 
-    public void testLegacyAltDeploymentRepositoryWithLegacyLayout() throws 
Exception {
-        mojo = new DeployMojo(null, null);
-
-        setVariableValueToObject(mojo, "project", project);
-        setVariableValueToObject(mojo, "session", session);
+    @Test
+    @InjectMojo(goal = "deploy")
+    void testLegacyAltDeploymentRepositoryWithLegacyLayout(DeployMojo mojo) {
         String altDeploymentRepository = 
"altDeploymentRepository::legacy::http://localhost";;
-        setVariableValueToObject(mojo, "altDeploymentRepository", 
altDeploymentRepository);
 
-        project.setVersion("1.0-SNAPSHOT");
         try {
-            mojo.getDeploymentRepository(project, null, null, 
altDeploymentRepository);
+            mojo.getDeploymentRepository(mavenProject, null, null, 
altDeploymentRepository);
             fail("Should throw: Invalid legacy syntax and layout for 
repository.");
         } catch (MojoExecutionException e) {
             assertEquals(
-                    e.getMessage(),
                     "Invalid legacy syntax and layout for alternative 
repository: \"" + altDeploymentRepository
-                            + "\". Use 
\"altDeploymentRepository::http://localhost\"; instead, and only default layout 
is supported.");
+                            + "\". Use 
\"altDeploymentRepository::http://localhost\"; instead, and only default layout 
is supported.",
+                    e.getMessage());
         }
     }
 
-    public void testInsaneAltDeploymentRepository() throws Exception {
-        mojo = new DeployMojo(null, null);
-
-        setVariableValueToObject(mojo, "project", project);
-        setVariableValueToObject(mojo, "session", session);
+    @Test
+    @InjectMojo(goal = "deploy")
+    void testInsaneAltDeploymentRepository(DeployMojo mojo) {
         String altDeploymentRepository = 
"altDeploymentRepository::hey::wow::foo::http://localhost";;
-        setVariableValueToObject(mojo, "altDeploymentRepository", 
altDeploymentRepository);
 
-        project.setVersion("1.0-SNAPSHOT");
         try {
-            mojo.getDeploymentRepository(project, null, null, 
altDeploymentRepository);
+            mojo.getDeploymentRepository(mavenProject, null, null, 
altDeploymentRepository);
             fail("Should throw: Invalid legacy syntax and layout for 
repository.");
         } catch (MojoExecutionException e) {
             assertEquals(
-                    e.getMessage(),
                     "Invalid legacy syntax and layout for alternative 
repository: \"" + altDeploymentRepository
-                            + "\". Use 
\"altDeploymentRepository::wow::foo::http://localhost\"; instead, and only 
default layout is supported.");
+                            + "\". Use 
\"altDeploymentRepository::wow::foo::http://localhost\"; instead, and only 
default layout is supported.",
+                    e.getMessage());
         }
     }
 
-    public void testDefaultScmSvnAltDeploymentRepository() throws Exception {
-        mojo = new DeployMojo(null, null);
-
-        setVariableValueToObject(mojo, "project", project);
-        setVariableValueToObject(mojo, "session", session);
-        setVariableValueToObject(
-                mojo, "altDeploymentRepository", 
"altDeploymentRepository::default::scm:svn:http://localhost";);
-
-        project.setVersion("1.0-SNAPSHOT");
-
+    @Test
+    @InjectMojo(goal = "deploy")
+    void testDefaultScmSvnAltDeploymentRepository(DeployMojo mojo) throws 
Exception {
         assertEquals(
                 new RemoteRepository.Builder("altDeploymentRepository", 
"default", "scm:svn:http://localhost";).build(),
                 mojo.getDeploymentRepository(
-                        project, null, null, 
"altDeploymentRepository::default::scm:svn:http://localhost";));
+                        mavenProject, null, null, 
"altDeploymentRepository::default::scm:svn:http://localhost";));
     }
 
-    public void testLegacyScmSvnAltDeploymentRepository() throws Exception {
-        mojo = new DeployMojo(null, null);
-
-        setVariableValueToObject(mojo, "project", project);
+    @Test
+    @InjectMojo(goal = "deploy")
+    void testLegacyScmSvnAltDeploymentRepository(DeployMojo mojo) {
         String altDeploymentRepository = 
"altDeploymentRepository::legacy::scm:svn:http://localhost";;
-        setVariableValueToObject(mojo, "altDeploymentRepository", 
altDeploymentRepository);
 
-        project.setVersion("1.0-SNAPSHOT");
         try {
-            mojo.getDeploymentRepository(project, null, null, 
altDeploymentRepository);
+            mojo.getDeploymentRepository(mavenProject, null, null, 
altDeploymentRepository);
             fail("Should throw: Invalid legacy syntax and layout for 
repository.");
         } catch (MojoExecutionException e) {
             assertEquals(
-                    e.getMessage(),
                     "Invalid legacy syntax and layout for alternative 
repository: \"" + altDeploymentRepository
-                            + "\". Use 
\"altDeploymentRepository::scm:svn:http://localhost\"; instead, and only default 
layout is supported.");
+                            + "\". Use 
\"altDeploymentRepository::scm:svn:http://localhost\"; instead, and only default 
layout is supported.",
+                    e.getMessage());
         }
     }
 
-    public void testAltSnapshotDeploymentRepository() throws Exception {
-        mojo = new DeployMojo(null, null);
-
-        setVariableValueToObject(mojo, "project", project);
-        setVariableValueToObject(mojo, "session", session);
-        setVariableValueToObject(
-                mojo, "altSnapshotDeploymentRepository", 
"altSnapshotDeploymentRepository::http://localhost";);
-
-        project.setVersion("1.0-SNAPSHOT");
-
+    @Test
+    @InjectMojo(goal = "deploy")
+    void testAltSnapshotDeploymentRepository(DeployMojo mojo) throws Exception 
{
         assertEquals(
                 new 
RemoteRepository.Builder("altSnapshotDeploymentRepository", "default", 
"http://localhost";).build(),
-                mojo.getDeploymentRepository(project, 
"altSnapshotDeploymentRepository::http://localhost";, null, null));
+                mojo.getDeploymentRepository(
+                        mavenProject, 
"altSnapshotDeploymentRepository::http://localhost";, null, null));
     }
 
-    public void testAltReleaseDeploymentRepository() throws Exception {
-        mojo = new DeployMojo(null, null);
-
-        setVariableValueToObject(mojo, "project", project);
-        setVariableValueToObject(mojo, "session", session);
-        setVariableValueToObject(
-                mojo, "altReleaseDeploymentRepository", 
"altReleaseDeploymentRepository::http://localhost";);
-
-        project.setVersion("1.0");
+    @Test
+    @InjectMojo(goal = "deploy")
+    void testAltReleaseDeploymentRepository(DeployMojo mojo) throws Exception {
+        mavenProject.setVersion("1.0");
 
         assertEquals(
                 new RemoteRepository.Builder("altReleaseDeploymentRepository", 
"default", "http://localhost";).build(),
-                mojo.getDeploymentRepository(project, null, 
"altReleaseDeploymentRepository::http://localhost";, null));
+                mojo.getDeploymentRepository(
+                        mavenProject, null, 
"altReleaseDeploymentRepository::http://localhost";, null));
     }
 
     private void addFileToList(File file, List<String> fileList) {
@@ -837,8 +517,16 @@ public class DeployMojoTest extends AbstractMojoTestCase {
         return expectedFiles.size();
     }
 
-    private ArtifactRepositoryStub getRepoStub(Object mojo) throws Exception {
-        MavenProject project = (MavenProject) getVariableValueFromObject(mojo, 
"project");
-        return (ArtifactRepositoryStub) 
project.getDistributionManagementArtifactRepository();
+    private void setProjectArtifact(MavenProject mavenProject, String type) 
throws IOException {
+        DefaultArtifact artifact = new DefaultArtifact(
+                mavenProject.getGroupId(),
+                mavenProject.getArtifactId(),
+                mavenProject.getVersion(),
+                null,
+                type,
+                null,
+                artifactHandlerManager.getArtifactHandler(type));
+        artifact.setFile(Files.createTempFile(tempDir, "test-artifact", 
type).toFile());
+        mavenProject.setArtifact(artifact);
     }
 }
diff --git 
a/src/test/java/org/apache/maven/plugins/deploy/stubs/ArtifactRepositoryStub.java
 
b/src/test/java/org/apache/maven/plugins/deploy/stubs/ArtifactRepositoryStub.java
deleted file mode 100644
index 9dd9540..0000000
--- 
a/src/test/java/org/apache/maven/plugins/deploy/stubs/ArtifactRepositoryStub.java
+++ /dev/null
@@ -1,119 +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.plugins.deploy.stubs;
-
-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.layout.ArtifactRepositoryLayout;
-import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
-import org.apache.maven.plugin.testing.stubs.StubArtifactRepository;
-
-public class ArtifactRepositoryStub extends StubArtifactRepository {
-    private boolean blacklisted;
-
-    private ArtifactRepositoryLayout layout;
-
-    private String url;
-
-    private final String basedir = System.getProperty("basedir");
-
-    public ArtifactRepositoryStub() {
-        super(null);
-    }
-
-    public ArtifactRepositoryStub(String dir) {
-        super(dir);
-    }
-
-    public String pathOf(Artifact artifact) {
-        return getLayout().pathOf(artifact);
-    }
-
-    public String pathOfRemoteRepositoryMetadata(ArtifactMetadata 
artifactMetadata) {
-        return getLayout().pathOfRemoteRepositoryMetadata(artifactMetadata);
-    }
-
-    public String pathOfLocalRepositoryMetadata(ArtifactMetadata metadata, 
ArtifactRepository repository) {
-        return getLayout().pathOfLocalRepositoryMetadata(metadata, repository);
-    }
-
-    public String getUrl() {
-        return url;
-    }
-
-    public void setAppendToUrl(String dir) {
-        this.url = "file://" + basedir + "/target/remote-repo/" + dir;
-    }
-
-    public String getBasedir() {
-        return basedir;
-    }
-
-    public String getProtocol() {
-        return "file";
-    }
-
-    public String getId() {
-        return "deploy-test";
-    }
-
-    public ArtifactRepositoryPolicy getSnapshots() {
-        return new ArtifactRepositoryPolicy(
-                true, ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS, 
ArtifactRepositoryPolicy.CHECKSUM_POLICY_IGNORE);
-    }
-
-    public ArtifactRepositoryPolicy getReleases() {
-        return new ArtifactRepositoryPolicy(
-                true, ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS, 
ArtifactRepositoryPolicy.CHECKSUM_POLICY_IGNORE);
-    }
-
-    public ArtifactRepositoryLayout getLayout() {
-        if (layout != null) {
-            return layout;
-        } else {
-            return new DefaultRepositoryLayout();
-        }
-    }
-
-    public String getKey() {
-        return getId();
-    }
-
-    public boolean isUniqueVersion() {
-        return false;
-    }
-
-    public void setBlacklisted(boolean blackListed) {
-        this.blacklisted = blackListed;
-    }
-
-    public boolean isBlacklisted() {
-        return blacklisted;
-    }
-
-    // @Override
-    public boolean isBlocked() {
-        return false;
-    }
-
-    // @Override
-    public void setBlocked(boolean b) {}
-}
diff --git 
a/src/test/java/org/apache/maven/plugins/deploy/stubs/ArtifactRepositoryStub2.java
 
b/src/test/java/org/apache/maven/plugins/deploy/stubs/ArtifactRepositoryStub2.java
deleted file mode 100644
index 96d43bb..0000000
--- 
a/src/test/java/org/apache/maven/plugins/deploy/stubs/ArtifactRepositoryStub2.java
+++ /dev/null
@@ -1,50 +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.plugins.deploy.stubs;
-
-public class ArtifactRepositoryStub2 extends ArtifactRepositoryStub {
-    private String protocol;
-
-    public ArtifactRepositoryStub2() {
-        super();
-    }
-
-    public ArtifactRepositoryStub2(String dir) {
-        super(dir);
-    }
-
-    public String getUrl() {
-        return "file://" + System.getProperty("basedir") + 
"/target/remote-repo/basic-deploy-scp";
-    }
-
-    public String getBasedir() {
-        return System.getProperty("basedir");
-    }
-
-    public String getProtocol() {
-        if (this.protocol == null || this.protocol.equals("")) {
-            this.protocol = "scp";
-        }
-        return this.protocol;
-    }
-
-    public void setProtocol(String protocol) {
-        this.protocol = protocol;
-    }
-}
diff --git 
a/src/test/java/org/apache/maven/plugins/deploy/stubs/AttachedArtifactStub.java 
b/src/test/java/org/apache/maven/plugins/deploy/stubs/AttachedArtifactStub.java
deleted file mode 100644
index 9226bdc..0000000
--- 
a/src/test/java/org/apache/maven/plugins/deploy/stubs/AttachedArtifactStub.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.plugins.deploy.stubs;
-
-import java.io.File;
-
-public class AttachedArtifactStub extends DeployArtifactStub {
-    public String getArtifactId() {
-        return "attached-artifact-test-0";
-    }
-
-    public File getFile() {
-        return new File(
-                System.getProperty("basedir"),
-                
"target/test-classes/unit/basic-deploy-with-attached-artifacts/"
-                        + "target/deploy-test-file-1.0-SNAPSHOT.jar");
-    }
-}
diff --git 
a/src/test/java/org/apache/maven/plugins/deploy/stubs/DeployArtifactStub.java 
b/src/test/java/org/apache/maven/plugins/deploy/stubs/DeployArtifactStub.java
deleted file mode 100644
index 7218fdf..0000000
--- 
a/src/test/java/org/apache/maven/plugins/deploy/stubs/DeployArtifactStub.java
+++ /dev/null
@@ -1,116 +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.plugins.deploy.stubs;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.maven.artifact.handler.ArtifactHandler;
-import org.apache.maven.artifact.handler.DefaultArtifactHandler;
-import org.apache.maven.artifact.metadata.ArtifactMetadata;
-import org.apache.maven.plugin.testing.stubs.ArtifactStub;
-
-public class DeployArtifactStub extends ArtifactStub {
-    private Map<Object, ArtifactMetadata> metadataMap;
-
-    private File file;
-
-    private boolean release;
-
-    private String extension;
-
-    public String getArtifactId() {
-        return "maven-deploy-test";
-    }
-
-    public String getGroupId() {
-        return "org.apache.maven.test";
-    }
-
-    public String getVersion() {
-        return "1.0-SNAPSHOT";
-    }
-
-    public String getBaseVersion() {
-        return getVersion();
-    }
-
-    @Override
-    public String getType() {
-        return "jar";
-    }
-
-    public void setFile(File file) {
-        this.file = file;
-    }
-
-    public File getFile() {
-        return file;
-    }
-
-    public ArtifactHandler getArtifactHandler() {
-        return new DefaultArtifactHandler() {
-            public String getExtension() {
-                if (extension == null) {
-                    extension = "jar";
-                }
-                return extension;
-            }
-        };
-    }
-
-    public void setArtifactHandlerExtension(String extension) {
-        this.extension = extension;
-    }
-
-    public void addMetadata(ArtifactMetadata metadata) {
-        if (metadataMap == null) {
-            metadataMap = new HashMap<>();
-        }
-
-        ArtifactMetadata m = metadataMap.get(metadata.getKey());
-        if (m != null) {
-            m.merge(metadata);
-        } else {
-            metadataMap.put(metadata.getKey(), metadata);
-        }
-    }
-
-    public Collection<ArtifactMetadata> getMetadataList() {
-        return metadataMap == null ? Collections.emptyList() : 
metadataMap.values();
-    }
-
-    public boolean isRelease() {
-        return release;
-    }
-
-    public void setRelease(boolean release) {
-        this.release = release;
-    }
-
-    /*
-    public boolean isSnapshot()
-    {
-        return false;
-    }
-    */
-}
diff --git 
a/src/test/java/org/apache/maven/plugins/deploy/stubs/DeployBomArtifactStub.java
 
b/src/test/java/org/apache/maven/plugins/deploy/stubs/DeployBomArtifactStub.java
deleted file mode 100644
index b5c55a3..0000000
--- 
a/src/test/java/org/apache/maven/plugins/deploy/stubs/DeployBomArtifactStub.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.plugins.deploy.stubs;
-
-import org.apache.maven.artifact.handler.ArtifactHandler;
-import org.apache.maven.artifact.handler.DefaultArtifactHandler;
-
-public class DeployBomArtifactStub extends DeployArtifactStub {
-    @Override
-    public String getType() {
-        return "bom";
-    }
-
-    public ArtifactHandler getArtifactHandler() {
-        return new DefaultArtifactHandler() {
-            public String getExtension() {
-                return "pom";
-            }
-        };
-    }
-}
diff --git 
a/src/test/java/org/apache/maven/plugins/deploy/stubs/DeployPomArtifactStub.java
 
b/src/test/java/org/apache/maven/plugins/deploy/stubs/DeployPomArtifactStub.java
deleted file mode 100644
index 238bb28..0000000
--- 
a/src/test/java/org/apache/maven/plugins/deploy/stubs/DeployPomArtifactStub.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.plugins.deploy.stubs;
-
-import org.apache.maven.artifact.handler.ArtifactHandler;
-import org.apache.maven.artifact.handler.DefaultArtifactHandler;
-
-public class DeployPomArtifactStub extends DeployArtifactStub {
-    @Override
-    public String getType() {
-        return "pom";
-    }
-
-    public ArtifactHandler getArtifactHandler() {
-        return new DefaultArtifactHandler() {
-            public String getExtension() {
-                return "pom";
-            }
-        };
-    }
-}
diff --git 
a/src/test/java/org/apache/maven/plugins/deploy/stubs/MavenProjectStub.java 
b/src/test/java/org/apache/maven/plugins/deploy/stubs/MavenProjectStub.java
deleted file mode 100644
index 646e09a..0000000
--- a/src/test/java/org/apache/maven/plugins/deploy/stubs/MavenProjectStub.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.plugins.deploy.stubs;
-
-import java.util.Collections;
-
-import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.model.Build;
-import org.apache.maven.model.Plugin;
-
-public class MavenProjectStub extends 
org.apache.maven.plugin.testing.stubs.MavenProjectStub {
-
-    private ArtifactRepositoryStub deploymentRepository;
-
-    public ArtifactRepository getDistributionManagementArtifactRepository() {
-        return deploymentRepository;
-    }
-
-    @Override
-    public Build getBuild() {
-        Plugin plugin = new Plugin();
-        Build build = new Build();
-        build.setPlugins(Collections.singletonList(plugin));
-        return build;
-    }
-}
diff --git a/src/test/resources/unit/basic-deploy-bom/plugin-config.xml 
b/src/test/resources/unit/basic-deploy-bom/plugin-config.xml
deleted file mode 100644
index 53bb886..0000000
--- a/src/test/resources/unit/basic-deploy-bom/plugin-config.xml
+++ /dev/null
@@ -1,39 +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.
--->
-
-<project>
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <configuration>
-          <project 
implementation="org.apache.maven.plugins.deploy.stubs.MavenProjectStub">
-            
<file>${basedir}/src/test/resources/unit/basic-deploy-bom/plugin-config.xml</file>
-            <packaging>bom</packaging>
-            <artifact 
implementation="org.apache.maven.plugins.deploy.stubs.DeployBomArtifactStub" />
-            <attachedArtifacts />
-            <deploymentRepository 
implementation="org.apache.maven.plugins.deploy.stubs.ArtifactRepositoryStub">
-              <basedir>${basedir}</basedir>
-            </deploymentRepository>
-          </project>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git 
a/src/test/resources/unit/basic-deploy-bom/target/deploy-test-file-1.0-SNAPSHOT.pom
 
b/src/test/resources/unit/basic-deploy-bom/target/deploy-test-file-1.0-SNAPSHOT.pom
deleted file mode 100644
index 9c7bc40..0000000
--- 
a/src/test/resources/unit/basic-deploy-bom/target/deploy-test-file-1.0-SNAPSHOT.pom
+++ /dev/null
@@ -1,28 +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.
--->
-
-<project>
-
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>org.apache.maven.test</groupId>
-  <artifactId>maven-deploy-file-test</artifactId>
-  <version>1.0</version>
-  <packaging>bom</packaging>
-  
-</project>
\ No newline at end of file
diff --git a/src/test/resources/unit/basic-deploy-pom/plugin-config.xml 
b/src/test/resources/unit/basic-deploy-pom/plugin-config.xml
deleted file mode 100644
index 27d5f25..0000000
--- a/src/test/resources/unit/basic-deploy-pom/plugin-config.xml
+++ /dev/null
@@ -1,39 +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.
--->
-
-<project>
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <configuration>
-          <project 
implementation="org.apache.maven.plugins.deploy.stubs.MavenProjectStub">
-            
<file>${basedir}/src/test/resources/unit/basic-deploy-pom/plugin-config.xml</file>
-            <packaging>pom</packaging>
-            <artifact 
implementation="org.apache.maven.plugins.deploy.stubs.DeployPomArtifactStub" />
-            <attachedArtifacts />
-            <deploymentRepository 
implementation="org.apache.maven.plugins.deploy.stubs.ArtifactRepositoryStub">
-              <basedir>${basedir}</basedir>
-            </deploymentRepository>
-          </project>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git 
a/src/test/resources/unit/basic-deploy-pom/target/deploy-test-file-1.0-SNAPSHOT.pom
 
b/src/test/resources/unit/basic-deploy-pom/target/deploy-test-file-1.0-SNAPSHOT.pom
deleted file mode 100644
index 095ea0f..0000000
--- 
a/src/test/resources/unit/basic-deploy-pom/target/deploy-test-file-1.0-SNAPSHOT.pom
+++ /dev/null
@@ -1,28 +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.
--->
-
-<project>
-
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>org.apache.maven.test</groupId>
-  <artifactId>maven-deploy-file-test</artifactId>
-  <version>1.0</version>
-  <packaging>pom</packaging>
-  
-</project>
\ No newline at end of file
diff --git a/src/test/resources/unit/basic-deploy-scp/plugin-config.xml 
b/src/test/resources/unit/basic-deploy-scp/plugin-config.xml
deleted file mode 100644
index 4b3a9bf..0000000
--- a/src/test/resources/unit/basic-deploy-scp/plugin-config.xml
+++ /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.
--->
-
-<project>
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <configuration>
-          <project 
implementation="org.apache.maven.plugins.deploy.stubs.MavenProjectStub">
-            
<file>${basedir}/src/test/resources/unit/basic-deploy-scp/plugin-config.xml</file>
-            <packaging>jar</packaging>
-            <artifact 
implementation="org.apache.maven.plugins.deploy.stubs.DeployArtifactStub" />
-            <attachedArtifacts />
-            <deploymentRepository 
implementation="org.apache.maven.plugins.deploy.stubs.ArtifactRepositoryStub2" 
/>
-          </project>
-          <deployer 
implementation="org.apache.maven.plugins.deploy.stubs.ArtifactDeployerStub" />
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git 
a/src/test/resources/unit/basic-deploy-scp/target/deploy-test-file-1.0-SNAPSHOT.jar
 
b/src/test/resources/unit/basic-deploy-scp/target/deploy-test-file-1.0-SNAPSHOT.jar
deleted file mode 100644
index 6f5f2f8..0000000
--- 
a/src/test/resources/unit/basic-deploy-scp/target/deploy-test-file-1.0-SNAPSHOT.jar
+++ /dev/null
@@ -1 +0,0 @@
-This is not an actual jar
\ No newline at end of file
diff --git 
a/src/test/resources/unit/basic-deploy-test/target/deploy-test-file-1.0-SNAPSHOT.jar
 
b/src/test/resources/unit/basic-deploy-test/target/deploy-test-file-1.0-SNAPSHOT.jar
deleted file mode 100644
index 6f5f2f8..0000000
--- 
a/src/test/resources/unit/basic-deploy-test/target/deploy-test-file-1.0-SNAPSHOT.jar
+++ /dev/null
@@ -1 +0,0 @@
-This is not an actual jar
\ No newline at end of file
diff --git 
a/src/test/resources/unit/basic-deploy-with-attached-artifacts/plugin-config.xml
 
b/src/test/resources/unit/basic-deploy-with-attached-artifacts/plugin-config.xml
deleted file mode 100644
index 417c54e..0000000
--- 
a/src/test/resources/unit/basic-deploy-with-attached-artifacts/plugin-config.xml
+++ /dev/null
@@ -1,41 +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.
--->
-
-<project>
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <configuration>
-          <project 
implementation="org.apache.maven.plugins.deploy.stubs.MavenProjectStub">
-            
<file>${basedir}/src/test/resources/unit/basic-deploy-with-attached-artifacts/plugin-config.xml</file>
-            <packaging>jar</packaging>
-            <artifact 
implementation="org.apache.maven.plugins.deploy.stubs.DeployArtifactStub" />
-            <attachedArtifacts>
-              <attachedArtifact 
implementation="org.apache.maven.plugins.deploy.stubs.AttachedArtifactStub" />
-            </attachedArtifacts>
-            <deploymentRepository 
implementation="org.apache.maven.plugins.deploy.stubs.ArtifactRepositoryStub">
-              <basedir>${basedir}</basedir>
-            </deploymentRepository>
-          </project>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git 
a/src/test/resources/unit/basic-deploy-with-attached-artifacts/target/deploy-test-file-1.0-SNAPSHOT.jar
 
b/src/test/resources/unit/basic-deploy-with-attached-artifacts/target/deploy-test-file-1.0-SNAPSHOT.jar
deleted file mode 100644
index 6f5f2f8..0000000
--- 
a/src/test/resources/unit/basic-deploy-with-attached-artifacts/target/deploy-test-file-1.0-SNAPSHOT.jar
+++ /dev/null
@@ -1 +0,0 @@
-This is not an actual jar
\ No newline at end of file
diff --git a/src/test/resources/unit/basic-deploy-test/plugin-config.xml 
b/src/test/resources/unit/deploy-test/pom.xml
similarity index 60%
rename from src/test/resources/unit/basic-deploy-test/plugin-config.xml
rename to src/test/resources/unit/deploy-test/pom.xml
index a98749b..0351e14 100644
Binary files a/src/test/resources/unit/basic-deploy-test/plugin-config.xml and 
b/src/test/resources/unit/deploy-test/pom.xml differ

Reply via email to