Uploaded image for project: 'Archiva'
  1. Archiva
  2. MRM-1909

Remote repository check fails for https://repo.maven.apache.org/maven2

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.2.3
    • Component/s: rest services
    • Labels:
      None
    • Flags:
      Patch

      Description

      Within org.apache.archiva.rest.services.DefaultRemoteRepositoriesService.checkRemoteConnectivity(String) wagon is used to check the remote system via wagon.getFileList( "/" );

      The URL constructed by this is https://repo.maven.apache.org/maven2// (with a double slash at the end) which is answered by the nginx with a 404 error.

      The quick-fix for me was:

      diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRemoteRepositoriesService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRemoteRepositoriesService.java
      index 64b8043..14f32f7 100644
      --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRemoteRepositoriesService.java
      +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRemoteRepositoriesService.java
      @@ -186,7 +187,7 @@
                   wagon.connect( new Repository( remoteRepository.getId(), remoteRepository.getUrl() ) );
       
                   // we only check connectivity as remote repo can be empty
      -            wagon.getFileList( "/" );
      +            wagon.getFileList( "" );
       
                   return Boolean.TRUE;
               }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                olamy Olivier Lamy
                Reporter:
                wolle Wolfgang Jung
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: