aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorolivier lamy <olamy@apache.org>2016-10-05 14:30:52 +1100
committerolivier lamy <olamy@apache.org>2016-10-05 14:30:52 +1100
commit70323bbefbc70103cfe58deeb0816c2e961d2d78 (patch)
tree4e6ccbb7ff5f5c1ca319653476561bb9823f13f6 /archiva-modules
parent1fd9c951e19a30f7636f4a924cb9e2bf06af2861 (diff)
parent723cf8b2ee8302edc28e2ee8b5eead4750fd50e3 (diff)
downloadarchiva-70323bbefbc70103cfe58deeb0816c2e961d2d78.tar.gz
archiva-70323bbefbc70103cfe58deeb0816c2e961d2d78.zip
Merge branch 'pr/27'
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/archiva/configuration/DefaultArchivaConfiguration.java67
1 files changed, 36 insertions, 31 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 665c80ab2..f37171afa 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
@@ -489,45 +489,50 @@ public class DefaultArchivaConfiguration
escapeCronExpressions( configuration );
// [MRM-661] Due to a bug in the modello registry writer, we need to take these out by hand. They'll be put back by the writer.
- if ( configuration.getManagedRepositories().isEmpty() && section != null )
- {
- section.removeSubset( "managedRepositories" );
- }
- if ( configuration.getRemoteRepositories().isEmpty() && section != null )
+ if ( section != null )
{
- section.removeSubset( "remoteRepositories" );
+ if ( configuration.getManagedRepositories().isEmpty() )
+ {
+ section.removeSubset( "managedRepositories" );
+ }
+ if ( configuration.getRemoteRepositories().isEmpty() )
+ {
+ section.removeSubset( "remoteRepositories" );
- }
- if ( configuration.getProxyConnectors().isEmpty() && section != null )
- {
- section.removeSubset( "proxyConnectors" );
- }
- if ( configuration.getNetworkProxies().isEmpty() && section != null )
- {
- section.removeSubset( "networkProxies" );
- }
- if ( configuration.getLegacyArtifactPaths().isEmpty() && section != null )
- {
- section.removeSubset( "legacyArtifactPaths" );
- }
- if ( configuration.getRepositoryGroups().isEmpty() && section != null )
- {
- section.removeSubset( "repositoryGroups" );
- }
- if ( configuration.getRepositoryScanning() != null )
- {
- if ( configuration.getRepositoryScanning().getKnownContentConsumers().isEmpty() && section != null )
+ }
+ if ( configuration.getProxyConnectors().isEmpty() )
+ {
+ section.removeSubset( "proxyConnectors" );
+ }
+ if ( configuration.getNetworkProxies().isEmpty() )
+ {
+ section.removeSubset( "networkProxies" );
+ }
+ if ( configuration.getLegacyArtifactPaths().isEmpty() )
+ {
+ section.removeSubset( "legacyArtifactPaths" );
+ }
+ if ( configuration.getRepositoryGroups().isEmpty() )
{
- section.removeSubset( "repositoryScanning.knownContentConsumers" );
+ section.removeSubset( "repositoryGroups" );
}
- if ( configuration.getRepositoryScanning().getInvalidContentConsumers().isEmpty() && section != null )
+ if ( configuration.getRepositoryScanning() != null )
{
- section.removeSubset( "repositoryScanning.invalidContentConsumers" );
+ if ( configuration.getRepositoryScanning().getKnownContentConsumers().isEmpty() )
+ {
+ section.removeSubset( "repositoryScanning.knownContentConsumers" );
+ }
+ if ( configuration.getRepositoryScanning().getInvalidContentConsumers().isEmpty() )
+ {
+ section.removeSubset( "repositoryScanning.invalidContentConsumers" );
+ }
}
+
+ new ConfigurationRegistryWriter().write( configuration, section );
+ section.save();
}
- new ConfigurationRegistryWriter().write( configuration, section );
- section.save();
+
this.configuration = unescapeExpressions( configuration );