aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-configuration
diff options
context:
space:
mode:
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/DefaultArchivaConfiguration.java12
-rw-r--r--archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/MavenProxyPropertyLoader.java4
2 files changed, 8 insertions, 8 deletions
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 fb940af02..b8b78d3b1 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
@@ -323,19 +323,19 @@ public class DefaultArchivaConfiguration
// Upgrade old policy settings.
if ("releases".equals(policyId) || "snapshots".equals(policyId)) {
if ("ignored".equals(setting)) {
- setting = AbstractUpdatePolicy.ALWAYS;
+ setting = AbstractUpdatePolicy.ALWAYS.getId();
} else if ("disabled".equals(setting)) {
- setting = AbstractUpdatePolicy.NEVER;
+ setting = AbstractUpdatePolicy.NEVER.getId();
}
} else if ("cache-failures".equals(policyId)) {
if ("ignored".equals(setting)) {
- setting = CachedFailuresPolicy.NO;
+ setting = CachedFailuresPolicy.NO.getId();
} else if ("cached".equals(setting)) {
- setting = CachedFailuresPolicy.YES;
+ setting = CachedFailuresPolicy.YES.getId();
}
} else if ("checksum".equals(policyId)) {
if ("ignored".equals(setting)) {
- setting = ChecksumPolicy.IGNORE;
+ setting = ChecksumPolicy.IGNORE.getId();
}
}
@@ -344,7 +344,7 @@ public class DefaultArchivaConfiguration
Policy policy = findPolicy(policyId);
// Does option exist?
if (!policy.getOptions().contains(setting)) {
- setting = policy.getDefaultOption();
+ setting = policy.getDefaultOption().getId();
}
connector.addPolicy(policyId, setting);
} else {
diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/MavenProxyPropertyLoader.java b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/MavenProxyPropertyLoader.java
index 5f9de1910..20e3f34cf 100644
--- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/MavenProxyPropertyLoader.java
+++ b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/MavenProxyPropertyLoader.java
@@ -104,8 +104,8 @@ public class MavenProxyPropertyLoader
proxyConnector.setTargetRepoId( key );
proxyConnector.setProxyId( proxyKey );
// TODO: convert cachePeriod to closest "daily" or "hourly"
- proxyConnector.addPolicy( ProxyConnectorConfiguration.POLICY_SNAPSHOTS, SnapshotsPolicy.DAILY );
- proxyConnector.addPolicy( ProxyConnectorConfiguration.POLICY_RELEASES, ReleasesPolicy.ALWAYS );
+ proxyConnector.addPolicy( ProxyConnectorConfiguration.POLICY_SNAPSHOTS, SnapshotsPolicy.DAILY.getId() );
+ proxyConnector.addPolicy( ProxyConnectorConfiguration.POLICY_RELEASES, ReleasesPolicy.ALWAYS.getId() );
configuration.addProxyConnector( proxyConnector );
}