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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.2.0
    • 2.2.3
    • rest services
    • None
    • 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

              olamy Olivier Lamy
              wolle Wolfgang Jung
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: