aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--archiva-modules/archiva-base/archiva-configuration/pom.xml10
-rw-r--r--archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java15
-rw-r--r--archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/FileTypes.java44
-rwxr-xr-xarchiva-modules/archiva-base/archiva-configuration/src/test/resources/spring-context.xml30
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/META-INF/spring-context.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-cleanup-released-snapshots.xml4
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-purge-consumer-test.xml6
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/resources/spring-context.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/spring-context.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/base/MetadataTools.java11
-rw-r--r--archiva-modules/archiva-base/archiva-repository-layer/src/test/resources/spring-context.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-repository-scanner/src/test/resources/spring-context.xml2
-rw-r--r--archiva-modules/archiva-maven/archiva-maven-proxy/src/main/java/org/apache/archiva/proxy/maven/MavenRepositoryProxyHandler.java4
-rw-r--r--archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/conf/MockConfiguration.java16
-rw-r--r--archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/spring-context-repo-request-test.xml2
-rw-r--r--archiva-modules/archiva-maven/archiva-maven-scheduler/src/test/resources/spring-context.xml2
-rwxr-xr-xarchiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/resources/spring-context.xml2
-rw-r--r--archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml4
-rw-r--r--archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml2
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-artifacts-download.xml2
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-merge-index-download.xml2
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-rss-servlet.xml2
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-common.xml2
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-upload.xml2
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/pom.xml4
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml2
-rw-r--r--archiva-modules/archiva-web/archiva-webdav/src/test/resources/repository-servlet-simple.xml2
-rw-r--r--archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context-servlet-security-test.xml2
-rw-r--r--archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context.xml2
-rw-r--r--pom.xml11
31 files changed, 95 insertions, 102 deletions
diff --git a/archiva-modules/archiva-base/archiva-configuration/pom.xml b/archiva-modules/archiva-base/archiva-configuration/pom.xml
index 497e0992e..7c855a0d0 100644
--- a/archiva-modules/archiva-base/archiva-configuration/pom.xml
+++ b/archiva-modules/archiva-base/archiva-configuration/pom.xml
@@ -76,8 +76,8 @@
<artifactId>archiva-components-expression-evaluator</artifactId>
</dependency>
<dependency>
- <groupId>commons-configuration</groupId>
- <artifactId>commons-configuration</artifactId>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-configuration2</artifactId>
<exclusions>
<exclusion>
<groupId>commons-beanutils</groupId>
@@ -145,9 +145,13 @@
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
- <scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-text</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.apache.archiva</groupId>
<artifactId>archiva-test-utils</artifactId>
<version>${project.version}</version>
diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java
index b45fb5a59..97777d051 100644
--- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java
+++ b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java
@@ -35,7 +35,6 @@ import org.apache.archiva.components.registry.RegistryListener;
import org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.ListUtils;
-import org.apache.commons.configuration.BaseConfiguration;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
@@ -522,7 +521,7 @@ public class DefaultArchivaConfiguration
contents = "<configuration><xml fileName=\"" + fileLocation
+ "\" config-forceCreate=\"true\" config-name=\"org.apache.archiva.user\"/>" + "</configuration>";
- ((CommonsConfigurationRegistry) registry).setProperties(contents);
+ ((CommonsConfigurationRegistry) registry).setInitialConfiguration(contents);
registry.initialize();
@@ -533,7 +532,11 @@ public class DefaultArchivaConfiguration
triggerEvent(ConfigurationEvent.SAVED);
Registry section = registry.getSection(KEY + ".user");
- return section == null ? new CommonsConfigurationRegistry(new BaseConfiguration()) : section;
+ if (section == null) {
+ return new CommonsConfigurationRegistry( );
+ } else {
+ return section;
+ }
}
private boolean writeFile(String filetype, String path, String contents) {
@@ -796,9 +799,9 @@ public class DefaultArchivaConfiguration
@Override
public synchronized void afterConfigurationChange(Registry registry, String propertyName, Object propertyValue) {
- configuration = null;
- this.dataDirectory = null;
- this.repositoryBaseDirectory = null;
+ // configuration = null;
+ // this.dataDirectory = null;
+ // this.repositoryBaseDirectory = null;
}
private String removeExpressions(String directory) {
diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/FileTypes.java b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/FileTypes.java
index 428255371..23ffb9361 100644
--- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/FileTypes.java
+++ b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/FileTypes.java
@@ -30,7 +30,6 @@ import org.apache.archiva.components.registry.commons.CommonsConfigurationRegist
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.IterableUtils;
import org.apache.commons.collections4.Predicate;
-import org.apache.commons.configuration.CombinedConfiguration;
import org.springframework.stereotype.Service;
import javax.annotation.PostConstruct;
@@ -169,48 +168,7 @@ public class FileTypes
@PostConstruct
public void initialize()
{
- // TODO: why is this done by hand?
-
- // TODO: ideally, this would be instantiated by configuration instead, and not need to be a component
-
- String errMsg = "Unable to load default archiva configuration for FileTypes: ";
-
- try
- {
- CommonsConfigurationRegistry commonsRegistry = new CommonsConfigurationRegistry();
-
- // Configure commonsRegistry
- Field fld = commonsRegistry.getClass().getDeclaredField( "configuration" );
- fld.setAccessible( true );
- fld.set( commonsRegistry, new CombinedConfiguration() );
- commonsRegistry.addConfigurationFromResource( "org/apache/archiva/configuration/default-archiva.xml" );
-
- // Read configuration as it was intended.
- ConfigurationRegistryReader configReader = new ConfigurationRegistryReader();
- Configuration defaultConfig = configReader.read( commonsRegistry );
-
- initialiseTypeMap( defaultConfig );
- }
- catch ( RegistryException e )
- {
- throw new RuntimeException( errMsg + e.getMessage(), e );
- }
- catch ( SecurityException e )
- {
- throw new RuntimeException( errMsg + e.getMessage(), e );
- }
- catch ( NoSuchFieldException e )
- {
- throw new RuntimeException( errMsg + e.getMessage(), e );
- }
- catch ( IllegalArgumentException e )
- {
- throw new RuntimeException( errMsg + e.getMessage(), e );
- }
- catch ( IllegalAccessException e )
- {
- throw new RuntimeException( errMsg + e.getMessage(), e );
- }
+ initialiseTypeMap( this.archivaConfiguration.getConfiguration() );
this.archivaConfiguration.addChangeListener( this );
}
diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/resources/spring-context.xml b/archiva-modules/archiva-base/archiva-configuration/src/test/resources/spring-context.xml
index a3e057945..46b2f71d8 100755
--- a/archiva-modules/archiva-base/archiva-configuration/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-base/archiva-configuration/src/test/resources/spring-context.xml
@@ -46,7 +46,7 @@
<bean name="registry#test-upgrade-09" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
@@ -63,7 +63,7 @@
</bean>
<bean name="registry#test-upgrade-1.3" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
@@ -80,7 +80,7 @@
</bean>
<bean name="registry#configured" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
@@ -99,7 +99,7 @@
</bean>
<bean name="registry#test-autodetect-v1" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
@@ -118,7 +118,7 @@
</bean>
<bean name="registry#test-archiva-v1" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
@@ -136,7 +136,7 @@
</bean>
<bean name="registry#test-save" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
@@ -153,7 +153,7 @@
</bean>
<bean name="registry#test-save-user-defaults" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
@@ -172,7 +172,7 @@
</bean>
<bean name="registry#test-save-user-fallback" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
@@ -191,7 +191,7 @@
</bean>
<bean name="registry#test-save-user" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
@@ -211,7 +211,7 @@
</bean>
<bean name="registry#test-configuration-both" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
@@ -231,7 +231,7 @@
</bean>
<bean name="registry#test-read-saved" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
@@ -250,7 +250,7 @@
</bean>
<bean name="registry#test-cron-expressions" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
@@ -268,7 +268,7 @@
</bean>
<bean name="registry#test-remove-central" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
@@ -288,7 +288,7 @@
</bean>
<bean name="registry#test-not-allowed-to-write-to-both" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
@@ -309,7 +309,7 @@
</bean>
<bean name="registry#test-not-allowed-to-write-to-user" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/META-INF/spring-context.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/META-INF/spring-context.xml
index 599643a30..69f657e52 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/META-INF/spring-context.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/META-INF/spring-context.xml
@@ -36,7 +36,7 @@
</bean>
<bean name="commons-configuration" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-cleanup-released-snapshots.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-cleanup-released-snapshots.xml
index 9a4fa2c83..5af14344f 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-cleanup-released-snapshots.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-cleanup-released-snapshots.xml
@@ -38,7 +38,7 @@
<bean name="registry#cleanup-released-snapshots" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
@@ -55,7 +55,7 @@
</bean>
<bean name="commons-configuration" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-purge-consumer-test.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-purge-consumer-test.xml
index babb15ebb..00b9a6a41 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-purge-consumer-test.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-purge-consumer-test.xml
@@ -50,7 +50,7 @@
</bean>
<bean name="registry#retention-count" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
@@ -84,7 +84,7 @@
</bean>
<bean name="registry#days-old" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
@@ -101,7 +101,7 @@
</bean>
<bean name="commons-configuration" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context.xml
index 0e4ffd8ba..b342fe414 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context.xml
@@ -30,7 +30,7 @@
<context:component-scan base-package="org.apache.archiva.metadata.repository"/>
<bean name="commons-configuration" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/resources/spring-context.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/resources/spring-context.xml
index 30e73d05f..8fb55e1b1 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/resources/spring-context.xml
@@ -31,7 +31,7 @@
<context:component-scan base-package="org.apache.archiva.consumers.lucene.test,org.apache.maven.index"/>
<bean name="commons-configuration" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/spring-context.xml b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/spring-context.xml
index f2ec06ab8..aaef0ac3e 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/spring-context.xml
@@ -46,7 +46,7 @@
</bean>
<bean name="commons-configuration" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/base/MetadataTools.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/base/MetadataTools.java
index 8b321c764..53786b1f3 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/base/MetadataTools.java
+++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/metadata/base/MetadataTools.java
@@ -25,6 +25,8 @@ import org.apache.archiva.common.utils.PathUtil;
import org.apache.archiva.common.utils.VersionComparator;
import org.apache.archiva.common.utils.VersionUtil;
import org.apache.archiva.configuration.ArchivaConfiguration;
+import org.apache.archiva.configuration.ConfigurationEvent;
+import org.apache.archiva.configuration.ConfigurationListener;
import org.apache.archiva.configuration.ConfigurationNames;
import org.apache.archiva.configuration.FileTypes;
import org.apache.archiva.configuration.ProxyConnectorConfiguration;
@@ -71,7 +73,7 @@ import java.util.stream.Stream;
*/
@Service( "metadataTools#default" )
public class MetadataTools
- implements RegistryListener
+ implements RegistryListener, ConfigurationListener
{
private Logger log = LoggerFactory.getLogger( getClass() );
@@ -351,6 +353,7 @@ public class MetadataTools
initConfigVariables();
configuration.addChangeListener( this );
+ configuration.addListener( this );
}
public ArchivaRepositoryMetadata readProxyMetadata( ManagedRepositoryContent managedRepository,
@@ -979,4 +982,10 @@ public class MetadataTools
{
this.filetypes = filetypes;
}
+
+ @Override
+ public void configurationEvent( ConfigurationEvent event )
+ {
+ log.debug( "Configuration event {}", event );
+ }
}
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/test/resources/spring-context.xml b/archiva-modules/archiva-base/archiva-repository-layer/src/test/resources/spring-context.xml
index 5c100d2c0..e83214774 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-base/archiva-repository-layer/src/test/resources/spring-context.xml
@@ -32,7 +32,7 @@
<bean name="commons-configuration" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/resources/spring-context.xml b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/resources/spring-context.xml
index be7ef6558..219f7144a 100644
--- a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/resources/spring-context.xml
@@ -33,7 +33,7 @@
</bean>
<bean name="registry#configured" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
diff --git a/archiva-modules/archiva-maven/archiva-maven-proxy/src/main/java/org/apache/archiva/proxy/maven/MavenRepositoryProxyHandler.java b/archiva-modules/archiva-maven/archiva-maven-proxy/src/main/java/org/apache/archiva/proxy/maven/MavenRepositoryProxyHandler.java
index f46d1401c..039ca0376 100644
--- a/archiva-modules/archiva-maven/archiva-maven-proxy/src/main/java/org/apache/archiva/proxy/maven/MavenRepositoryProxyHandler.java
+++ b/archiva-modules/archiva-maven/archiva-maven-proxy/src/main/java/org/apache/archiva/proxy/maven/MavenRepositoryProxyHandler.java
@@ -39,6 +39,8 @@ import org.apache.maven.wagon.authentication.AuthenticationException;
import org.apache.maven.wagon.authentication.AuthenticationInfo;
import org.apache.maven.wagon.proxy.ProxyInfo;
import org.apache.maven.wagon.repository.Repository;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import javax.inject.Inject;
@@ -59,6 +61,8 @@ import java.util.concurrent.ConcurrentMap;
@Service( "repositoryProxyHandler#maven" )
public class MavenRepositoryProxyHandler extends DefaultRepositoryProxyHandler {
+ private static final Logger log = LoggerFactory.getLogger( MavenRepositoryProxyHandler.class );
+
private static final List<RepositoryType> REPOSITORY_TYPES = new ArrayList<>();
static {
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/conf/MockConfiguration.java b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/conf/MockConfiguration.java
index 2cd0db66d..3da6bfb02 100644
--- a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/conf/MockConfiguration.java
+++ b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/java/org/apache/archiva/metadata/repository/storage/maven2/conf/MockConfiguration.java
@@ -26,12 +26,15 @@ import org.apache.archiva.configuration.ConfigurationListener;
import org.apache.archiva.components.registry.Registry;
import org.apache.archiva.components.registry.RegistryException;
import org.apache.archiva.components.registry.RegistryListener;
+import org.apache.archiva.configuration.FileType;
+import org.apache.archiva.configuration.RepositoryScanningConfiguration;
import org.apache.commons.lang3.StringUtils;
import org.easymock.IMocksControl;
import org.springframework.stereotype.Service;
import java.nio.file.Path;
import java.nio.file.Paths;
+import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
@@ -66,6 +69,19 @@ public class MockConfiguration
configuration.getArchivaRuntimeConfiguration().addChecksumType("sha1");
configuration.getArchivaRuntimeConfiguration().addChecksumType("sha256");
configuration.getArchivaRuntimeConfiguration().addChecksumType("md5");
+ RepositoryScanningConfiguration rpsc = new RepositoryScanningConfiguration( );
+ FileType ft = new FileType( );
+ ft.setId( "artifacts" );
+ ArrayList<String> plist = new ArrayList<>( );
+ plist.add( "**/*.jar" );
+ plist.add( "**/*.pom" );
+ plist.add( "**/*.war" );
+ ft.setPatterns( plist );
+ rpsc.addFileType( ft );
+ ArrayList<FileType> ftList = new ArrayList<>( );
+ ftList.add( ft );
+ rpsc.setFileTypes( ftList );
+ configuration.setRepositoryScanning( rpsc );
}
@Override
diff --git a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/spring-context-repo-request-test.xml b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/spring-context-repo-request-test.xml
index 8b7e4fa29..3374e6bca 100644
--- a/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/spring-context-repo-request-test.xml
+++ b/archiva-modules/archiva-maven/archiva-maven-repository/src/test/resources/spring-context-repo-request-test.xml
@@ -36,7 +36,7 @@
<alias name="archivaConfiguration#repo-request-test" alias="archivaConfiguration"/>
<bean name="registry#configured" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
diff --git a/archiva-modules/archiva-maven/archiva-maven-scheduler/src/test/resources/spring-context.xml b/archiva-modules/archiva-maven/archiva-maven-scheduler/src/test/resources/spring-context.xml
index 521f8718f..2f4fedacd 100644
--- a/archiva-modules/archiva-maven/archiva-maven-scheduler/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-maven/archiva-maven-scheduler/src/test/resources/spring-context.xml
@@ -48,7 +48,7 @@
<alias name="archivaConfiguration#default" alias="archivaConfiguration"/>
<bean name="registry#default" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/resources/spring-context.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/resources/spring-context.xml
index 8030e079e..79dff8fdd 100755
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/resources/spring-context.xml
@@ -56,7 +56,7 @@
</bean>
<bean name="registry#test-configured" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml
index e2854e562..079c80c7a 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml
@@ -54,7 +54,7 @@
<alias name="archivaConfiguration#default" alias="archivaConfiguration"/>
<bean name="registry#default" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
@@ -88,7 +88,7 @@
<bean name="commons-configuration" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry"
init-method="initialize">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
diff --git a/archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml b/archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml
index 67e2f8bfe..c15570001 100644
--- a/archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml
@@ -87,7 +87,7 @@
<alias name="commons-configuration" alias="registry#test"/>
<bean name="commons-configuration" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-artifacts-download.xml b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-artifacts-download.xml
index bc162f9dd..d35643f91 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-artifacts-download.xml
+++ b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-artifacts-download.xml
@@ -31,7 +31,7 @@
<context:property-placeholder system-properties-mode="OVERRIDE"/>
<bean name="commons-configuration" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-merge-index-download.xml b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-merge-index-download.xml
index 8768f43bd..05b289ca0 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-merge-index-download.xml
+++ b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-merge-index-download.xml
@@ -32,7 +32,7 @@
<bean name="commons-configuration" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-rss-servlet.xml b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-rss-servlet.xml
index 7ea76e797..944f854eb 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-rss-servlet.xml
+++ b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-rss-servlet.xml
@@ -56,7 +56,7 @@
</bean>
<bean name="registry#default" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-common.xml b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-common.xml
index 3733a90ac..97c30caa8 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-common.xml
+++ b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-common.xml
@@ -51,7 +51,7 @@
<alias name="archivaConfiguration#default" alias="archivaConfiguration"/>
<bean name="registry#default" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-upload.xml b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-upload.xml
index e9d9a81fe..8bfa44d56 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-upload.xml
+++ b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-upload.xml
@@ -53,7 +53,7 @@
<alias name="archivaConfiguration#default" alias="archivaConfiguration"/>
<bean name="registry#default" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
diff --git a/archiva-modules/archiva-web/archiva-webapp/pom.xml b/archiva-modules/archiva-web/archiva-webapp/pom.xml
index a8629e875..628996f31 100644
--- a/archiva-modules/archiva-web/archiva-webapp/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webapp/pom.xml
@@ -132,8 +132,8 @@
</dependency>
<dependency>
- <groupId>commons-configuration</groupId>
- <artifactId>commons-configuration</artifactId>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-configuration2</artifactId>
<exclusions>
<exclusion>
<groupId>commons-beanutils</groupId>
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml
index 3699f53ef..62bb38764 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml
@@ -71,7 +71,7 @@
<!-- START SNIPPET: configuration-files-list -->
<bean name="commons-configuration" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry"
init-method="initialize">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/resources/repository-servlet-simple.xml b/archiva-modules/archiva-web/archiva-webdav/src/test/resources/repository-servlet-simple.xml
index abcab4b5c..59545f71a 100644
--- a/archiva-modules/archiva-web/archiva-webdav/src/test/resources/repository-servlet-simple.xml
+++ b/archiva-modules/archiva-web/archiva-webdav/src/test/resources/repository-servlet-simple.xml
@@ -38,7 +38,7 @@
<alias name="archivaConfiguration#default" alias="archivaConfiguration"/>
<bean name="registry#default" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context-servlet-security-test.xml b/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context-servlet-security-test.xml
index ab8c88aa1..dbe40f9c1 100644
--- a/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context-servlet-security-test.xml
+++ b/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context-servlet-security-test.xml
@@ -54,7 +54,7 @@
<alias name="archivaConfiguration#default" alias="archivaConfiguration"/>
<bean name="registry#default" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context.xml b/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context.xml
index 6ff00c8b2..795b56c88 100644
--- a/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context.xml
@@ -53,7 +53,7 @@
<alias name="archivaConfiguration#default" alias="archivaConfiguration"/>
<bean name="registry#default" class="org.apache.archiva.components.registry.commons.CommonsConfigurationRegistry">
- <property name="properties">
+ <property name="initialConfiguration">
<value>
<![CDATA[
<configuration>
diff --git a/pom.xml b/pom.xml
index 407393089..01e1533bb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -53,7 +53,6 @@
<commons-fileupload.version>1.4</commons-fileupload.version>
<commons-io.version>2.6</commons-io.version>
<commons-lang.version>3.9</commons-lang.version>
- <commons-text.version>1.7</commons-text.version>
<maven3x.version>3.5.4</maven3x.version>
<maven.resolver.version>1.1.1</maven.resolver.version>
@@ -690,8 +689,8 @@
<version>${commons-codec.version}</version>
</dependency>
<dependency>
- <groupId>commons-configuration</groupId>
- <artifactId>commons-configuration</artifactId>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-configuration2</artifactId>
<version>${commons.configuration.version}</version>
<exclusions>
<exclusion>
@@ -731,7 +730,7 @@
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
- <version>1.8.3</version>
+ <version>${commons-beanutils.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@@ -757,12 +756,12 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
- <version>${commons-lang.version}</version>
+ <version>${commons.lang3.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
- <version>${commons-text.version}</version>
+ <version>${commons.text.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>