diff options
author | Martin Stockhammer <martin_s@apache.org> | 2021-06-27 11:35:23 +0200 |
---|---|---|
committer | Martin Stockhammer <martin_s@apache.org> | 2021-06-27 11:35:23 +0200 |
commit | e8a70027d8342f78272b471aa0ac963c0a6f89be (patch) | |
tree | 26ff0e859616e117d65103ebbea11ddf50b43c87 /archiva-modules/archiva-base/archiva-configuration | |
parent | a1b92c562fae957e601875e50f87a3ff93fecfd6 (diff) | |
download | archiva-e8a70027d8342f78272b471aa0ac963c0a6f89be.tar.gz archiva-e8a70027d8342f78272b471aa0ac963c0a6f89be.zip |
Changing repository group handling
Diffstat (limited to 'archiva-modules/archiva-base/archiva-configuration')
3 files changed, 31 insertions, 0 deletions
diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/RepositoryGroupConfiguration.java b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/RepositoryGroupConfiguration.java index cf518951c..d0dc381e4 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/RepositoryGroupConfiguration.java +++ b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/RepositoryGroupConfiguration.java @@ -78,11 +78,37 @@ public class RepositoryGroupConfiguration */ private List<String> repositories; + /** + * The path for local data + */ + private String location; + //-----------/ //- Methods -/ //-----------/ + + /** + * Return the local path for group data. If the merged index property is set to a non absolute path, + * it is relative to this location. + * + * @return the path for group data storage + */ + public String getLocation( ) + { + return location; + } + + /** + * Set the local path for group data + * @param location + */ + public void setLocation( String location ) + { + this.location = location; + } + /** * Method addRepository. * diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/io/registry/ConfigurationRegistryReader.java b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/io/registry/ConfigurationRegistryReader.java index f3f0f2ea7..27146f5e6 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/io/registry/ConfigurationRegistryReader.java +++ b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/io/registry/ConfigurationRegistryReader.java @@ -753,6 +753,8 @@ public class ConfigurationRegistryReader { value.setMergedIndexTtl(mergedIndexTtl); //String cronExpression = registry.getString( prefix + "cronExpression", value.getCronExpression() ); + value.setLocation( registry.getString( prefix + "location" ) ); + List<String> cronExpressionList = registry.getList(prefix + "cronExpression"); String cronExpression = value.getCronExpression(); if (cronExpressionList != null && !cronExpressionList.isEmpty()) { diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/io/registry/ConfigurationRegistryWriter.java b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/io/registry/ConfigurationRegistryWriter.java index 2cbd387b6..83202f531 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/io/registry/ConfigurationRegistryWriter.java +++ b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/io/registry/ConfigurationRegistryWriter.java @@ -425,6 +425,9 @@ public class ConfigurationRegistryWriter { if (value.getType() != null) { registry.setString(prefix + "type", value.getType()); } + if (value.getLocation()!=null) { + registry.setString( prefix+"location", value.getType( ) ); + } if (value.getMergedIndexPath() != null && !value.getMergedIndexPath().equals(".indexer") ) { String mergedIndexPath = "mergedIndexPath"; |