You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ma...@apache.org on 2017/05/14 16:21:04 UTC
[13/16] archiva git commit: Sync with current master
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRemoteRepositoriesService.java
----------------------------------------------------------------------
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 5a79487..59358dd 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
@@ -38,11 +38,14 @@ import org.apache.maven.wagon.proxy.ProxyInfo;
import org.apache.maven.wagon.repository.Repository;
import org.springframework.stereotype.Service;
+import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.ws.rs.core.Response;
import java.net.URL;
import java.util.Collections;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
/**
* @author Olivier Lamy
@@ -51,8 +54,7 @@ import java.util.List;
@Service( "remoteRepositoriesService#rest" )
public class DefaultRemoteRepositoriesService
extends AbstractRestService
- implements RemoteRepositoriesService
-{
+ implements RemoteRepositoriesService {
@Inject
private RemoteRepositoryAdmin remoteRepositoryAdmin;
@@ -67,32 +69,26 @@ public class DefaultRemoteRepositoriesService
int checkReadTimeout = 10000;
int checkTimeout = 9000;
+
@Override
public List<RemoteRepository> getRemoteRepositories()
- throws ArchivaRestServiceException
- {
- try
- {
+ throws ArchivaRestServiceException {
+ try {
List<RemoteRepository> remoteRepositories = remoteRepositoryAdmin.getRemoteRepositories();
return remoteRepositories == null ? Collections.<RemoteRepository>emptyList() : remoteRepositories;
- }
- catch ( RepositoryAdminException e )
- {
- log.error( e.getMessage(), e );
- throw new ArchivaRestServiceException( e.getMessage(), e.getFieldName(), e );
+ } catch (RepositoryAdminException e) {
+ log.error(e.getMessage(), e);
+ throw new ArchivaRestServiceException(e.getMessage(), e.getFieldName(), e);
}
}
@Override
- public RemoteRepository getRemoteRepository( String repositoryId )
- throws ArchivaRestServiceException
- {
+ public RemoteRepository getRemoteRepository(String repositoryId)
+ throws ArchivaRestServiceException {
List<RemoteRepository> remoteRepositories = getRemoteRepositories();
- for ( RemoteRepository repository : remoteRepositories )
- {
- if ( StringUtils.equals( repositoryId, repository.getId() ) )
- {
+ for (RemoteRepository repository : remoteRepositories) {
+ if (StringUtils.equals(repositoryId, repository.getId())) {
return repository;
}
}
@@ -100,121 +96,106 @@ public class DefaultRemoteRepositoriesService
}
@Override
- public Boolean deleteRemoteRepository( String repositoryId )
- throws ArchivaRestServiceException
- {
- try
- {
- return remoteRepositoryAdmin.deleteRemoteRepository( repositoryId, getAuditInformation() );
- }
- catch ( RepositoryAdminException e )
- {
- log.error( e.getMessage(), e );
- throw new ArchivaRestServiceException( e.getMessage(), e.getFieldName(), e );
+ public Boolean deleteRemoteRepository(String repositoryId)
+ throws ArchivaRestServiceException {
+ try {
+ return remoteRepositoryAdmin.deleteRemoteRepository(repositoryId, getAuditInformation());
+ } catch (RepositoryAdminException e) {
+ log.error(e.getMessage(), e);
+ throw new ArchivaRestServiceException(e.getMessage(), e.getFieldName(), e);
}
}
@Override
- public Boolean addRemoteRepository( RemoteRepository remoteRepository )
- throws ArchivaRestServiceException
- {
- try
- {
- return remoteRepositoryAdmin.addRemoteRepository( remoteRepository, getAuditInformation() );
- }
- catch ( RepositoryAdminException e )
- {
- log.error( e.getMessage(), e );
- throw new ArchivaRestServiceException( e.getMessage(), e.getFieldName(), e );
+ public Boolean addRemoteRepository(RemoteRepository remoteRepository)
+ throws ArchivaRestServiceException {
+ try {
+ return remoteRepositoryAdmin.addRemoteRepository(remoteRepository, getAuditInformation());
+ } catch (RepositoryAdminException e) {
+ log.error(e.getMessage(), e);
+ throw new ArchivaRestServiceException(e.getMessage(), e.getFieldName(), e);
}
}
@Override
- public Boolean updateRemoteRepository( RemoteRepository remoteRepository )
- throws ArchivaRestServiceException
- {
- try
- {
- return remoteRepositoryAdmin.updateRemoteRepository( remoteRepository, getAuditInformation() );
- }
- catch ( RepositoryAdminException e )
- {
- log.error( e.getMessage(), e );
- throw new ArchivaRestServiceException( e.getMessage(), e.getFieldName(), e );
+ public Boolean updateRemoteRepository(RemoteRepository remoteRepository)
+ throws ArchivaRestServiceException {
+ try {
+ return remoteRepositoryAdmin.updateRemoteRepository(remoteRepository, getAuditInformation());
+ } catch (RepositoryAdminException e) {
+ log.error(e.getMessage(), e);
+ throw new ArchivaRestServiceException(e.getMessage(), e.getFieldName(), e);
}
}
@Override
- public Boolean checkRemoteConnectivity( String repositoryId )
- throws ArchivaRestServiceException
- {
- try
- {
- RemoteRepository remoteRepository = remoteRepositoryAdmin.getRemoteRepository( repositoryId );
- if ( remoteRepository == null )
- {
- log.warn( "ignore scheduleDownloadRemote for repo with id {} as not exists", repositoryId );
+ public Boolean checkRemoteConnectivity(String repositoryId)
+ throws ArchivaRestServiceException {
+ try {
+ RemoteRepository remoteRepository = remoteRepositoryAdmin.getRemoteRepository(repositoryId);
+ if (remoteRepository == null) {
+ log.warn("ignore scheduleDownloadRemote for repo with id {} as not exists", repositoryId);
return Boolean.FALSE;
}
NetworkProxy networkProxy = null;
- if ( StringUtils.isNotBlank( remoteRepository.getRemoteDownloadNetworkProxyId() ) )
- {
- networkProxy = networkProxyAdmin.getNetworkProxy( remoteRepository.getRemoteDownloadNetworkProxyId() );
- if ( networkProxy == null )
- {
+ if (StringUtils.isNotBlank(remoteRepository.getRemoteDownloadNetworkProxyId())) {
+ networkProxy = networkProxyAdmin.getNetworkProxy(remoteRepository.getRemoteDownloadNetworkProxyId());
+ if (networkProxy == null) {
log.warn(
- "your remote repository is configured to download remote index trought a proxy we cannot find id:{}",
- remoteRepository.getRemoteDownloadNetworkProxyId() );
+ "your remote repository is configured to download remote index trought a proxy we cannot find id:{}",
+ remoteRepository.getRemoteDownloadNetworkProxyId());
}
}
- String wagonProtocol = new URL( remoteRepository.getUrl() ).getProtocol();
+ String wagonProtocol = new URL(remoteRepository.getUrl()).getProtocol();
final Wagon wagon =
- wagonFactory.getWagon( new WagonFactoryRequest( wagonProtocol, remoteRepository.getExtraHeaders() ) //
- .networkProxy( networkProxy ) );
+ wagonFactory.getWagon(new WagonFactoryRequest(wagonProtocol, remoteRepository.getExtraHeaders()) //
+ .networkProxy(networkProxy));
// hardcoded value as it's a check of the remote repo connectivity
- wagon.setReadTimeout( checkReadTimeout );
- wagon.setTimeout( checkTimeout );
+ wagon.setReadTimeout(checkReadTimeout);
+ wagon.setTimeout(checkTimeout);
- if ( wagon instanceof AbstractHttpClientWagon )
- {
+ if (wagon instanceof AbstractHttpClientWagon) {
HttpMethodConfiguration httpMethodConfiguration = new HttpMethodConfiguration() //
- .setUsePreemptive( true ) //
- .setReadTimeout( checkReadTimeout );
- HttpConfiguration httpConfiguration = new HttpConfiguration().setGet( httpMethodConfiguration );
- AbstractHttpClientWagon.class.cast( wagon ).setHttpConfiguration( httpConfiguration );
+ .setUsePreemptive(true) //
+ .setReadTimeout(checkReadTimeout);
+ HttpConfiguration httpConfiguration = new HttpConfiguration().setGet(httpMethodConfiguration);
+ AbstractHttpClientWagon.class.cast(wagon).setHttpConfiguration(httpConfiguration);
}
-
+
ProxyInfo proxyInfo = null;
- if ( networkProxy != null )
- {
+ if (networkProxy != null) {
proxyInfo = new ProxyInfo();
- proxyInfo.setType( networkProxy.getProtocol() );
- proxyInfo.setHost( networkProxy.getHost() );
- proxyInfo.setPort( networkProxy.getPort() );
- proxyInfo.setUserName( networkProxy.getUsername() );
- proxyInfo.setPassword( networkProxy.getPassword() );
- }
-
- wagon.connect( new Repository( remoteRepository.getId(), remoteRepository.getUrl() ), proxyInfo );
-
- // we only check connectivity as remote repo can be empty
- // MRM-1909: Wagon implementation appends a slash already
- wagon.getFileList( "" );
+ proxyInfo.setType(networkProxy.getProtocol());
+ proxyInfo.setHost(networkProxy.getHost());
+ proxyInfo.setPort(networkProxy.getPort());
+ proxyInfo.setUserName(networkProxy.getUsername());
+ proxyInfo.setPassword(networkProxy.getPassword());
+ }
+ String url = StringUtils.stripEnd(remoteRepository.getUrl(), "/");
+ wagon.connect(new Repository(remoteRepository.getId(), url), proxyInfo);
+
+ // MRM-1933, there are certain servers that do not allow browsing
+ if (!(StringUtils.isEmpty(remoteRepository.getCheckPath()) ||
+ "/".equals(remoteRepository.getCheckPath()))) {
+ return wagon.resourceExists(remoteRepository.getCheckPath());
+ } else {
+ // we only check connectivity as remote repo can be empty
+ // MRM-1909: Wagon implementation appends a slash already
+ wagon.getFileList("");
+ }
return Boolean.TRUE;
- }
- catch ( TransferFailedException e )
- {
- log.info( "TransferFailedException :{}", e.getMessage() );
+ } catch (TransferFailedException e) {
+ log.info("TransferFailedException :{}", e.getMessage());
+ return Boolean.FALSE;
+ } catch (Exception e) {
+ // This service returns either true or false, Exception cannot be handled by the clients
+ log.debug("Exception occured on connectivity test.", e);
+ log.info("Connection exception: {}", e.getMessage());
return Boolean.FALSE;
- }
- catch ( Exception e )
- {
- throw new ArchivaRestServiceException( e.getMessage(),
- Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), e );
}
}
@@ -234,4 +215,5 @@ public class DefaultRemoteRepositoriesService
public void setCheckTimeout(int checkTimeout) {
this.checkTimeout = checkTimeout;
}
+
}
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RemoteRepositoriesServiceTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RemoteRepositoriesServiceTest.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RemoteRepositoriesServiceTest.java
index 3d284e4..d3d6672 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RemoteRepositoriesServiceTest.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RemoteRepositoriesServiceTest.java
@@ -161,10 +161,62 @@ public class RemoteRepositoriesServiceTest
}
+ /*
+ * Check maven repository
+ */
+ @Test
+ public void checkRemoteConnectivity2()
+ throws Exception {
+ RemoteRepositoriesService service = getRemoteRepositoriesService();
+
+ WebClient.client(service).header("Authorization", authorizationHeader);
+
+ int initialSize = service.getRemoteRepositories().size();
+
+ service.addRemoteRepository(getRemoteMavenRepository());
+
+ assertTrue(service.checkRemoteConnectivity("id-maven1"));
+
+ }
+
+
+ /*
+ * Check oracle repository that allows not browsing (MRM-1933)
+ */
+ @Test
+ public void checkRemoteConnectivity3()
+ throws Exception {
+ RemoteRepositoriesService service = getRemoteRepositoriesService();
+
+ WebClient.client(service).header("Authorization", authorizationHeader);
+ WebClient.client(service).accept("application/json");
+
+ int initialSize = service.getRemoteRepositories().size();
+
+ service.addRemoteRepository(getRemoteOracleRepository());
+
+ assertTrue(service.checkRemoteConnectivity("id-oracle"));
+
+ }
+
RemoteRepository getRemoteRepository()
{
return new RemoteRepository( "id-new", "new one", "http://foo.com", "default", "foo", "foopassword", 120,
"cool repo" );
}
+
+ RemoteRepository getRemoteMavenRepository()
+ {
+ return new RemoteRepository( "id-maven1", "Maven1", "http://repo.maven.apache.org/maven2", "default", "foo", "foopassword", 120,
+ "cool repo3" );
+ }
+
+
+ RemoteRepository getRemoteOracleRepository()
+ {
+ return new RemoteRepository( "id-oracle", "Oracle", "http://download.oracle.com/maven", "default", "foo", "foopassword", 120,
+ "cool repo4" );
+ }
+
}
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/archiva-web/archiva-rest/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-rest/pom.xml b/archiva-modules/archiva-web/archiva-rest/pom.xml
index 821ff19..7a80c01 100644
--- a/archiva-modules/archiva-web/archiva-rest/pom.xml
+++ b/archiva-modules/archiva-web/archiva-rest/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-web</artifactId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>2.2.4-SNAPSHOT</version>
</parent>
<artifactId>archiva-rest</artifactId>
<name>Archiva Web :: REST support</name>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/archiva-web/archiva-rss/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-rss/pom.xml b/archiva-modules/archiva-web/archiva-rss/pom.xml
index ed1e17d..78f20e3 100644
--- a/archiva-modules/archiva-web/archiva-rss/pom.xml
+++ b/archiva-modules/archiva-web/archiva-rss/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>archiva-web</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>2.2.4-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archiva-rss</artifactId>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/archiva-web/archiva-security/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-security/pom.xml b/archiva-modules/archiva-web/archiva-security/pom.xml
index 66aa53b..14fccff 100644
--- a/archiva-modules/archiva-web/archiva-security/pom.xml
+++ b/archiva-modules/archiva-web/archiva-security/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-web</artifactId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>2.2.4-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archiva-security</artifactId>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/archiva-web/archiva-test-mocks/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-test-mocks/pom.xml b/archiva-modules/archiva-web/archiva-test-mocks/pom.xml
index f751fcc..1f97a69 100644
--- a/archiva-modules/archiva-web/archiva-test-mocks/pom.xml
+++ b/archiva-modules/archiva-web/archiva-test-mocks/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-web</artifactId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>2.2.4-SNAPSHOT</version>
</parent>
<artifactId>archiva-test-mocks</artifactId>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/archiva-web/archiva-web-common/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/pom.xml b/archiva-modules/archiva-web/archiva-web-common/pom.xml
index 6d9c94c..beeaa3e 100644
--- a/archiva-modules/archiva-web/archiva-web-common/pom.xml
+++ b/archiva-modules/archiva-web/archiva-web-common/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-web</artifactId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>2.2.4-SNAPSHOT</version>
</parent>
<artifactId>archiva-web-common</artifactId>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties b/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties
index e8013c5..122db4f 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties
@@ -172,8 +172,9 @@ remoterepository.download.remote.full=Full download ?
remoterepository.download.remote.scheduled=Download Remote Index of repository {0} scheduled.
remoterepository.delete.confirm=Are you sure to delete Remote Repository {0} ?
remoterepository.deleted=Remote repository {0}\u00c2\u00a0deleted.
-remoteRepository.extraParametersEntries=Additionnal url parameters
-remoteRepository.extraHeadersEntries=Additionnal Http Headers
+remoteRepository.extraParametersEntries=Additional url parameters
+remoteRepository.extraHeadersEntries=Additional Http Headers
+remoteRepository.checkPath=Connection Check Path
remoteRepository.timeout.help.title=Download Timeout
remoteRepository.timeout.help.content=Timeout in secondes for downloading files from remote repository.
remoteRepository.userName.help.title=Username
@@ -197,6 +198,11 @@ remoteRepository.extraParametersEntries.help.content=Key/Value pair you want to
remoteRepository.extraHeadersEntries.help.title=Extra HTTP Headers
remoteRepository.extraHeadersEntries.help.content=Key/Value pair HTTP headers you want to add when asking the remote repository.
remoterepository.remotecheck=Remote Check
+remoteRepository.checkPath.help.title=Connection Check Path
+remoteRepository.checkPath.help.content=Path relative to the repository URL that is used to check the connection to the \
+ remote repository. Some repositories may not allow to browse the root directory. So if this path is set, the repository is \
+ considered online if the resources exists.
+
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/pom.xml b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
index cd01dc4..ecff6b4 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-web</artifactId>
- <version>2.2.2-SNAPSHOT</version>
+ <version>2.2.3-SNAPSHOT</version>
</parent>
<artifactId>archiva-webapp-test</artifactId>
<packaging>pom</packaging>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/archiva-web/archiva-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp/pom.xml b/archiva-modules/archiva-web/archiva-webapp/pom.xml
index 135c5ad..7ae0c65 100644
--- a/archiva-modules/archiva-web/archiva-webapp/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webapp/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-web</artifactId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>2.2.4-SNAPSHOT</version>
</parent>
<artifactId>archiva-webapp</artifactId>
<packaging>war</packaging>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/maven2/repositories.js
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/maven2/repositories.js b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/maven2/repositories.js
index 3a6cb5f..abfb373 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/maven2/repositories.js
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/maven2/repositories.js
@@ -692,7 +692,7 @@ function(jquery,i18n,jqueryTmpl,bootstrap,jqueryValidate,ko) {
RemoteRepository=function(id,name,layout,indexDirectory,url,userName,password,timeout,downloadRemoteIndex,remoteIndexUrl,
remoteDownloadNetworkProxyId,cronExpression,remoteDownloadTimeout,downloadRemoteIndexOnStartup,
- description,extraParametersEntries,extraHeadersEntries){
+ description,extraParametersEntries,extraHeadersEntries,checkPath){
var self=this;
@@ -774,6 +774,9 @@ function(jquery,i18n,jqueryTmpl,bootstrap,jqueryValidate,ko) {
self.modified(true);
});
+ this.checkPath=ko.observable(checkPath);
+ this.checkPath.subscribe(function(newValue){self.modified(true)});
+
this.modified=ko.observable(false);
}
@@ -799,7 +802,7 @@ function(jquery,i18n,jqueryTmpl,bootstrap,jqueryValidate,ko) {
return new RemoteRepository(data.id,data.name,data.layout,data.indexDirectory,data.url,data.userName,data.password,
data.timeout,data.downloadRemoteIndex,data.remoteIndexUrl,data.remoteDownloadNetworkProxyId,
data.cronExpression,data.remoteDownloadTimeout,data.downloadRemoteIndexOnStartup,data.description,
- extraParametersEntries,extraHeadersEntries);
+ extraParametersEntries,extraHeadersEntries,data.checkPath);
}
mapRemoteRepositories=function(data){
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js
index 4085d44..c047c2d 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js
@@ -861,17 +861,19 @@ function(jquery,ui,sammy,tmpl,i18n,jqueryCookie,bootstrap,archivaSearch,jqueryVa
};
addValidationTokenHeader=function(user) {
- if (user.validationToken) {
- $.log("Adding validation token "+user.validationToken);
- $.ajaxSetup({
- beforeSend: function (xhr) {
- xhr.setRequestHeader('X-XSRF-TOKEN', user.validationToken);
- }
- });
- } else {
- $.log("No validation token in user object "+user.username+", "+user.validationToken);
+ if(user) {
+ if (user.validationToken) {
+ $.log("Adding validation token "+user.validationToken);
+ $.ajaxSetup({
+ beforeSend: function (xhr) {
+ xhr.setRequestHeader('X-XSRF-TOKEN', user.validationToken);
+ }
+ });
+ } else {
+ $.log("No validation token in user object "+user.username+", "+user.validationToken);
+ }
}
- }
+ };
startArchivaApplication=function(){
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/repositories.html
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/repositories.html b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/repositories.html
index 3d16cf8..c23158e 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/repositories.html
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/repositories.html
@@ -733,6 +733,20 @@
</div>
</div>
+ <div class="control-group">
+ <label class="control-label" for="checkPath">${$.i18n.prop('remoteRepository.checkPath')}</label>
+
+ <div class="controls">
+ <input type="text" class="input-xxlarge" id="checkPath" name="checkPath"
+ data-bind="value: remoteRepository.checkPath"/>
+ <a class="btn btn-warning btn-mini popover-doc" id="remoteRepository-checkPath-info-button"
+ data-original-title="${$.i18n.prop('remoteRepository.checkPath.help.title')}"
+ data-content="${$.i18n.prop('remoteRepository.checkPath.help.content')}">
+ <i class="icon-question-sign icon-white"></i>
+ </a>
+ </div>
+ </div>
+
<div class="row-fluid">
<div class="control-group span6">
<strong>${$.i18n.prop('remoteRepository.extraParametersEntries')}</strong>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/archiva-web/archiva-webdav/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webdav/pom.xml b/archiva-modules/archiva-web/archiva-webdav/pom.xml
index 6e7bf6f..e396223 100644
--- a/archiva-modules/archiva-web/archiva-webdav/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webdav/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-web</artifactId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>2.2.4-SNAPSHOT</version>
</parent>
<artifactId>archiva-webdav</artifactId>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/archiva-web/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/pom.xml b/archiva-modules/archiva-web/pom.xml
index 99535ff..8f9099e 100644
--- a/archiva-modules/archiva-web/pom.xml
+++ b/archiva-modules/archiva-web/pom.xml
@@ -19,7 +19,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-modules</artifactId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>2.2.4-SNAPSHOT</version>
</parent>
<artifactId>archiva-web</artifactId>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/metadata/metadata-model-maven2/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/metadata/metadata-model-maven2/pom.xml b/archiva-modules/metadata/metadata-model-maven2/pom.xml
index 654230a..b9451f5 100644
--- a/archiva-modules/metadata/metadata-model-maven2/pom.xml
+++ b/archiva-modules/metadata/metadata-model-maven2/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>metadata</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>2.2.4-SNAPSHOT</version>
</parent>
<artifactId>metadata-model-maven2</artifactId>
<packaging>bundle</packaging>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/metadata/metadata-model/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/metadata/metadata-model/pom.xml b/archiva-modules/metadata/metadata-model/pom.xml
index fc04c4e..b674762 100644
--- a/archiva-modules/metadata/metadata-model/pom.xml
+++ b/archiva-modules/metadata/metadata-model/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>metadata</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>2.2.4-SNAPSHOT</version>
</parent>
<artifactId>metadata-model</artifactId>
<packaging>bundle</packaging>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/metadata/metadata-repository-api/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/metadata/metadata-repository-api/pom.xml b/archiva-modules/metadata/metadata-repository-api/pom.xml
index 0b6c062..49974a0 100644
--- a/archiva-modules/metadata/metadata-repository-api/pom.xml
+++ b/archiva-modules/metadata/metadata-repository-api/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>metadata</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>2.2.4-SNAPSHOT</version>
</parent>
<artifactId>metadata-repository-api</artifactId>
<packaging>bundle</packaging>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/metadata/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/metadata/pom.xml b/archiva-modules/metadata/pom.xml
index 29e144b..d15dc46 100644
--- a/archiva-modules/metadata/pom.xml
+++ b/archiva-modules/metadata/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>archiva-modules</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>2.2.4-SNAPSHOT</version>
</parent>
<artifactId>metadata</artifactId>
<name>Archiva :: Metadata</name>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/metadata/test-repository/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/metadata/test-repository/pom.xml b/archiva-modules/metadata/test-repository/pom.xml
index 5bdecb7..78ef855 100644
--- a/archiva-modules/metadata/test-repository/pom.xml
+++ b/archiva-modules/metadata/test-repository/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>metadata</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>2.2.4-SNAPSHOT</version>
</parent>
<artifactId>test-repository</artifactId>
<name>Archiva Metadata :: Repository for Testing</name>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/plugins/audit/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/plugins/audit/pom.xml b/archiva-modules/plugins/audit/pom.xml
index 68b6c74..d7d5a58 100644
--- a/archiva-modules/plugins/audit/pom.xml
+++ b/archiva-modules/plugins/audit/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>plugins</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>2.2.4-SNAPSHOT</version>
</parent>
<artifactId>audit</artifactId>
<packaging>bundle</packaging>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/plugins/generic-metadata-support/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/plugins/generic-metadata-support/pom.xml b/archiva-modules/plugins/generic-metadata-support/pom.xml
index 8b247aa..3a6054c 100644
--- a/archiva-modules/plugins/generic-metadata-support/pom.xml
+++ b/archiva-modules/plugins/generic-metadata-support/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>plugins</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>2.2.4-SNAPSHOT</version>
</parent>
<artifactId>generic-metadata-support</artifactId>
<packaging>bundle</packaging>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/plugins/maven2-repository/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/plugins/maven2-repository/pom.xml b/archiva-modules/plugins/maven2-repository/pom.xml
index eeadf46..8065fd9 100644
--- a/archiva-modules/plugins/maven2-repository/pom.xml
+++ b/archiva-modules/plugins/maven2-repository/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>plugins</artifactId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>2.2.4-SNAPSHOT</version>
</parent>
<artifactId>maven2-repository</artifactId>
<packaging>bundle</packaging>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/plugins/metadata-store-cassandra/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/plugins/metadata-store-cassandra/pom.xml b/archiva-modules/plugins/metadata-store-cassandra/pom.xml
index 0fed096..7333459 100644
--- a/archiva-modules/plugins/metadata-store-cassandra/pom.xml
+++ b/archiva-modules/plugins/metadata-store-cassandra/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>plugins</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>2.2.4-SNAPSHOT</version>
</parent>
<artifactId>metadata-store-cassandra</artifactId>
<packaging>bundle</packaging>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/plugins/metadata-store-file/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/plugins/metadata-store-file/pom.xml b/archiva-modules/plugins/metadata-store-file/pom.xml
index 3b23e9c..9ac964d 100644
--- a/archiva-modules/plugins/metadata-store-file/pom.xml
+++ b/archiva-modules/plugins/metadata-store-file/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>plugins</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>2.2.4-SNAPSHOT</version>
</parent>
<artifactId>metadata-store-file</artifactId>
<packaging>bundle</packaging>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/plugins/metadata-store-jcr/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/plugins/metadata-store-jcr/pom.xml b/archiva-modules/plugins/metadata-store-jcr/pom.xml
index 9f38f6a..f476436 100644
--- a/archiva-modules/plugins/metadata-store-jcr/pom.xml
+++ b/archiva-modules/plugins/metadata-store-jcr/pom.xml
@@ -23,7 +23,7 @@
<parent>
<artifactId>plugins</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>2.2.4-SNAPSHOT</version>
</parent>
<artifactId>metadata-store-jcr</artifactId>
<packaging>bundle</packaging>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/plugins/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/plugins/pom.xml b/archiva-modules/plugins/pom.xml
index 7340757..837dba9 100644
--- a/archiva-modules/plugins/pom.xml
+++ b/archiva-modules/plugins/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>archiva-modules</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>2.2.4-SNAPSHOT</version>
</parent>
<artifactId>plugins</artifactId>
<name>Archiva :: Core Plugins</name>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/plugins/problem-reports/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/plugins/problem-reports/pom.xml b/archiva-modules/plugins/problem-reports/pom.xml
index d11a1ba..989344e 100644
--- a/archiva-modules/plugins/problem-reports/pom.xml
+++ b/archiva-modules/plugins/problem-reports/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>plugins</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>2.2.4-SNAPSHOT</version>
</parent>
<artifactId>problem-reports</artifactId>
<packaging>bundle</packaging>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/plugins/repository-statistics/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/plugins/repository-statistics/pom.xml b/archiva-modules/plugins/repository-statistics/pom.xml
index 3be6cae..dc2f40c 100644
--- a/archiva-modules/plugins/repository-statistics/pom.xml
+++ b/archiva-modules/plugins/repository-statistics/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>plugins</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>2.2.4-SNAPSHOT</version>
</parent>
<artifactId>repository-statistics</artifactId>
<packaging>bundle</packaging>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/plugins/stage-repository-merge/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/plugins/stage-repository-merge/pom.xml b/archiva-modules/plugins/stage-repository-merge/pom.xml
index 8686e2b..3b099e7 100644
--- a/archiva-modules/plugins/stage-repository-merge/pom.xml
+++ b/archiva-modules/plugins/stage-repository-merge/pom.xml
@@ -22,7 +22,7 @@
<parent>
<artifactId>plugins</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>2.2.4-SNAPSHOT</version>
</parent>
<groupId>org.apache.archiva</groupId>
<artifactId>stage-repository-merge</artifactId>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/archiva-modules/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/pom.xml b/archiva-modules/pom.xml
index ecf5809..a16b3eb 100644
--- a/archiva-modules/pom.xml
+++ b/archiva-modules/pom.xml
@@ -21,7 +21,7 @@
<parent>
<artifactId>archiva</artifactId>
<groupId>org.apache.archiva</groupId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>2.2.4-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archiva-modules</artifactId>
@@ -98,7 +98,7 @@
<inherited>false</inherited>
<configuration>
<notimestamp>true</notimestamp>
- <source>1.5</source>
+ <source>1.7</source>
<links>
<link>http://java.sun.com/j2se/1.5.0/docs/api</link>
<link>http://commons.apache.org/collections/apidocs-COLLECTIONS_3_0/</link>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 554c35e..8063b48 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,11 +23,11 @@
<parent>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-parent</artifactId>
- <version>18-SNAPSHOT</version>
+ <version>18</version>
</parent>
<artifactId>archiva</artifactId>
- <version>2.2.3-SNAPSHOT</version>
+ <version>2.2.4-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Apache Archiva</name>
@@ -61,7 +61,7 @@
<maven-model-converter.version>2.1</maven-model-converter.version>
<maven.indexer.version>5.1.1</maven.indexer.version>
<wagon.version>2.9</wagon.version>
- <redback.version>2.6-SNAPSHOT</redback.version>
+ <redback.version>2.6</redback.version>
<redback.cache.version>2.2</redback.cache.version>
<redback.quartz.version>2.1</redback.quartz.version>
<redback.registry.version>2.4</redback.registry.version>
http://git-wip-us.apache.org/repos/asf/archiva/blob/c6f5732a/src/ci/scripts/cleanup.bat
----------------------------------------------------------------------
diff --git a/src/ci/scripts/cleanup.bat b/src/ci/scripts/cleanup.bat
index fdb09df..bcfdd2a 100644
--- a/src/ci/scripts/cleanup.bat
+++ b/src/ci/scripts/cleanup.bat
@@ -1,4 +1,21 @@
@echo off
+REM Licensed to the Apache Software Foundation (ASF) under one
+REM or more contributor license agreements. See the NOTICE file
+REM distributed with this work for additional information
+REM regarding copyright ownership. The ASF licenses this file
+REM to you under the Apache License, Version 2.0 (the
+REM "License"); you may not use this file except in compliance
+REM with the License. You may obtain a copy of the License at
+REM
+REM http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing,
+REM software distributed under the License is distributed on an
+REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+REM KIND, either express or implied. See the License for the
+REM specific language governing permissions and limitations
+REM under the License.
+
SET runpath=%~dp0
PowerShell.exe -NonInteractive -ExecutionPolicy bypass -File %runpath%cleanup.ps1 %*