You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2020/03/03 22:28:18 UTC

[maven-dependency-plugin] branch ex3 created (now 63f6839)

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

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


      at 63f6839  remove unthrown exceptions

This branch includes the following new commits:

     new 57eda4e  remove deprecated methods
     new 63f6839  remove unthrown exceptions

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



[maven-dependency-plugin] 01/02: remove deprecated methods

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

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

commit 57eda4e4914c1991b759d3b4d357322c1dd6a9a9
Author: Elliotte Rusty Harold <el...@google.com>
AuthorDate: Tue Mar 3 17:21:06 2020 -0500

    remove deprecated methods
---
 .../ExcludeReactorProjectsDependencyFilterTest.java         | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/src/test/java/org/apache/maven/plugins/dependency/resolvers/ExcludeReactorProjectsDependencyFilterTest.java b/src/test/java/org/apache/maven/plugins/dependency/resolvers/ExcludeReactorProjectsDependencyFilterTest.java
index 0119358..ee66875 100644
--- a/src/test/java/org/apache/maven/plugins/dependency/resolvers/ExcludeReactorProjectsDependencyFilterTest.java
+++ b/src/test/java/org/apache/maven/plugins/dependency/resolvers/ExcludeReactorProjectsDependencyFilterTest.java
@@ -34,9 +34,6 @@ import java.util.HashSet;
 import java.util.Set;
 
 import static java.util.Collections.singletonList;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.containsString;
-import static org.junit.Assert.assertThat;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -79,9 +76,7 @@ public class ExcludeReactorProjectsDependencyFilterTest extends AbstractDependen
             }
         };
 
-        final boolean result = filter.accept( node , Collections.<Node>emptyList() );
-
-        assertThat( result, is( false ));
+        assertFalse( filter.accept( node , Collections.<Node>emptyList() ) );
     }
 
     public void testRejectWithLogging()
@@ -124,7 +119,7 @@ public class ExcludeReactorProjectsDependencyFilterTest extends AbstractDependen
 
         ArgumentCaptor<String> captor = ArgumentCaptor.forClass( String.class );
         verify( log ).debug( captor.capture() );
-        assertThat( captor.getValue(), containsString( "Skipped dependency" ) );
+        assertTrue( captor.getValue().contains( "Skipped dependency" ) );
     }
 
     public void testAccept()
@@ -163,8 +158,6 @@ public class ExcludeReactorProjectsDependencyFilterTest extends AbstractDependen
             }
         };
 
-        final boolean result = filter.accept( node , Collections.<Node>emptyList() );
-
-        assertThat( result, is( true ));
+        assertTrue( filter.accept( node , Collections.<Node>emptyList() ) );
     }
 }
\ No newline at end of file


[maven-dependency-plugin] 02/02: remove unthrown exceptions

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

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

commit 63f6839cb5b10e0c14cf76424ec224a4aedc6989
Author: Elliotte Rusty Harold <el...@google.com>
AuthorDate: Tue Mar 3 17:28:00 2020 -0500

    remove unthrown exceptions
---
 .../fromDependencies/TestCopyDependenciesMojo.java  | 21 ++++++++-------------
 1 file changed, 8 insertions(+), 13 deletions(-)

diff --git a/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestCopyDependenciesMojo.java b/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestCopyDependenciesMojo.java
index b90cfd3..3755266 100644
--- a/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestCopyDependenciesMojo.java
+++ b/src/test/java/org/apache/maven/plugins/dependency/fromDependencies/TestCopyDependenciesMojo.java
@@ -44,6 +44,7 @@ public class TestCopyDependenciesMojo
 
     CopyDependenciesMojo mojo;
 
+    @Override
     protected void setUp()
         throws Exception
     {
@@ -485,20 +486,14 @@ public class TestCopyDependenciesMojo
         }
     }
 
-    public void testArtifactNotFound()
-        throws Exception
-    {
-        dotestArtifactExceptions( false, true );
-    }
-
     public void testArtifactResolutionException()
-        throws Exception
+        throws MojoFailureException
     {
-        dotestArtifactExceptions( true, false );
+        dotestArtifactExceptions();
     }
 
-    public void dotestArtifactExceptions( boolean are, boolean anfe )
-        throws Exception
+    public void dotestArtifactExceptions()
+        throws MojoFailureException
     {
         mojo.classifier = "jdk";
         mojo.type = "java-sources";
@@ -552,7 +547,7 @@ public class TestCopyDependenciesMojo
     }
 
     public void testOverWriteRelease()
-        throws MojoExecutionException, InterruptedException, IOException, MojoFailureException
+        throws MojoExecutionException, IOException, MojoFailureException
     {
 
         Set<Artifact> artifacts = new HashSet<>();
@@ -584,7 +579,7 @@ public class TestCopyDependenciesMojo
     }
 
     public void testDontOverWriteSnap()
-        throws MojoExecutionException, InterruptedException, IOException, MojoFailureException
+        throws MojoExecutionException, IOException, MojoFailureException
     {
 
         Set<Artifact> artifacts = new HashSet<>();
@@ -615,7 +610,7 @@ public class TestCopyDependenciesMojo
     }
 
     public void testOverWriteSnap()
-        throws MojoExecutionException, InterruptedException, IOException, MojoFailureException
+        throws MojoExecutionException, IOException, MojoFailureException
     {
 
         Set<Artifact> artifacts = new HashSet<>();