diff options
author | Martin Stockhammer <martin_s@apache.org> | 2017-05-04 00:22:31 +0200 |
---|---|---|
committer | Martin Stockhammer <martin_s@apache.org> | 2017-05-04 00:22:31 +0200 |
commit | 2bf5154f1366fc21c4ecb02ef4ef71ca6fdc5a45 (patch) | |
tree | 0a380c3e0115b0d07e9c355b40fea6215ff02e12 /archiva-modules/archiva-base/archiva-repository-admin | |
parent | b7c191b331ac6a2f09a643835afdac154c9554fa (diff) | |
download | archiva-2bf5154f1366fc21c4ecb02ef4ef71ca6fdc5a45.tar.gz archiva-2bf5154f1366fc21c4ecb02ef4ef71ca6fdc5a45.zip |
MRM-1933, MRM-1940: Fixing repository check
Remove trailing slashes from the remote repositories
Use special check paths for certain servers
Diffstat (limited to 'archiva-modules/archiva-base/archiva-repository-admin')
-rw-r--r-- | archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RemoteRepository.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RemoteRepository.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RemoteRepository.java index db8021d86..fdab2432e 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RemoteRepository.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/RemoteRepository.java @@ -19,6 +19,8 @@ package org.apache.archiva.admin.model.beans; * under the License. */ +import org.apache.commons.lang.StringUtils; + import javax.xml.bind.annotation.XmlRootElement; import java.io.Serializable; import java.util.ArrayList; @@ -112,7 +114,7 @@ public class RemoteRepository int timeout ) { super( id, name, layout ); - this.url = url; + this.url = StringUtils.stripEnd(url,"/"); this.userName = userName; this.password = password; this.timeout = timeout; @@ -135,7 +137,7 @@ public class RemoteRepository public void setUrl( String url ) { - this.url = url; + this.url = StringUtils.stripEnd(url,"/"); } public String getUserName() |