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

hboutemy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-dist-tool.git


The following commit(s) were added to refs/heads/master by this push:
     new 84700a3  constants
84700a3 is described below

commit 84700a3cf50993480d3b12d31e335f8464cb6368
Author: Hervé Boutemy <hbout...@apache.org>
AuthorDate: Sat Feb 13 21:42:41 2021 +0100

    constants
---
 .../dist/tools/branches/ListBranchesMojo.java      | 24 +++++++++++-----------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git 
a/src/main/java/org/apache/maven/dist/tools/branches/ListBranchesMojo.java 
b/src/main/java/org/apache/maven/dist/tools/branches/ListBranchesMojo.java
index b363b28..c14aabe 100644
--- a/src/main/java/org/apache/maven/dist/tools/branches/ListBranchesMojo.java
+++ b/src/main/java/org/apache/maven/dist/tools/branches/ListBranchesMojo.java
@@ -49,14 +49,14 @@ import org.jsoup.select.Elements;
 @Mojo( name = "list-branches", requiresProject = false )
 public class ListBranchesMojo extends AbstractMavenReport
 {
-    private String gitboxUrl = "https://gitbox.apache.org/repos/asf";;
-    private String mavenboxJobsBaseUrl = 
"https://ci-builds.apache.org/job/Maven/job/maven-box/";;
-    
-    private Collection<String> excluded = Arrays.asList( 
"maven-integration-testing", // runs with Maven core job
-                                                         "maven-jenkins-env",
-                                                         "maven-jenkins-lib",
-                                                         "maven-sources",
-                                                         "maven-studies" );
+    private static final String GITBOX_URL = 
"https://gitbox.apache.org/repos/asf";;
+
+    private static final String MAVENBOX_JOBS_BASE_URL = 
"https://ci-builds.apache.org/job/Maven/job/maven-box/job/";;
+
+    private static final Collection<String> EXCLUDED = Arrays.asList( 
"maven-integration-testing", // runs with Maven
+                                                                               
                    // core job
+                                                                      
"maven-jenkins-env", "maven-jenkins-lib",
+                                                                      
"maven-sources", "maven-studies" );
     
     private static final Map<String, String> JIRAPROJECTS = new HashMap<>();
     
@@ -190,13 +190,13 @@ public class ListBranchesMojo extends AbstractMavenReport
         List<Result> repoStatus = new ArrayList<>( repositoryNames.size() );
         
         Collection<String> included = repositoryNames.stream()
-                                                     .filter( s -> 
!excluded.contains( s ) )
+                                                     .filter( s -> 
!EXCLUDED.contains( s ) )
                                                      .collect( 
Collectors.toList() );
         
         for ( String repository : included )
         {
-            final String gitboxHeadsUrl = gitboxUrl + "?p=" + repository + 
".git;a=heads";
-            final String repositoryJobUrl = mavenboxJobsBaseUrl + "job/" + 
repository;
+            final String gitboxHeadsUrl = GITBOX_URL + "?p=" + repository + 
".git;a=heads";
+            final String repositoryJobUrl = MAVENBOX_JOBS_BASE_URL + 
repository;
 
             try
             {
@@ -405,7 +405,7 @@ public class ListBranchesMojo extends AbstractMavenReport
         throws IOException
     {
         List<String> names = new ArrayList<>( 100 );
-        Document doc = JsoupRetry.get( gitboxUrl );
+        Document doc = JsoupRetry.get( GITBOX_URL );
         // find Apache Maven table
         Element apacheMavenTable = doc.getElementsMatchingText( "^Apache 
Maven$" ).parents().get( 0 );
 

Reply via email to