You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2020/03/09 00:42:18 UTC

[GitHub] [maven-project-info-reports-plugin] slachiewicz opened a new pull request #18: [MPIR-393] Cleanup getArchiveServer

slachiewicz opened a new pull request #18: [MPIR-393] Cleanup getArchiveServer
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/18
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [maven-project-info-reports-plugin] elharo commented on a change in pull request #18: [MPIR-393] Cleanup getArchiveServer

Posted by GitBox <gi...@apache.org>.
elharo commented on a change in pull request #18: [MPIR-393] Cleanup getArchiveServer
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/18#discussion_r389425018
 
 

 ##########
 File path: src/test/java/org/apache/maven/report/projectinfo/ProjectInfoReportUtilsTest.java
 ##########
 @@ -191,6 +193,30 @@ public void testGetInputStreamURL()
         // TODO need to test with a proxy
     }
 
+    /**
+     * @throws Throwable if any
+     */
+    public void testGetArchiveServer()
+    {
+        String server = "http://mail-archives.apache.org/mod_mbox/maven-announce/";
 
 Review comment:
   I'm tempted to inline all these server variables rather than reusing them

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [maven-project-info-reports-plugin] elharo commented on a change in pull request #18: [MPIR-393] Cleanup getArchiveServer

Posted by GitBox <gi...@apache.org>.
elharo commented on a change in pull request #18: [MPIR-393] Cleanup getArchiveServer
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/18#discussion_r389424751
 
 

 ##########
 File path: src/main/java/org/apache/maven/report/projectinfo/ProjectInfoReportUtils.java
 ##########
 @@ -276,6 +277,19 @@ public static boolean isArtifactUrlValid( String url )
         return URL_VALIDATOR.isValid( url );
     }
 
+    /**
+     * Convenience method to return the name of a web-based mailing list archive server. <br>
+     * For instance, if the archive uri is <code>http://www.mail-archive.com/dev@maven.apache.org</code>, this
+     * method return <code>www.mail-archive.com</code>
+     *
+     * @param uri
+     * @return the server name of a web-based mailing list archive server
 
 Review comment:
   server --> host

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [maven-project-info-reports-plugin] elharo commented on a change in pull request #18: [MPIR-393] Cleanup getArchiveServer

Posted by GitBox <gi...@apache.org>.
elharo commented on a change in pull request #18: [MPIR-393] Cleanup getArchiveServer
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/18#discussion_r389424551
 
 

 ##########
 File path: src/main/java/org/apache/maven/report/projectinfo/MailingListsReport.java
 ##########
 @@ -24,13 +24,14 @@
 import org.apache.maven.model.Model;
 import org.apache.maven.plugins.annotations.Mojo;
 import org.codehaus.plexus.i18n.I18N;
-import org.codehaus.plexus.util.StringUtils;
 
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 
+import static org.apache.maven.report.projectinfo.ProjectInfoReportUtils.getArchiveServer;
 
 Review comment:
   This method is too unfamiliar to justify a static import.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [maven-project-info-reports-plugin] elharo commented on a change in pull request #18: [MPIR-393] Cleanup getArchiveServer

Posted by GitBox <gi...@apache.org>.
elharo commented on a change in pull request #18: [MPIR-393] Cleanup getArchiveServer
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/18#discussion_r389424622
 
 

 ##########
 File path: src/main/java/org/apache/maven/report/projectinfo/ProjectInfoReportUtils.java
 ##########
 @@ -276,6 +277,19 @@ public static boolean isArtifactUrlValid( String url )
         return URL_VALIDATOR.isValid( url );
     }
 
+    /**
+     * Convenience method to return the name of a web-based mailing list archive server. <br>
 
 Review comment:
   no <br> needed

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [maven-project-info-reports-plugin] elharo commented on a change in pull request #18: [MPIR-393] Cleanup getArchiveServer

Posted by GitBox <gi...@apache.org>.
elharo commented on a change in pull request #18: [MPIR-393] Cleanup getArchiveServer
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/18#discussion_r389424638
 
 

 ##########
 File path: src/main/java/org/apache/maven/report/projectinfo/ProjectInfoReportUtils.java
 ##########
 @@ -276,6 +277,19 @@ public static boolean isArtifactUrlValid( String url )
         return URL_VALIDATOR.isValid( url );
     }
 
+    /**
+     * Convenience method to return the name of a web-based mailing list archive server. <br>
+     * For instance, if the archive uri is <code>http://www.mail-archive.com/dev@maven.apache.org</code>, this
 
 Review comment:
   URI

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [maven-project-info-reports-plugin] elharo commented on a change in pull request #18: [MPIR-393] Cleanup getArchiveServer

Posted by GitBox <gi...@apache.org>.
elharo commented on a change in pull request #18: [MPIR-393] Cleanup getArchiveServer
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/18#discussion_r389424698
 
 

 ##########
 File path: src/main/java/org/apache/maven/report/projectinfo/ProjectInfoReportUtils.java
 ##########
 @@ -276,6 +277,19 @@ public static boolean isArtifactUrlValid( String url )
         return URL_VALIDATOR.isValid( url );
     }
 
+    /**
+     * Convenience method to return the name of a web-based mailing list archive server. <br>
+     * For instance, if the archive uri is <code>http://www.mail-archive.com/dev@maven.apache.org</code>, this
+     * method return <code>www.mail-archive.com</code>
+     *
+     * @param uri
+     * @return the server name of a web-based mailing list archive server
+     */
+    public static String getArchiveServer( String uri )
+    {
+        return URI.create( uri ).getHost();
 
 Review comment:
   This does not have the same behavior for null and empty URLs.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [maven-project-info-reports-plugin] elharo commented on a change in pull request #18: [MPIR-393] Cleanup getArchiveServer

Posted by GitBox <gi...@apache.org>.
elharo commented on a change in pull request #18: [MPIR-393] Cleanup getArchiveServer
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/18#discussion_r389424956
 
 

 ##########
 File path: src/test/java/org/apache/maven/report/projectinfo/ProjectInfoReportUtilsTest.java
 ##########
 @@ -191,6 +193,30 @@ public void testGetInputStreamURL()
         // TODO need to test with a proxy
     }
 
+    /**
+     * @throws Throwable if any
 
 Review comment:
   delete @throws

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [maven-project-info-reports-plugin] elharo commented on a change in pull request #18: [MPIR-393] Cleanup getArchiveServer

Posted by GitBox <gi...@apache.org>.
elharo commented on a change in pull request #18: [MPIR-393] Cleanup getArchiveServer
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/18#discussion_r389424657
 
 

 ##########
 File path: src/main/java/org/apache/maven/report/projectinfo/ProjectInfoReportUtils.java
 ##########
 @@ -276,6 +277,19 @@ public static boolean isArtifactUrlValid( String url )
         return URL_VALIDATOR.isValid( url );
     }
 
+    /**
+     * Convenience method to return the name of a web-based mailing list archive server. <br>
+     * For instance, if the archive uri is <code>http://www.mail-archive.com/dev@maven.apache.org</code>, this
+     * method return <code>www.mail-archive.com</code>
 
 Review comment:
   returns

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services