You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@archiva.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/09/14 08:27:20 UTC

[jira] [Commented] (MRM-1909) Remote repository check fails for https://repo.maven.apache.org/maven2

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

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

GitHub user effrafax opened a pull request:

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

    Remove slash from remote repository check url

    Removes additional '/' character from the URL used to check the remote repositories.
    
    Fixes https://issues.apache.org/jira/browse/MRM-1909


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/effrafax/archiva MRM-1909

Alternatively you can review and apply these changes as the patch at:

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

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #25
    
----
commit e4a2e65f6e214bc0bb7248fd634e0160580e9ee0
Author: Martin Stockhammer <m....@web.de>
Date:   2016-09-13T16:33:19Z

    Removing trailing slash in remote repository check
    
    See https://issues.apache.org/jira/browse/MRM-1909

commit 5bb5f76520d5d0873cde6cb6171a44ea402f4f4b
Author: Martin Stockhammer <m....@web.de>
Date:   2016-09-14T08:22:21Z

    Adding unit test for remote repository check

----


> 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
>
> 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)