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

elharo pushed a commit to branch MDEP-776
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git


The following commit(s) were added to refs/heads/MDEP-776 by this push:
     new f4a97887 Stop using deprected dependency artifacts
f4a97887 is described below

commit f4a97887cdf3264d7028ff8f406689349e565da3
Author: Elliotte Rusty Harold <elh...@ibiblio.org>
AuthorDate: Sun Nov 10 11:50:40 2024 -0500

    Stop using deprected dependency artifacts
---
 .../TestUnpackDependenciesMojo.java                | 22 +---------------------
 1 file changed, 1 insertion(+), 21 deletions(-)

diff --git 
a/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestUnpackDependenciesMojo.java
 
b/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestUnpackDependenciesMojo.java
index 463f8f9b..6d8db76e 100644
--- 
a/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestUnpackDependenciesMojo.java
+++ 
b/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestUnpackDependenciesMojo.java
@@ -87,7 +87,6 @@ public class TestUnpackDependenciesMojo extends 
AbstractDependencyMojoTestCase {
         artifacts.addAll(directArtifacts);
 
         project.setArtifacts(artifacts);
-        project.setDependencyArtifacts(directArtifacts);
         mojo.markersDirectory = new File(this.testDir, "markers");
 
         ArtifactHandlerManager manager = lookup(ArtifactHandlerManager.class);
@@ -141,14 +140,13 @@ public class TestUnpackDependenciesMojo extends 
AbstractDependencyMojoTestCase {
     public void testNoTransitive() throws Exception {
         mojo.excludeTransitive = true;
         mojo.execute();
-        for (Artifact artifact : mojo.getProject().getDependencyArtifacts()) {
+        for (Artifact artifact : mojo.getProject().getArtifacts()) {
             assertUnpacked(artifact);
         }
     }
 
     public void testExcludeType() throws Exception {
         mojo.getProject().setArtifacts(stubFactory.getTypedArchiveArtifacts());
-        mojo.getProject().setDependencyArtifacts(new HashSet<>());
         mojo.excludeTypes = "jar";
         mojo.execute();
 
@@ -159,7 +157,6 @@ public class TestUnpackDependenciesMojo extends 
AbstractDependencyMojoTestCase {
 
     public void testExcludeProvidedScope() throws Exception {
         mojo.getProject().setArtifacts(stubFactory.getScopedArtifacts());
-        mojo.getProject().setDependencyArtifacts(new HashSet<>());
         mojo.excludeScope = "provided";
         // mojo.silent = false;
 
@@ -172,7 +169,6 @@ public class TestUnpackDependenciesMojo extends 
AbstractDependencyMojoTestCase {
 
     public void testExcludeSystemScope() throws Exception {
         mojo.getProject().setArtifacts(stubFactory.getScopedArtifacts());
-        mojo.getProject().setDependencyArtifacts(new HashSet<>());
         mojo.excludeScope = "system";
         // mojo.silent = false;
 
@@ -185,7 +181,6 @@ public class TestUnpackDependenciesMojo extends 
AbstractDependencyMojoTestCase {
 
     public void testExcludeCompileScope() throws Exception {
         mojo.getProject().setArtifacts(stubFactory.getScopedArtifacts());
-        mojo.getProject().setDependencyArtifacts(new HashSet<>());
         mojo.excludeScope = "compile";
         mojo.execute();
         ScopeArtifactFilter saf = new ScopeArtifactFilter(mojo.excludeScope);
@@ -197,7 +192,6 @@ public class TestUnpackDependenciesMojo extends 
AbstractDependencyMojoTestCase {
 
     public void testExcludeTestScope() throws IOException, 
MojoFailureException {
         mojo.getProject().setArtifacts(stubFactory.getScopedArtifacts());
-        mojo.getProject().setDependencyArtifacts(new HashSet<>());
         mojo.excludeScope = "test";
 
         try {
@@ -210,7 +204,6 @@ public class TestUnpackDependenciesMojo extends 
AbstractDependencyMojoTestCase {
 
     public void testExcludeRuntimeScope() throws Exception {
         mojo.getProject().setArtifacts(stubFactory.getScopedArtifacts());
-        mojo.getProject().setDependencyArtifacts(new HashSet<>());
         mojo.excludeScope = "runtime";
         mojo.execute();
         ScopeArtifactFilter saf = new ScopeArtifactFilter(mojo.excludeScope);
@@ -222,7 +215,6 @@ public class TestUnpackDependenciesMojo extends 
AbstractDependencyMojoTestCase {
 
     public void testIncludeType() throws Exception {
         mojo.getProject().setArtifacts(stubFactory.getTypedArchiveArtifacts());
-        mojo.getProject().setDependencyArtifacts(new HashSet<>());
 
         mojo.includeTypes = "jar";
         mojo.excludeTypes = "jar";
@@ -250,7 +242,6 @@ public class TestUnpackDependenciesMojo extends 
AbstractDependencyMojoTestCase {
 
     public void testSubPerType() throws Exception {
         mojo.getProject().setArtifacts(stubFactory.getTypedArchiveArtifacts());
-        mojo.getProject().setDependencyArtifacts(new HashSet<>());
         mojo.useSubDirectoryPerType = true;
         mojo.execute();
 
@@ -270,7 +261,6 @@ public class TestUnpackDependenciesMojo extends 
AbstractDependencyMojoTestCase {
 
     public void testSubPerArtifactAndType() throws Exception {
         mojo.getProject().setArtifacts(stubFactory.getTypedArchiveArtifacts());
-        mojo.getProject().setDependencyArtifacts(new HashSet<>());
         mojo.useSubDirectoryPerArtifact = true;
         mojo.useSubDirectoryPerType = true;
         mojo.execute();
@@ -292,7 +282,6 @@ public class TestUnpackDependenciesMojo extends 
AbstractDependencyMojoTestCase {
 
     public void testSubPerArtifactAndTypeRemoveVersion() throws Exception {
         mojo.getProject().setArtifacts(stubFactory.getTypedArchiveArtifacts());
-        mojo.getProject().setDependencyArtifacts(new HashSet<>());
         mojo.useSubDirectoryPerArtifact = true;
         mojo.useSubDirectoryPerType = true;
         mojo.stripVersion = true;
@@ -305,7 +294,6 @@ public class TestUnpackDependenciesMojo extends 
AbstractDependencyMojoTestCase {
 
     public void testIncludeCompileScope() throws Exception {
         mojo.getProject().setArtifacts(stubFactory.getScopedArtifacts());
-        mojo.getProject().setDependencyArtifacts(new HashSet<>());
         mojo.includeScope = "compile";
         mojo.execute();
         ScopeArtifactFilter saf = new ScopeArtifactFilter(mojo.includeScope);
@@ -317,7 +305,6 @@ public class TestUnpackDependenciesMojo extends 
AbstractDependencyMojoTestCase {
 
     public void testIncludeTestScope() throws Exception {
         mojo.getProject().setArtifacts(stubFactory.getScopedArtifacts());
-        mojo.getProject().setDependencyArtifacts(new HashSet<>());
         mojo.includeScope = "test";
 
         mojo.execute();
@@ -330,7 +317,6 @@ public class TestUnpackDependenciesMojo extends 
AbstractDependencyMojoTestCase {
 
     public void testIncludeRuntimeScope() throws Exception {
         mojo.getProject().setArtifacts(stubFactory.getScopedArtifacts());
-        mojo.getProject().setDependencyArtifacts(new HashSet<>());
         mojo.includeScope = "runtime";
         mojo.execute();
         ScopeArtifactFilter saf = new ScopeArtifactFilter(mojo.includeScope);
@@ -342,7 +328,6 @@ public class TestUnpackDependenciesMojo extends 
AbstractDependencyMojoTestCase {
 
     public void testIncludeprovidedScope() throws Exception {
         mojo.getProject().setArtifacts(stubFactory.getScopedArtifacts());
-        mojo.getProject().setDependencyArtifacts(new HashSet<>());
         mojo.includeScope = "provided";
 
         mojo.execute();
@@ -353,7 +338,6 @@ public class TestUnpackDependenciesMojo extends 
AbstractDependencyMojoTestCase {
 
     public void testIncludesystemScope() throws Exception {
         mojo.getProject().setArtifacts(stubFactory.getScopedArtifacts());
-        mojo.getProject().setDependencyArtifacts(new HashSet<>());
         mojo.includeScope = "system";
 
         mojo.execute();
@@ -365,7 +349,6 @@ public class TestUnpackDependenciesMojo extends 
AbstractDependencyMojoTestCase {
 
     public void testIncludeArtifactId() throws Exception {
         mojo.getProject().setArtifacts(stubFactory.getArtifactArtifacts());
-        mojo.getProject().setDependencyArtifacts(new HashSet<>());
 
         mojo.includeArtifactIds = "one";
         mojo.excludeArtifactIds = "one";
@@ -389,7 +372,6 @@ public class TestUnpackDependenciesMojo extends 
AbstractDependencyMojoTestCase {
 
     public void testExcludeArtifactId() throws Exception {
         mojo.getProject().setArtifacts(stubFactory.getArtifactArtifacts());
-        mojo.getProject().setDependencyArtifacts(new HashSet<>());
         mojo.excludeArtifactIds = "one";
         mojo.execute();
 
@@ -403,7 +385,6 @@ public class TestUnpackDependenciesMojo extends 
AbstractDependencyMojoTestCase {
 
     public void testExcludeGroupId() throws Exception {
         mojo.getProject().setArtifacts(stubFactory.getGroupIdArtifacts());
-        mojo.getProject().setDependencyArtifacts(new HashSet<>());
         mojo.excludeGroupIds = "one";
         mojo.execute();
 
@@ -414,7 +395,6 @@ public class TestUnpackDependenciesMojo extends 
AbstractDependencyMojoTestCase {
 
     public void testIncludeGroupId() throws Exception {
         mojo.getProject().setArtifacts(stubFactory.getGroupIdArtifacts());
-        mojo.getProject().setDependencyArtifacts(new HashSet<>());
         mojo.includeGroupIds = "one";
         mojo.excludeGroupIds = "one";
         // shouldn't get anything

Reply via email to