aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-configuration
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2019-06-06 21:36:46 +0200
committerMartin Stockhammer <martin_s@apache.org>2019-06-06 21:36:46 +0200
commitc2bbd80b1b728fb6e7bff05d6fe2123c8b0f6122 (patch)
tree1227739dbb9f7975c825687b4763c97ccd4f1c6c /archiva-modules/archiva-base/archiva-configuration
parent6c0afa8b8f2210fa32644cf17a8fa004a98719db (diff)
downloadarchiva-c2bbd80b1b728fb6e7bff05d6fe2123c8b0f6122.tar.gz
archiva-c2bbd80b1b728fb6e7bff05d6fe2123c8b0f6122.zip
Adding type for repository group config
Diffstat (limited to 'archiva-modules/archiva-base/archiva-configuration')
-rw-r--r--archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/RepositoryGroupConfiguration.java17
-rw-r--r--archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/io/registry/ConfigurationRegistryReader.java1
-rw-r--r--archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/io/registry/ConfigurationRegistryWriter.java3
3 files changed, 21 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 d2cc9cb27..db3498be3 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
@@ -48,6 +48,15 @@ public class RepositoryGroupConfiguration
private String name;
/**
+ *
+ * The repository type. Currently only MAVEN type
+ * is known.
+ *
+ */
+ private String type = "MAVEN";
+
+
+ /**
* The path of the merged index.
*/
private String mergedIndexPath = ".indexer";
@@ -211,4 +220,12 @@ public class RepositoryGroupConfiguration
public void setName(String name) {
this.name = name;
}
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
}
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 7c0535e8b..8c0ff5d56 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
@@ -731,6 +731,7 @@ public class ConfigurationRegistryReader {
value.setId(id);
value.setName(registry.getString(prefix + "name"));
+ value.setType(registry.getString(prefix + "type"));
//String mergedIndexPath = registry.getString( prefix + "mergedIndexPath", value.getMergedIndexPath() );
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 915cd8b8e..786b027a9 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
@@ -422,6 +422,9 @@ public class ConfigurationRegistryWriter {
if (value.getName() != null) {
registry.setString(prefix + "name", value.getName());
}
+ if (value.getType() != null) {
+ registry.setString(prefix + "type", value.getType());
+ }
if (value.getMergedIndexPath() != null && !value.getMergedIndexPath().equals(".indexer")
) {
String mergedIndexPath = "mergedIndexPath";