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 3d74441  Migration to JUnit 5 - avoid using AbstractMojoTestCase in 
DeployFileMojoTest
3d74441 is described below

commit 3d74441f47b5eda2b0cf4ea9e7e3dc97d3e37475
Author: Slawomir Jaranowski <[email protected]>
AuthorDate: Sun Nov 23 00:53:45 2025 +0100

    Migration to JUnit 5 - avoid using AbstractMojoTestCase in 
DeployFileMojoTest
    
    - also use constructor inject instead od Component
    - remove unused deploy-file-pom-file directory
---
 pom.xml                                            |  17 +--
 .../maven/plugins/deploy/AbstractDeployMojo.java   |  12 +-
 .../maven/plugins/deploy/DeployFileMojo.java       |   9 ++
 .../apache/maven/plugins/deploy/DeployMojo.java    |   9 ++
 .../maven/plugins/deploy/DeployFileMojoTest.java   | 127 ++++++++-------------
 .../plugins/deploy/DeployFileMojoUnitTest.java     |  44 +++----
 .../maven/plugins/deploy/DeployMojoTest.java       |  14 +--
 .../deploy-file-artifact-not-jar/plugin-config.xml |   2 +-
 .../unit/deploy-file-classifier/plugin-config.xml  |   2 +-
 .../unit/deploy-file-packaging/plugin-config.xml   |  34 +++---
 .../unit/deploy-file-pom-file/plugin-config.xml    | Bin 3166 -> 0 bytes
 .../target/deploy-test-file-1.0-SNAPSHOT.jar       |   1 -
 .../unit/deploy-file-test/plugin-config.xml        |   2 +-
 13 files changed, 125 insertions(+), 148 deletions(-)

diff --git a/pom.xml b/pom.xml
index ced2b75..4c17e8a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -162,13 +162,6 @@ under the License.
       <version>3.4.0</version>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <!-- used by maven-plugin-testing-harness, don't give it compile scope! 
-->
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-compat</artifactId>
-      <version>${mavenVersion}</version>
-      <scope>test</scope>
-    </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-resolver-provider</artifactId>
@@ -205,6 +198,16 @@ under the License.
       <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/main/java/org/apache/maven/plugins/deploy/AbstractDeployMojo.java 
b/src/main/java/org/apache/maven/plugins/deploy/AbstractDeployMojo.java
index d8da692..265d1e6 100644
--- a/src/main/java/org/apache/maven/plugins/deploy/AbstractDeployMojo.java
+++ b/src/main/java/org/apache/maven/plugins/deploy/AbstractDeployMojo.java
@@ -22,7 +22,6 @@ import org.apache.maven.execution.MavenSession;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.plugins.annotations.Component;
 import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.rtinfo.RuntimeInformation;
 import org.eclipse.aether.RepositorySystem;
@@ -52,19 +51,22 @@ public abstract class AbstractDeployMojo extends 
AbstractMojo {
     @Parameter(property = "retryFailedDeploymentCount", defaultValue = "1")
     private int retryFailedDeploymentCount;
 
-    @Component
-    private RuntimeInformation runtimeInformation;
+    private final RuntimeInformation runtimeInformation;
 
     @Parameter(defaultValue = "${session}", readonly = true, required = true)
     protected MavenSession session;
 
-    @Component
-    protected RepositorySystem repositorySystem;
+    protected final RepositorySystem repositorySystem;
 
     private static final String AFFECTED_MAVEN_PACKAGING = "maven-plugin";
 
     private static final String FIXED_MAVEN_VERSION = "3.9.0";
 
+    protected AbstractDeployMojo(RuntimeInformation runtimeInformation, 
RepositorySystem repositorySystem) {
+        this.runtimeInformation = runtimeInformation;
+        this.repositorySystem = repositorySystem;
+    }
+
     /* Setters and Getters */
 
     void failIfOffline() throws MojoFailureException {
diff --git a/src/main/java/org/apache/maven/plugins/deploy/DeployFileMojo.java 
b/src/main/java/org/apache/maven/plugins/deploy/DeployFileMojo.java
index 0dfc8c3..7cd1d70 100644
--- a/src/main/java/org/apache/maven/plugins/deploy/DeployFileMojo.java
+++ b/src/main/java/org/apache/maven/plugins/deploy/DeployFileMojo.java
@@ -18,6 +18,8 @@
  */
 package org.apache.maven.plugins.deploy;
 
+import javax.inject.Inject;
+
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.IOException;
@@ -41,12 +43,14 @@ import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.rtinfo.RuntimeInformation;
 import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.ReaderFactory;
 import org.codehaus.plexus.util.xml.WriterFactory;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+import org.eclipse.aether.RepositorySystem;
 import org.eclipse.aether.RepositorySystemSession;
 import org.eclipse.aether.artifact.Artifact;
 import org.eclipse.aether.artifact.ArtifactType;
@@ -197,6 +201,11 @@ public class DeployFileMojo extends AbstractDeployMojo {
     @Parameter(property = "maven.deploy.file.skip", defaultValue = "false")
     private String skip = Boolean.FALSE.toString();
 
+    @Inject
+    protected DeployFileMojo(RuntimeInformation runtimeInformation, 
RepositorySystem repositorySystem) {
+        super(runtimeInformation, repositorySystem);
+    }
+
     void initProperties() throws MojoExecutionException {
         if (pomFile == null) {
             boolean foundPom = false;
diff --git a/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java 
b/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java
index 7cf7a7e..514b923 100644
--- a/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java
+++ b/src/main/java/org/apache/maven/plugins/deploy/DeployMojo.java
@@ -18,6 +18,8 @@
  */
 package org.apache.maven.plugins.deploy;
 
+import javax.inject.Inject;
+
 import java.io.File;
 import java.util.ArrayList;
 import java.util.LinkedHashMap;
@@ -38,6 +40,8 @@ import org.apache.maven.plugins.annotations.Mojo;
 import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.artifact.ProjectArtifact;
+import org.apache.maven.rtinfo.RuntimeInformation;
+import org.eclipse.aether.RepositorySystem;
 import org.eclipse.aether.artifact.Artifact;
 import org.eclipse.aether.deployment.DeployRequest;
 import org.eclipse.aether.repository.RemoteRepository;
@@ -140,6 +144,11 @@ public class DeployMojo extends AbstractDeployMojo {
     @Parameter(defaultValue = "false", property = "allowIncompleteProjects")
     private boolean allowIncompleteProjects;
 
+    @Inject
+    protected DeployMojo(RuntimeInformation runtimeInformation, 
RepositorySystem repositorySystem) {
+        super(runtimeInformation, repositorySystem);
+    }
+
     private enum State {
         SKIPPED,
         DEPLOYED,
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 bd5db2e..f771eca 100644
--- a/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoTest.java
+++ b/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoTest.java
@@ -18,46 +18,51 @@
  */
 package org.apache.maven.plugins.deploy;
 
+import javax.inject.Inject;
+
 import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Objects;
 
+import org.apache.maven.api.plugin.testing.Basedir;
+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.apache.maven.plugin.testing.AbstractMojoTestCase;
 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.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.apache.maven.api.plugin.testing.MojoExtension.getBasedir;
+import static 
org.apache.maven.api.plugin.testing.MojoExtension.getVariableValueFromObject;
+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>
  */
-public class DeployFileMojoTest extends AbstractMojoTestCase {
-    private static final String LOCAL_REPO = getBasedir() + 
"/target/local-repo";
-
-    private List<String> expectedFiles;
-
-    private List<String> fileList;
+@MojoTest
+class DeployFileMojoTest {
 
     private File remoteRepo;
 
-    private AutoCloseable openMocks;
-
-    @Mock
+    @Inject
     private MavenSession session;
 
-    @InjectMocks
-    private DeployFileMojo mojo;
-
-    public void setUp() throws Exception {
-        super.setUp();
+    @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);
 
         remoteRepo = new File(getBasedir(), "target/remote-repo");
 
@@ -66,37 +71,19 @@ public class DeployFileMojoTest extends 
AbstractMojoTestCase {
         }
     }
 
-    @Override
-    public void tearDown() throws Exception {
-        super.tearDown();
-        if (openMocks != null) {
-            openMocks.close();
-        }
-    }
-
-    public void testDeployTestEnvironment() throws Exception {
-        File testPom = new File(getBasedir(), 
"target/test-classes/unit/deploy-file-test/plugin-config.xml");
-
-        AbstractDeployMojo mojo = (AbstractDeployMojo) 
lookupMojo("deploy-file", testPom);
-
+    @Test
+    @InjectMojo(goal = "deploy-file")
+    void testDeployTestEnvironment(DeployFileMojo mojo) throws Exception {
         assertNotNull(mojo);
     }
 
-    public void testBasicDeployFile() throws Exception {
-        File testPom = new File(getBasedir(), 
"target/test-classes/unit/deploy-file-test/plugin-config.xml");
-
-        mojo = (DeployFileMojo) lookupMojo("deploy-file", testPom);
-
-        openMocks = MockitoAnnotations.openMocks(this);
+    @Test
+    @InjectMojo(goal = "deploy-file", pom = "plugin-config.xml")
+    @Basedir("/unit/deploy-file-test")
+    void testBasicDeployFile(DeployFileMojo mojo) throws Exception {
 
         assertNotNull(mojo);
 
-        DefaultRepositorySystemSession repositorySession = new 
DefaultRepositorySystemSession();
-        repositorySession.setLocalRepositoryManager(
-                new SimpleLocalRepositoryManagerFactory(new 
DefaultLocalPathComposer())
-                        .newInstance(repositorySession, new 
LocalRepository(LOCAL_REPO)));
-        when(session.getRepositorySession()).thenReturn(repositorySession);
-
         String groupId = (String) getVariableValueFromObject(mojo, "groupId");
 
         String artifactId = (String) getVariableValueFromObject(mojo, 
"artifactId");
@@ -155,8 +142,8 @@ public class DeployFileMojoTest extends 
AbstractMojoTestCase {
         assertEquals("POM was created from deploy:deploy-file", 
model.getDescription());
 
         // check the remote-repo
-        expectedFiles = new ArrayList<>();
-        fileList = new ArrayList<>();
+        ArrayList<String> expectedFiles = new ArrayList<>();
+        List<String> fileList = new ArrayList<>();
 
         File repo = new File(remoteRepo, "deploy-file-test");
 
@@ -187,21 +174,13 @@ public class DeployFileMojoTest extends 
AbstractMojoTestCase {
         assertEquals(0, getSizeOfExpectedFiles(fileList, expectedFiles));
     }
 
-    public void testDeployIfClassifierIsSet() throws Exception {
-        File testPom = new File(getBasedir(), 
"target/test-classes/unit/deploy-file-classifier/plugin-config.xml");
-
-        mojo = (DeployFileMojo) lookupMojo("deploy-file", testPom);
-
-        openMocks = MockitoAnnotations.openMocks(this);
+    @Test
+    @InjectMojo(goal = "deploy-file", pom = "plugin-config.xml")
+    @Basedir("/unit/deploy-file-classifier")
+    void testDeployIfClassifierIsSet(DeployFileMojo mojo) throws Exception {
 
         assertNotNull(mojo);
 
-        DefaultRepositorySystemSession repositorySession = new 
DefaultRepositorySystemSession();
-        repositorySession.setLocalRepositoryManager(
-                new SimpleLocalRepositoryManagerFactory(new 
DefaultLocalPathComposer())
-                        .newInstance(repositorySession, new 
LocalRepository(LOCAL_REPO)));
-        when(session.getRepositorySession()).thenReturn(repositorySession);
-
         String classifier = (String) getVariableValueFromObject(mojo, 
"classifier");
 
         String groupId = (String) getVariableValueFromObject(mojo, "groupId");
@@ -237,22 +216,13 @@ public class DeployFileMojoTest extends 
AbstractMojoTestCase {
         assertTrue(prodDeployedArtifact.exists());
     }
 
-    public void testDeployIfArtifactIsNotJar() throws Exception {
-        File testPom =
-                new File(getBasedir(), 
"target/test-classes/unit/deploy-file-artifact-not-jar/plugin-config.xml");
-
-        mojo = (DeployFileMojo) lookupMojo("deploy-file", testPom);
-
-        openMocks = MockitoAnnotations.openMocks(this);
+    @Test
+    @InjectMojo(goal = "deploy-file", pom = "plugin-config.xml")
+    @Basedir("/unit/deploy-file-artifact-not-jar")
+    void testDeployIfArtifactIsNotJar(DeployFileMojo mojo) throws Exception {
 
         assertNotNull(mojo);
 
-        DefaultRepositorySystemSession repositorySession = new 
DefaultRepositorySystemSession();
-        repositorySession.setLocalRepositoryManager(
-                new SimpleLocalRepositoryManagerFactory(new 
DefaultLocalPathComposer())
-                        .newInstance(repositorySession, new 
LocalRepository(LOCAL_REPO)));
-        when(session.getRepositorySession()).thenReturn(repositorySession);
-
         String groupId = (String) getVariableValueFromObject(mojo, "groupId");
 
         String artifactId = (String) getVariableValueFromObject(mojo, 
"artifactId");
@@ -276,20 +246,13 @@ public class DeployFileMojoTest extends 
AbstractMojoTestCase {
         assertTrue(file.exists());
     }
 
-    public void testDeployFileIfPackagingIsSet() throws Exception {
-        File testPom = new File(getBasedir(), 
"target/test-classes/unit/deploy-file-packaging/plugin-config.xml");
-        mojo = (DeployFileMojo) lookupMojo("deploy-file", testPom);
-
-        openMocks = MockitoAnnotations.openMocks(this);
+    @Test
+    @InjectMojo(goal = "deploy-file", pom = "plugin-config.xml")
+    @Basedir("/unit/deploy-file-packaging")
+    void testDeployFileIfPackagingIsSet(DeployFileMojo mojo) throws Exception {
 
         assertNotNull(mojo);
 
-        DefaultRepositorySystemSession repositorySession = new 
DefaultRepositorySystemSession();
-        repositorySession.setLocalRepositoryManager(
-                new SimpleLocalRepositoryManagerFactory(new 
DefaultLocalPathComposer())
-                        .newInstance(repositorySession, new 
LocalRepository(LOCAL_REPO)));
-        when(session.getRepositorySession()).thenReturn(repositorySession);
-
         String packaging = (String) getVariableValueFromObject(mojo, 
"packaging");
 
         String groupId = (String) getVariableValueFromObject(mojo, "groupId");
diff --git 
a/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoUnitTest.java 
b/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoUnitTest.java
index 2bd39c9..e18d06e 100644
--- a/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoUnitTest.java
+++ b/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoUnitTest.java
@@ -23,22 +23,21 @@ import java.io.File;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.Parent;
 import org.apache.maven.plugin.MojoExecutionException;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 /**
  * @author <a href="[email protected]">Jerome Lacoste</a>
  */
-public class DeployFileMojoUnitTest {
-    MockDeployFileMojo mojo;
-    Parent parent;
+class DeployFileMojoUnitTest {
+    private MockDeployFileMojo mojo;
+    private Parent parent;
 
-    @Before
-    public void setUp() {
+    @BeforeEach
+    void setUp() {
         Model pomModel = new Model();
         pomModel.setPackaging(null);
 
@@ -50,29 +49,22 @@ public class DeployFileMojoUnitTest {
         mojo = new MockDeployFileMojo(pomModel);
     }
 
-    @After
-    public void tearDown() {
-        mojo = null;
-    }
-
     static class MockDeployFileMojo extends DeployFileMojo {
         private Model model;
 
         MockDeployFileMojo(Model model) {
+            super(null, null);
             this.model = model;
         }
 
-        public void setModel(Model model) {
-            this.model = model;
-        }
-
+        @Override
         protected Model readModel(File pomFile) {
             return model;
         }
     }
 
     @Test
-    public void testProcessPomFromPomFileWithParent1() {
+    void testProcessPomFromPomFileWithParent1() {
         mojo.setPomFile(new File("foo.bar"));
 
         setMojoModel(mojo.model, null, null, null, null, parent);
@@ -87,7 +79,7 @@ public class DeployFileMojoUnitTest {
     }
 
     @Test
-    public void testProcessPomFromPomFileWithParent2() {
+    void testProcessPomFromPomFileWithParent2() {
         mojo.setPomFile(new File("foo.bar"));
         setMojoModel(mojo.model, null, "artifact", null, null, parent);
 
@@ -101,7 +93,7 @@ public class DeployFileMojoUnitTest {
     }
 
     @Test
-    public void testProcessPomFromPomFileWithParent3() {
+    void testProcessPomFromPomFileWithParent3() {
         mojo.setPomFile(new File("foo.bar"));
         setMojoModel(mojo.model, null, "artifact", "version", null, parent);
 
@@ -115,7 +107,7 @@ public class DeployFileMojoUnitTest {
     }
 
     @Test
-    public void testProcessPomFromPomFileWithParent4() throws 
MojoExecutionException {
+    void testProcessPomFromPomFileWithParent4() throws MojoExecutionException {
         mojo.setPomFile(new File("foo.bar"));
         setMojoModel(mojo.model, null, "artifact", "version", "packaging", 
parent);
 
@@ -125,7 +117,7 @@ public class DeployFileMojoUnitTest {
     }
 
     @Test
-    public void testProcessPomFromPomFileWithParent5() throws 
MojoExecutionException {
+    void testProcessPomFromPomFileWithParent5() throws MojoExecutionException {
         mojo.setPomFile(new File("foo.bar"));
         setMojoModel(mojo.model, "group", "artifact", "version", "packaging", 
parent);
 
@@ -135,7 +127,7 @@ public class DeployFileMojoUnitTest {
     }
 
     @Test
-    public void testProcessPomFromPomFileWithParent6() throws 
MojoExecutionException {
+    void testProcessPomFromPomFileWithParent6() throws MojoExecutionException {
         mojo.setPomFile(new File("foo.bar"));
         setMojoModel(mojo.model, "group", "artifact", "version", "packaging", 
null);
 
@@ -145,7 +137,7 @@ public class DeployFileMojoUnitTest {
     }
 
     @Test
-    public void testProcessPomFromPomFileWithOverrides() throws 
MojoExecutionException {
+    void testProcessPomFromPomFileWithOverrides() throws 
MojoExecutionException {
         mojo.setPomFile(new File("foo.bar"));
         setMojoModel(mojo.model, "group", "artifact", "version", "packaging", 
null);
 
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 64517bf..dc3345a 100644
--- a/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java
+++ b/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java
@@ -692,7 +692,7 @@ public class DeployMojoTest extends AbstractMojoTestCase {
     }
 
     public void testLegacyAltDeploymentRepositoryWithDefaultLayout() throws 
Exception {
-        mojo = new DeployMojo();
+        mojo = new DeployMojo(null, null);
 
         setVariableValueToObject(mojo, "project", project);
         setVariableValueToObject(mojo, "session", session);
@@ -707,7 +707,7 @@ public class DeployMojoTest extends AbstractMojoTestCase {
     }
 
     public void testLegacyAltDeploymentRepositoryWithLegacyLayout() throws 
Exception {
-        mojo = new DeployMojo();
+        mojo = new DeployMojo(null, null);
 
         setVariableValueToObject(mojo, "project", project);
         setVariableValueToObject(mojo, "session", session);
@@ -727,7 +727,7 @@ public class DeployMojoTest extends AbstractMojoTestCase {
     }
 
     public void testInsaneAltDeploymentRepository() throws Exception {
-        mojo = new DeployMojo();
+        mojo = new DeployMojo(null, null);
 
         setVariableValueToObject(mojo, "project", project);
         setVariableValueToObject(mojo, "session", session);
@@ -747,7 +747,7 @@ public class DeployMojoTest extends AbstractMojoTestCase {
     }
 
     public void testDefaultScmSvnAltDeploymentRepository() throws Exception {
-        mojo = new DeployMojo();
+        mojo = new DeployMojo(null, null);
 
         setVariableValueToObject(mojo, "project", project);
         setVariableValueToObject(mojo, "session", session);
@@ -763,7 +763,7 @@ public class DeployMojoTest extends AbstractMojoTestCase {
     }
 
     public void testLegacyScmSvnAltDeploymentRepository() throws Exception {
-        mojo = new DeployMojo();
+        mojo = new DeployMojo(null, null);
 
         setVariableValueToObject(mojo, "project", project);
         String altDeploymentRepository = 
"altDeploymentRepository::legacy::scm:svn:http://localhost";;
@@ -782,7 +782,7 @@ public class DeployMojoTest extends AbstractMojoTestCase {
     }
 
     public void testAltSnapshotDeploymentRepository() throws Exception {
-        mojo = new DeployMojo();
+        mojo = new DeployMojo(null, null);
 
         setVariableValueToObject(mojo, "project", project);
         setVariableValueToObject(mojo, "session", session);
@@ -797,7 +797,7 @@ public class DeployMojoTest extends AbstractMojoTestCase {
     }
 
     public void testAltReleaseDeploymentRepository() throws Exception {
-        mojo = new DeployMojo();
+        mojo = new DeployMojo(null, null);
 
         setVariableValueToObject(mojo, "project", project);
         setVariableValueToObject(mojo, "session", session);
diff --git 
a/src/test/resources/unit/deploy-file-artifact-not-jar/plugin-config.xml 
b/src/test/resources/unit/deploy-file-artifact-not-jar/plugin-config.xml
index 7db42a3..7fc4758 100644
--- a/src/test/resources/unit/deploy-file-artifact-not-jar/plugin-config.xml
+++ b/src/test/resources/unit/deploy-file-artifact-not-jar/plugin-config.xml
@@ -26,7 +26,7 @@ under the License.
           <groupId>org.apache.maven.test</groupId>
           <artifactId>maven-deploy-file-test</artifactId>
           <version>1.0</version>
-          
<file>${basedir}/src/test/resources/unit/deploy-file-artifact-not-jar/target/deploy-test-file.zip</file>
+          <file>${basedir}/target/deploy-test-file.zip</file>
           <repositoryId>deploy-test</repositoryId>
           
<url>file://${basedir}/target/remote-repo/deploy-file-artifact-not-jar</url>
           <generatePom>true</generatePom>
diff --git a/src/test/resources/unit/deploy-file-classifier/plugin-config.xml 
b/src/test/resources/unit/deploy-file-classifier/plugin-config.xml
index b77961b..93358d6 100644
--- a/src/test/resources/unit/deploy-file-classifier/plugin-config.xml
+++ b/src/test/resources/unit/deploy-file-classifier/plugin-config.xml
@@ -27,7 +27,7 @@ under the License.
           <artifactId>maven-deploy-file-test</artifactId>
           <version>1.0</version>
           <packaging>jar</packaging>
-          
<file>${basedir}/src/test/resources/unit/deploy-file-classifier/target/deploy-test-file-1.0-SNAPSHOT.jar</file>
+          <file>${basedir}/target/deploy-test-file-1.0-SNAPSHOT.jar</file>
           <repositoryId>deploy-test</repositoryId>
           
<url>file://${basedir}/target/remote-repo/deploy-file-classifier</url>
           <classifier>bin</classifier>
diff --git a/src/test/resources/unit/deploy-file-packaging/plugin-config.xml 
b/src/test/resources/unit/deploy-file-packaging/plugin-config.xml
index 170cd1c..12daf53 100644
--- a/src/test/resources/unit/deploy-file-packaging/plugin-config.xml
+++ b/src/test/resources/unit/deploy-file-packaging/plugin-config.xml
@@ -16,21 +16,21 @@ under the License.
 -->
 
 <project>
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-deploy-plugin</artifactId>
-                <configuration>
-                    <groupId>org.apache.maven.test</groupId>
-                    <artifactId>maven-deploy-file-test</artifactId>
-                    <version>1.0</version>
-                    <packaging>differentpackaging</packaging>
-                    
<file>${basedir}/src/test/resources/unit/deploy-file-packaging/target/deploy-test-file-1.0-SNAPSHOT.jar</file>
-                    <repositoryId>deploy-test</repositoryId>
-                    
<url>file://${basedir}/target/remote-repo/deploy-file-packaging</url>
-                    <generatePom>true</generatePom>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <configuration>
+          <groupId>org.apache.maven.test</groupId>
+          <artifactId>maven-deploy-file-test</artifactId>
+          <version>1.0</version>
+          <packaging>differentpackaging</packaging>
+          <file>${basedir}/target/deploy-test-file-1.0-SNAPSHOT.jar</file>
+          <repositoryId>deploy-test</repositoryId>
+          <url>file://${basedir}/target/remote-repo/deploy-file-packaging</url>
+          <generatePom>true</generatePom>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
 </project>
\ No newline at end of file
diff --git a/src/test/resources/unit/deploy-file-pom-file/plugin-config.xml 
b/src/test/resources/unit/deploy-file-pom-file/plugin-config.xml
deleted file mode 100644
index 3a4e2ce..0000000
Binary files a/src/test/resources/unit/deploy-file-pom-file/plugin-config.xml 
and /dev/null differ
diff --git 
a/src/test/resources/unit/deploy-file-pom-file/target/deploy-test-file-1.0-SNAPSHOT.jar
 
b/src/test/resources/unit/deploy-file-pom-file/target/deploy-test-file-1.0-SNAPSHOT.jar
deleted file mode 100644
index 6f5f2f8..0000000
--- 
a/src/test/resources/unit/deploy-file-pom-file/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/deploy-file-test/plugin-config.xml 
b/src/test/resources/unit/deploy-file-test/plugin-config.xml
index 9f52255..5042886 100644
--- a/src/test/resources/unit/deploy-file-test/plugin-config.xml
+++ b/src/test/resources/unit/deploy-file-test/plugin-config.xml
@@ -27,7 +27,7 @@ under the License.
           <artifactId>maven-deploy-file-test</artifactId>
           <version>1.0</version>
           <packaging>jar</packaging>
-          
<file>${basedir}/src/test/resources/unit/deploy-file-test/target/deploy-test-file-1.0-SNAPSHOT.jar</file>
+          <file>${basedir}/target/deploy-test-file-1.0-SNAPSHOT.jar</file>
           <repositoryId>deploy-test</repositoryId>
           <url>file://${basedir}/target/remote-repo/deploy-file-test</url>
           <description>POM was created from deploy:deploy-file</description>

Reply via email to