[maven-project-info-reports-plugin] branch MPIR-366 updated: MPIR-366: clean up code

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[maven-project-info-reports-plugin] branch MPIR-366 updated: MPIR-366: clean up code

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

rfscholte pushed a commit to branch MPIR-366
in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git


The following commit(s) were added to refs/heads/MPIR-366 by this push:
     new 93855ad  MPIR-366: clean up code
93855ad is described below

commit 93855ade5bf49fae0e11b012c958522958960228
Author: rfscholte <[hidden email]>
AuthorDate: Mon Apr 16 22:25:03 2018 +0200

    MPIR-366: clean up code
---
 .../report/projectinfo/DependenciesReport.java     |  7 ------
 .../projectinfo/ProjectInfoReportUtilsTest.java    | 26 ++++++++++------------
 .../report/projectinfo/stubs/ModulesStub.java      |  4 ++--
 3 files changed, 14 insertions(+), 23 deletions(-)

diff --git a/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java b/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java
index ffd9b62..0b72c7c 100644
--- a/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java
+++ b/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java
@@ -30,7 +30,6 @@ import java.io.OutputStream;
 import java.util.Locale;
 
 import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
 import org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager;
 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
 import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
@@ -80,12 +79,6 @@ public class DependenciesReport
     private ProjectBuilder projectBuilder;
 
     /**
-     * Artifact metadata source component.
-     */
-    @Component
-    protected ArtifactMetadataSource artifactMetadataSource;
-
-    /**
      * Dependency graph builder component.
      *
      * @since 2.5
diff --git a/src/test/java/org/apache/maven/report/projectinfo/ProjectInfoReportUtilsTest.java b/src/test/java/org/apache/maven/report/projectinfo/ProjectInfoReportUtilsTest.java
index e0605e8..03c71b9 100644
--- a/src/test/java/org/apache/maven/report/projectinfo/ProjectInfoReportUtilsTest.java
+++ b/src/test/java/org/apache/maven/report/projectinfo/ProjectInfoReportUtilsTest.java
@@ -24,8 +24,6 @@ import java.net.URL;
 import java.util.ArrayList;
 import java.util.List;
 
-import junit.framework.Assert;
-
 import org.apache.maven.model.DeploymentRepository;
 import org.apache.maven.model.DistributionManagement;
 import org.apache.maven.plugin.testing.AbstractMojoTestCase;
@@ -131,16 +129,16 @@ public class ProjectInfoReportUtilsTest
 
         String content = ProjectInfoReportUtils.getContent( url, getMavenProjectStub( false ), settingsStub,
                                                             "ISO-8859-1" );
-        Assert.assertNotNull( content );
-        Assert.assertTrue( content.contains( "Licensed to the Apache Software Foundation" ) );
+        assertNotNull( content );
+        assertTrue( content.contains( "Licensed to the Apache Software Foundation" ) );
 
         // file
         url = new File( getBasedir(), "/src/test/resources/iso-8859-5-encoded.txt" ).toURI().toURL();
 
         content = ProjectInfoReportUtils.getContent( url, getMavenProjectStub( false ), settingsStub,
                                                             "ISO-8859-5" );
-        Assert.assertNotNull( content );
-        Assert.assertTrue( content.contains( "Свобода всем народам!" ) );
+        assertNotNull( content );
+        assertTrue( content.contains( "Свобода всем народам!" ) );
 
         // http + no auth
         startJetty( false, false );
@@ -149,8 +147,8 @@ public class ProjectInfoReportUtilsTest
 
         content = ProjectInfoReportUtils.getContent( url, getMavenProjectStub( false ), settingsStub,
                                                      "ISO-8859-1" );
-        Assert.assertNotNull( content );
-        Assert.assertTrue( content.contains( "Licensed to the Apache Software Foundation" ) );
+        assertNotNull( content );
+        assertTrue( content.contains( "Licensed to the Apache Software Foundation" ) );
 
         stopJetty();
 
@@ -161,8 +159,8 @@ public class ProjectInfoReportUtilsTest
 
         content = ProjectInfoReportUtils.getContent( url, getMavenProjectStub( false ), settingsStub,
                                                      "ISO-8859-1" );
-        Assert.assertNotNull( content );
-        Assert.assertTrue( content.contains( "Licensed to the Apache Software Foundation" ) );
+        assertNotNull( content );
+        assertTrue( content.contains( "Licensed to the Apache Software Foundation" ) );
 
         stopJetty();
 
@@ -173,8 +171,8 @@ public class ProjectInfoReportUtilsTest
 
         content = ProjectInfoReportUtils.getContent( url, getMavenProjectStub( true ), settingsStub,
                                                      "ISO-8859-1" );
-        Assert.assertNotNull( content );
-        Assert.assertTrue( content.contains( "Licensed to the Apache Software Foundation" ) );
+        assertNotNull( content );
+        assertTrue( content.contains( "Licensed to the Apache Software Foundation" ) );
 
         stopJetty();
 
@@ -185,8 +183,8 @@ public class ProjectInfoReportUtilsTest
 
         content = ProjectInfoReportUtils.getContent( url, getMavenProjectStub( true ), settingsStub,
                                                      "ISO-8859-1" );
-        Assert.assertNotNull( content );
-        Assert.assertTrue( content.contains( "Licensed to the Apache Software Foundation" ) );
+        assertNotNull( content );
+        assertTrue( content.contains( "Licensed to the Apache Software Foundation" ) );
 
         stopJetty();
 
diff --git a/src/test/java/org/apache/maven/report/projectinfo/stubs/ModulesStub.java b/src/test/java/org/apache/maven/report/projectinfo/stubs/ModulesStub.java
index c13c027..26e2b5f 100644
--- a/src/test/java/org/apache/maven/report/projectinfo/stubs/ModulesStub.java
+++ b/src/test/java/org/apache/maven/report/projectinfo/stubs/ModulesStub.java
@@ -37,8 +37,8 @@ public class ModulesStub
     }
 
     @Override
-    public List getModules()
+    public List<String> getModules()
     {
-        return Arrays.<String>asList( "subproject1", "subproject2" );
+        return Arrays.asList( "subproject1", "subproject2" );
     }
 }

--
To stop receiving notification emails like this one, please contact
[hidden email].