[ 
https://issues.apache.org/jira/browse/MRM-1909?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15490120#comment-15490120
 ] 

ASF GitHub Bot commented on MRM-1909:
-------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/archiva/pull/25


> Remote repository check fails for https://repo.maven.apache.org/maven2
> ----------------------------------------------------------------------
>
>                 Key: MRM-1909
>                 URL: https://issues.apache.org/jira/browse/MRM-1909
>             Project: Archiva
>          Issue Type: Bug
>          Components: rest services
>    Affects Versions: 2.2.0
>            Reporter: Wolfgang Jung
>            Priority: Minor
>             Fix For: 2.2.2
>
>
> 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:
> {code}
> 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;
>          }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to