]> source.dussan.org Git - archiva.git/commitdiff
package move to o.a.a.r module redback-configuration
authorOlivier Lamy <olamy@apache.org>
Sat, 7 Apr 2012 21:36:01 +0000 (21:36 +0000)
committerOlivier Lamy <olamy@apache.org>
Sat, 7 Apr 2012 21:36:01 +0000 (21:36 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1310877 13f79535-47bb-0310-9956-ffa450edef68

39 files changed:
redback-authentication/redback-authentication-providers/redback-authentication-ldap/src/main/java/org/apache/archiva/redback/authentication/ldap/LdapBindAuthenticator.java
redback-authentication/redback-authentication-providers/redback-authentication-ldap/src/test/resources/META-INF/spring-context.xml
redback-common/redback-common-jdo/src/main/java/org/apache/archiva/redback/common/jdo/UserConfigurableJdoFactory.java
redback-common/redback-common-ldap/src/main/java/org/apache/archiva/redback/common/ldap/LdapUserMapper.java
redback-common/redback-common-ldap/src/main/java/org/apache/archiva/redback/common/ldap/connection/ConfigurableLdapConnectionFactory.java
redback-common/redback-common-ldap/src/test/resources/spring-context.xml
redback-configuration/src/main/java/org/apache/archiva/redback/configuration/UserConfiguration.java [new file with mode: 0644]
redback-configuration/src/main/java/org/codehaus/plexus/redback/configuration/UserConfiguration.java [deleted file]
redback-configuration/src/main/resources/META-INF/spring-context.xml
redback-configuration/src/main/resources/org/apache/archiva/redback/config-defaults.properties [new file with mode: 0644]
redback-configuration/src/main/resources/org/codehaus/plexus/redback/config-defaults.properties [deleted file]
redback-configuration/src/test/java/org/codehaus/plexus/redback/configuration/UserConfigurationTest.java
redback-configuration/src/test/resources/META-INF/spring-context.xml
redback-integrations/redback-common-integrations/src/main/java/org/codehaus/redback/integration/checks/security/AdminAutoCreateCheck.java
redback-integrations/redback-common-integrations/src/main/java/org/codehaus/redback/integration/mail/MailerImpl.java
redback-integrations/redback-common-integrations/src/main/java/org/codehaus/redback/integration/mail/VelocityMailGenerator.java
redback-integrations/redback-common-integrations/src/main/java/org/codehaus/redback/integration/taglib/jsp/IfConfiguredTag.java
redback-integrations/redback-common-integrations/src/test/resources/spring-context.xml
redback-integrations/redback-rest/redback-rest-services/src/main/java/org/codehaus/redback/rest/services/DefaultUserService.java
redback-integrations/redback-rest/redback-rest-services/src/test/java/org/codehaus/redback/rest/services/FakeCreateAdminServiceImpl.java
redback-integrations/redback-struts2/redback-struts2-integration/src/main/java/org/codehaus/plexus/redback/struts2/action/LoginAction.java
redback-integrations/redback-struts2/redback-struts2-integration/src/main/java/org/codehaus/plexus/redback/struts2/action/admin/AddAdminUserAction.java
redback-integrations/redback-struts2/redback-struts2-integration/src/main/java/org/codehaus/plexus/redback/struts2/interceptor/ForceAdminUserInterceptor.java
redback-integrations/redback-struts2/redback-struts2-integration/src/main/java/org/codehaus/plexus/redback/struts2/interceptor/PolicyEnforcementInterceptor.java
redback-integrations/redback-struts2/redback-struts2-integration/src/test/resources/org/codehaus/plexus/redback/struts2/action/admin/SystemInfoActionTest.xml
redback-keys/redback-keys-providers/redback-keys-cached/src/test/resources/spring-context.xml
redback-keys/redback-keys-providers/redback-keys-jdo/src/test/resources/spring-context.xml
redback-policy/src/main/java/org/codehaus/plexus/redback/policy/AbstractCookieSettings.java
redback-policy/src/main/java/org/codehaus/plexus/redback/policy/DefaultUserSecurityPolicy.java
redback-policy/src/main/java/org/codehaus/plexus/redback/policy/DefaultUserValidationSettings.java
redback-policy/src/main/java/org/codehaus/plexus/redback/policy/rules/AbstractPasswordRule.java
redback-rbac/redback-rbac-providers/redback-rbac-cached/src/test/resources/spring-context.xml
redback-rbac/redback-rbac-providers/redback-rbac-jdo/src/test/resources/spring-context.xml
redback-rbac/redback-rbac-providers/redback-rbac-memory/src/test/resources/spring-context.xml
redback-rbac/redback-rbac-role-manager/src/test/resources/jpox-spring-context.xml
redback-rbac/redback-rbac-role-manager/src/test/resources/spring-context.xml
redback-system/src/test/resources/spring-context.xml
redback-users/redback-users-providers/redback-users-configurable/src/main/java/org/apache/archiva/redback/users/configurable/ConfigurableUserManager.java
redback-users/redback-users-providers/redback-users-jdo/src/test/resources/spring-context.xml

index 217ffdaa86199f2040c0b4aa5ce885b5e14366ba..91cd2bf93151a055f9fc5e5f6057c1e3592f1d64 100644 (file)
@@ -21,6 +21,7 @@ package org.apache.archiva.redback.authentication.ldap;
 
 import org.apache.archiva.redback.common.ldap.UserMapper;
 import org.apache.archiva.redback.common.ldap.connection.LdapConnectionFactory;
+import org.apache.archiva.redback.configuration.UserConfiguration;
 import org.apache.commons.lang.StringUtils;
 import org.apache.archiva.redback.authentication.AuthenticationDataSource;
 import org.apache.archiva.redback.authentication.AuthenticationException;
@@ -29,7 +30,6 @@ import org.apache.archiva.redback.authentication.Authenticator;
 import org.apache.archiva.redback.authentication.PasswordBasedAuthenticationDataSource;
 import org.apache.archiva.redback.common.ldap.connection.LdapConnection;
 import org.apache.archiva.redback.common.ldap.connection.LdapException;
-import org.codehaus.plexus.redback.configuration.UserConfiguration;
 import org.apache.archiva.redback.users.ldap.service.LdapCacheService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
index 1d1e2dc4f81afbb62605d44b79a3ceaf833ac22e..491f850a871bd108165443c5af627fc8c5d4847a 100644 (file)
@@ -56,7 +56,7 @@
     <property name="userConf" ref="userConfiguration"/>
   </bean>
 
-  <bean name="userConfiguration" class="org.codehaus.plexus.redback.configuration.UserConfiguration"
+  <bean name="userConfiguration" class="org.apache.archiva.redback.configuration.UserConfiguration"
       init-method="initialize">
     <property name="configs">
       <list>
index 9dea720bc9ee346d7db011e88cfaa22ae804b068..8be9c9c269825a1544fc37f1bafc7b290e5bf521 100644 (file)
@@ -19,12 +19,12 @@ package org.apache.archiva.redback.common.jdo;
  * under the License.
  */
 
+import org.apache.archiva.redback.configuration.UserConfiguration;
 import org.apache.commons.lang.StringUtils;
 import org.codehaus.plexus.interpolation.InterpolationException;
 import org.codehaus.plexus.interpolation.PropertiesBasedValueSource;
 import org.codehaus.plexus.interpolation.StringSearchInterpolator;
 import org.codehaus.plexus.jdo.DefaultConfigurableJdoFactory;
-import org.codehaus.plexus.redback.configuration.UserConfiguration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Service;
index 1faf5eb62ab34373e5beefd568662c77427b1156..f75c284ae7e6bc2e1b3a74072bf04aacd2f129e3 100644 (file)
@@ -19,8 +19,8 @@ package org.apache.archiva.redback.common.ldap;
  * under the License.
  */
 
+import org.apache.archiva.redback.configuration.UserConfiguration;
 import org.apache.archiva.redback.users.User;
-import org.codehaus.plexus.redback.configuration.UserConfiguration;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.stereotype.Service;
 
index 6e784c9f58f371e7b0bf21a7249898161a0073b5..e6beb6edbb8471f98ae212e3c36f9bfef6baee43 100644 (file)
@@ -19,7 +19,7 @@ package org.apache.archiva.redback.common.ldap.connection;
  * under the License.
  */
 
-import org.codehaus.plexus.redback.configuration.UserConfiguration;
+import org.apache.archiva.redback.configuration.UserConfiguration;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.PostConstruct;
index a4ed12b68c23b291b46b14e01cb53516de2de7f8..1181c9f3c6cf0b5c1ceb766444e8662a11609ed9 100644 (file)
@@ -23,7 +23,7 @@
        xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
 
-  <bean name="userConfiguration" class="org.codehaus.plexus.redback.configuration.UserConfiguration">
+  <bean name="userConfiguration" class="org.apache.archiva.redback.configuration.UserConfiguration">
     <property name="configs">
       <list>
         <value>src/test/resources/test.properties</value>
diff --git a/redback-configuration/src/main/java/org/apache/archiva/redback/configuration/UserConfiguration.java b/redback-configuration/src/main/java/org/apache/archiva/redback/configuration/UserConfiguration.java
new file mode 100644 (file)
index 0000000..138bfa5
--- /dev/null
@@ -0,0 +1,224 @@
+package org.apache.archiva.redback.configuration;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.codehaus.plexus.evaluator.DefaultExpressionEvaluator;
+import org.codehaus.plexus.evaluator.EvaluatorException;
+import org.codehaus.plexus.evaluator.ExpressionEvaluator;
+import org.codehaus.plexus.evaluator.sources.SystemPropertyExpressionSource;
+import org.codehaus.plexus.registry.Registry;
+import org.codehaus.plexus.registry.RegistryException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.PostConstruct;
+import javax.inject.Inject;
+import javax.inject.Named;
+import java.io.File;
+import java.util.List;
+
+/**
+ * ConfigurationFactory
+ *
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id$
+ */
+@Service( "userConfiguration" )
+public class UserConfiguration
+{
+    private static final String DEFAULT_CONFIG_RESOURCE = "org/apache/archiva/redback/config-defaults.properties";
+
+    protected Logger log = LoggerFactory.getLogger( getClass() );
+
+    /**
+     *
+     *
+     * @deprecated Please configure the Plexus registry instead
+     */
+    private List<String> configs;
+
+    private Registry lookupRegistry;
+
+    private static final String PREFIX = "org.apache.archiva.redback";
+
+    @Inject
+    @Named( value = "commons-configuration" )
+    private Registry registry;
+
+    //TODO move this method call in the constructor
+
+    @PostConstruct
+    public void initialize()
+        throws RegistryException
+    {
+        performLegacyInitialization();
+
+        try
+        {
+            registry.addConfigurationFromResource( DEFAULT_CONFIG_RESOURCE, PREFIX );
+        }
+        catch ( RegistryException e )
+        {
+            // Ok, not found in context classloader; try the one in this jar.
+
+            ClassLoader prevCl = Thread.currentThread().getContextClassLoader();
+            try
+            {
+
+                Thread.currentThread().setContextClassLoader( getClass().getClassLoader() );
+                registry.addConfigurationFromResource( DEFAULT_CONFIG_RESOURCE, PREFIX );
+            }
+            finally
+            {
+                Thread.currentThread().setContextClassLoader( prevCl );
+            }
+        }
+
+        lookupRegistry = registry.getSubset( PREFIX );
+
+        if ( log.isDebugEnabled() )
+        {
+            log.debug( lookupRegistry.dump() );
+        }
+    }
+
+    private void performLegacyInitialization()
+        throws RegistryException
+    {
+        ExpressionEvaluator evaluator = new DefaultExpressionEvaluator();
+        evaluator.addExpressionSource( new SystemPropertyExpressionSource() );
+
+        if ( configs != null )
+        {
+            if ( !configs.isEmpty() )
+            {
+                // TODO: plexus should be able to do this on it's own.
+                log.warn(
+                    "DEPRECATED: the <configs> elements is deprecated. Please configure the Plexus registry instead" );
+            }
+
+            for ( String configName : configs )
+            {
+                try
+                {
+                    configName = evaluator.expand( configName );
+                }
+                catch ( EvaluatorException e )
+                {
+                    log.warn( "Unable to resolve configuration name: " + e.getMessage(), e );
+                }
+                log.info( "Attempting to find configuration [{}] (resolved to [{}])", configName, configName );
+
+                registry.addConfigurationFromFile( new File( configName ), PREFIX );
+            }
+        }
+    }
+
+    public String getString( String key )
+    {
+        return lookupRegistry.getString( key );
+    }
+
+    public String getString( String key, String defaultValue )
+    {
+        String value = lookupRegistry.getString( key, defaultValue );
+        return value;
+    }
+
+    public int getInt( String key )
+    {
+        return lookupRegistry.getInt( key );
+    }
+
+    public int getInt( String key, int defaultValue )
+    {
+        return lookupRegistry.getInt( key, defaultValue );
+    }
+
+    public boolean getBoolean( String key )
+    {
+        return lookupRegistry.getBoolean( key );
+    }
+
+    public boolean getBoolean( String key, boolean defaultValue )
+    {
+        return lookupRegistry.getBoolean( key, defaultValue );
+    }
+
+    @SuppressWarnings( "unchecked" )
+    public List<String> getList( String key )
+    {
+        return lookupRegistry.getList( key );
+    }
+
+    public String getConcatenatedList( String key, String defaultValue )
+    {
+        String concatenatedList;
+        List<String> list = getList( key );
+        if ( !list.isEmpty() )
+        {
+            StringBuilder s = new StringBuilder();
+            for ( String value : list )
+            {
+                if ( s.length() > 0 )
+                {
+                    s.append( "," );
+                }
+                s.append( value );
+            }
+            concatenatedList = s.toString();
+        }
+        else
+        {
+            concatenatedList = defaultValue;
+        }
+
+        return concatenatedList;
+    }
+
+    /**
+     * @return
+     * @deprecated
+     */
+    public List<String> getConfigs()
+    {
+        return configs;
+    }
+
+    /**
+     * @param configs
+     * @deprecated
+     */
+    public void setConfigs( List<String> configs )
+    {
+        this.configs = configs;
+    }
+
+    public Registry getRegistry()
+    {
+        return registry;
+    }
+
+    public void setRegistry( Registry registry )
+    {
+        this.registry = registry;
+    }
+}
diff --git a/redback-configuration/src/main/java/org/codehaus/plexus/redback/configuration/UserConfiguration.java b/redback-configuration/src/main/java/org/codehaus/plexus/redback/configuration/UserConfiguration.java
deleted file mode 100644 (file)
index e460aae..0000000
+++ /dev/null
@@ -1,224 +0,0 @@
-package org.codehaus.plexus.redback.configuration;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.codehaus.plexus.evaluator.DefaultExpressionEvaluator;
-import org.codehaus.plexus.evaluator.EvaluatorException;
-import org.codehaus.plexus.evaluator.ExpressionEvaluator;
-import org.codehaus.plexus.evaluator.sources.SystemPropertyExpressionSource;
-import org.codehaus.plexus.registry.Registry;
-import org.codehaus.plexus.registry.RegistryException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.PostConstruct;
-import javax.inject.Inject;
-import javax.inject.Named;
-import java.io.File;
-import java.util.List;
-
-/**
- * ConfigurationFactory
- *
- * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
- * @version $Id$
- */
-@Service( "userConfiguration" )
-public class UserConfiguration
-{
-    private static final String DEFAULT_CONFIG_RESOURCE = "org/codehaus/plexus/redback/config-defaults.properties";
-
-    protected Logger log = LoggerFactory.getLogger( getClass() );
-
-    /**
-     *
-     *
-     * @deprecated Please configure the Plexus registry instead
-     */
-    private List<String> configs;
-
-    private Registry lookupRegistry;
-
-    private static final String PREFIX = "org.codehaus.plexus.redback";
-
-    @Inject
-    @Named( value = "commons-configuration" )
-    private Registry registry;
-
-    //TODO move this method call in the constructor
-
-    @PostConstruct
-    public void initialize()
-        throws RegistryException
-    {
-        performLegacyInitialization();
-
-        try
-        {
-            registry.addConfigurationFromResource( DEFAULT_CONFIG_RESOURCE, PREFIX );
-        }
-        catch ( RegistryException e )
-        {
-            // Ok, not found in context classloader; try the one in this jar.
-
-            ClassLoader prevCl = Thread.currentThread().getContextClassLoader();
-            try
-            {
-
-                Thread.currentThread().setContextClassLoader( getClass().getClassLoader() );
-                registry.addConfigurationFromResource( DEFAULT_CONFIG_RESOURCE, PREFIX );
-            }
-            finally
-            {
-                Thread.currentThread().setContextClassLoader( prevCl );
-            }
-        }
-
-        lookupRegistry = registry.getSubset( PREFIX );
-
-        if ( log.isDebugEnabled() )
-        {
-            log.debug( lookupRegistry.dump() );
-        }
-    }
-
-    private void performLegacyInitialization()
-        throws RegistryException
-    {
-        ExpressionEvaluator evaluator = new DefaultExpressionEvaluator();
-        evaluator.addExpressionSource( new SystemPropertyExpressionSource() );
-
-        if ( configs != null )
-        {
-            if ( !configs.isEmpty() )
-            {
-                // TODO: plexus should be able to do this on it's own.
-                log.warn(
-                    "DEPRECATED: the <configs> elements is deprecated. Please configure the Plexus registry instead" );
-            }
-
-            for ( String configName : configs )
-            {
-                try
-                {
-                    configName = evaluator.expand( configName );
-                }
-                catch ( EvaluatorException e )
-                {
-                    log.warn( "Unable to resolve configuration name: " + e.getMessage(), e );
-                }
-                log.info( "Attempting to find configuration [{}] (resolved to [{}])", configName, configName );
-
-                registry.addConfigurationFromFile( new File( configName ), PREFIX );
-            }
-        }
-    }
-
-    public String getString( String key )
-    {
-        return lookupRegistry.getString( key );
-    }
-
-    public String getString( String key, String defaultValue )
-    {
-        String value = lookupRegistry.getString( key, defaultValue );
-        return value;
-    }
-
-    public int getInt( String key )
-    {
-        return lookupRegistry.getInt( key );
-    }
-
-    public int getInt( String key, int defaultValue )
-    {
-        return lookupRegistry.getInt( key, defaultValue );
-    }
-
-    public boolean getBoolean( String key )
-    {
-        return lookupRegistry.getBoolean( key );
-    }
-
-    public boolean getBoolean( String key, boolean defaultValue )
-    {
-        return lookupRegistry.getBoolean( key, defaultValue );
-    }
-
-    @SuppressWarnings( "unchecked" )
-    public List<String> getList( String key )
-    {
-        return lookupRegistry.getList( key );
-    }
-
-    public String getConcatenatedList( String key, String defaultValue )
-    {
-        String concatenatedList;
-        List<String> list = getList( key );
-        if ( !list.isEmpty() )
-        {
-            StringBuilder s = new StringBuilder();
-            for ( String value : list )
-            {
-                if ( s.length() > 0 )
-                {
-                    s.append( "," );
-                }
-                s.append( value );
-            }
-            concatenatedList = s.toString();
-        }
-        else
-        {
-            concatenatedList = defaultValue;
-        }
-
-        return concatenatedList;
-    }
-
-    /**
-     * @return
-     * @deprecated
-     */
-    public List<String> getConfigs()
-    {
-        return configs;
-    }
-
-    /**
-     * @param configs
-     * @deprecated
-     */
-    public void setConfigs( List<String> configs )
-    {
-        this.configs = configs;
-    }
-
-    public Registry getRegistry()
-    {
-        return registry;
-    }
-
-    public void setRegistry( Registry registry )
-    {
-        this.registry = registry;
-    }
-}
index 26dbeeb6c2e6d023901bef756dcde0a1a89f5341..c3a4146b922e142399d3c5d047f2e97d6eb60033 100644 (file)
@@ -27,6 +27,6 @@
        default-lazy-init="true">
 
   <context:annotation-config />
-  <context:component-scan base-package="org.codehaus.plexus.redback.configuration"/>
+  <context:component-scan base-package="org.apache.archiva.redback.configuration"/>
  
 </beans>
\ No newline at end of file
diff --git a/redback-configuration/src/main/resources/org/apache/archiva/redback/config-defaults.properties b/redback-configuration/src/main/resources/org/apache/archiva/redback/config-defaults.properties
new file mode 100644 (file)
index 0000000..e28bf4b
--- /dev/null
@@ -0,0 +1,128 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# --------------------------------------------------------------------
+# Application Configuration
+
+application.timestamp=EEE d MMM yyyy HH:mm:ss Z
+
+# --------------------------------------------------------------------
+# JDBC Setup
+
+jdbc.driver.name=org.apache.derby.jdbc.EmbeddedDriver
+jdbc.url=jdbc:derby:${plexus.home}/database;create=true
+jdbc.username=sa
+jdbc.password=
+
+# --------------------------------------------------------------------
+# Email Settings
+
+email.jndiSessionName=java:comp/env/mail/Session
+email.smtp.host=localhost
+email.smtp.port=25
+email.smtp.ssl.enabled=false
+email.smtp.tls.enabled=false
+email.smtp.username=
+email.smtp.password=
+
+#TODO: move description elsewhere, remove bad default
+# All emails sent by the system will be from the following address
+#email.from.address=${user.name}@localhost
+# All emails sent by the system will be from the following user name (used in conjunction with address)
+#email.from.name=Unconfigured Username
+
+# If all email addresses (from new user registration) require an account validation email. 
+email.validation.required=true
+# Timeout (in minutes) for the key generated for an email validation to remain valid.
+# 2880 minutes = 48 hours
+email.validation.timeout=2880
+# The subject line for the email message.
+email.validation.subject=Welcome
+
+#TODO: move description elsewhere, remove bad default
+# Get the Feedback to use for any outgoing emails.
+# NOTE: if feedback.path starts with a "/" it is appended to the end of the value provided in application.url
+# This value can be in the format/syntax of "/feedback.action" or even "mailto:feedback@application.com"
+#email.feedback.path=/feedback.action
+
+#Set the application base URL. The default is to derive it from the HTTP request
+#application.url=http://myurl.mycompany.com
+
+# --------------------------------------------------------------------
+# Auto Login Settings
+
+security.rememberme.enabled=true
+# Timeout in minutes ( 525600 minutes = 1 year )
+security.rememberme.timeout=525600
+
+# Single Sign On
+# Timeout in minutes
+security.signon.timeout=30
+
+# --------------------------------------------------------------------
+# Default Username Values
+redback.default.admin=admin
+
+# --------------------------------------------------------------------
+# Security Policies
+
+#security.policy.password.encoder=
+security.policy.password.previous.count=6
+security.policy.password.expiration.enabled=true
+security.policy.password.expiration.days=90
+security.policy.password.expiration.notify.days=10
+security.policy.allowed.login.attempt=10
+
+# turn off the perclick enforcement of various security policies, slightly
+# more heavyweight since it will ensure that the User object on each click
+# is up to date
+security.policy.strict.enforcement.enabled=true
+security.policy.strict.force.password.change.enabled=true
+
+# --------------------------------------------------------------------
+# Password Rules
+security.policy.password.rule.alphanumeric.enabled=false
+security.policy.password.rule.alphacount.enabled=true
+security.policy.password.rule.alphacount.minimum=1
+security.policy.password.rule.characterlength.enabled=true
+security.policy.password.rule.characterlength.minimum=1
+security.policy.password.rule.characterlength.maximum=24
+security.policy.password.rule.musthave.enabled=true
+security.policy.password.rule.numericalcount.enabled=true
+security.policy.password.rule.numericalcount.minimum=1
+security.policy.password.rule.reuse.enabled=true
+security.policy.password.rule.nowhitespace.enabled=true
+
+# --------------------------------------------------------------------
+# ldap settings
+#
+ldap.bind.authenticator.enabled=false
+
+# ldap options for configuration via properties file
+#ldap.config.hostname=
+#ldap.config.port=
+#ldap.config.base.dn=
+#ldap.config.context.factory=
+#ldap.config.bind.dn=
+#ldap.config.password=
+#ldap.config.authentication.method=
+
+# config parameter for the ConfigurableUserManager
+user.manager.impl=cached
+
+
+
diff --git a/redback-configuration/src/main/resources/org/codehaus/plexus/redback/config-defaults.properties b/redback-configuration/src/main/resources/org/codehaus/plexus/redback/config-defaults.properties
deleted file mode 100644 (file)
index e28bf4b..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-# --------------------------------------------------------------------
-# Application Configuration
-
-application.timestamp=EEE d MMM yyyy HH:mm:ss Z
-
-# --------------------------------------------------------------------
-# JDBC Setup
-
-jdbc.driver.name=org.apache.derby.jdbc.EmbeddedDriver
-jdbc.url=jdbc:derby:${plexus.home}/database;create=true
-jdbc.username=sa
-jdbc.password=
-
-# --------------------------------------------------------------------
-# Email Settings
-
-email.jndiSessionName=java:comp/env/mail/Session
-email.smtp.host=localhost
-email.smtp.port=25
-email.smtp.ssl.enabled=false
-email.smtp.tls.enabled=false
-email.smtp.username=
-email.smtp.password=
-
-#TODO: move description elsewhere, remove bad default
-# All emails sent by the system will be from the following address
-#email.from.address=${user.name}@localhost
-# All emails sent by the system will be from the following user name (used in conjunction with address)
-#email.from.name=Unconfigured Username
-
-# If all email addresses (from new user registration) require an account validation email. 
-email.validation.required=true
-# Timeout (in minutes) for the key generated for an email validation to remain valid.
-# 2880 minutes = 48 hours
-email.validation.timeout=2880
-# The subject line for the email message.
-email.validation.subject=Welcome
-
-#TODO: move description elsewhere, remove bad default
-# Get the Feedback to use for any outgoing emails.
-# NOTE: if feedback.path starts with a "/" it is appended to the end of the value provided in application.url
-# This value can be in the format/syntax of "/feedback.action" or even "mailto:feedback@application.com"
-#email.feedback.path=/feedback.action
-
-#Set the application base URL. The default is to derive it from the HTTP request
-#application.url=http://myurl.mycompany.com
-
-# --------------------------------------------------------------------
-# Auto Login Settings
-
-security.rememberme.enabled=true
-# Timeout in minutes ( 525600 minutes = 1 year )
-security.rememberme.timeout=525600
-
-# Single Sign On
-# Timeout in minutes
-security.signon.timeout=30
-
-# --------------------------------------------------------------------
-# Default Username Values
-redback.default.admin=admin
-
-# --------------------------------------------------------------------
-# Security Policies
-
-#security.policy.password.encoder=
-security.policy.password.previous.count=6
-security.policy.password.expiration.enabled=true
-security.policy.password.expiration.days=90
-security.policy.password.expiration.notify.days=10
-security.policy.allowed.login.attempt=10
-
-# turn off the perclick enforcement of various security policies, slightly
-# more heavyweight since it will ensure that the User object on each click
-# is up to date
-security.policy.strict.enforcement.enabled=true
-security.policy.strict.force.password.change.enabled=true
-
-# --------------------------------------------------------------------
-# Password Rules
-security.policy.password.rule.alphanumeric.enabled=false
-security.policy.password.rule.alphacount.enabled=true
-security.policy.password.rule.alphacount.minimum=1
-security.policy.password.rule.characterlength.enabled=true
-security.policy.password.rule.characterlength.minimum=1
-security.policy.password.rule.characterlength.maximum=24
-security.policy.password.rule.musthave.enabled=true
-security.policy.password.rule.numericalcount.enabled=true
-security.policy.password.rule.numericalcount.minimum=1
-security.policy.password.rule.reuse.enabled=true
-security.policy.password.rule.nowhitespace.enabled=true
-
-# --------------------------------------------------------------------
-# ldap settings
-#
-ldap.bind.authenticator.enabled=false
-
-# ldap options for configuration via properties file
-#ldap.config.hostname=
-#ldap.config.port=
-#ldap.config.base.dn=
-#ldap.config.context.factory=
-#ldap.config.bind.dn=
-#ldap.config.password=
-#ldap.config.authentication.method=
-
-# config parameter for the ConfigurableUserManager
-user.manager.impl=cached
-
-
-
index 8d41a0c3791a0631d40f02c0b3b3f2727f31b079..02bbf7237853805bcfb7437171940de226032e09 100644 (file)
@@ -20,6 +20,7 @@ package org.codehaus.plexus.redback.configuration;
  */
 
 import junit.framework.TestCase;
+import org.apache.archiva.redback.configuration.UserConfiguration;
 import org.codehaus.plexus.util.StringUtils;
 import org.junit.Test;
 import org.junit.runner.RunWith;
index e8ba916f348626f8dce3dc31cb934097ba6c9dbb..05f746cd3e20b9449a39daae1956829645b67859 100644 (file)
@@ -27,7 +27,7 @@
        default-lazy-init="true">
 
 
-  <bean name="test" class="org.codehaus.plexus.redback.configuration.UserConfiguration">
+  <bean name="test" class="org.apache.archiva.redback.configuration.UserConfiguration">
     <property name="configs">
       <list>
         <value>src/test/resources/props/test-another.properties</value>
index a7548c3fcd7e100509c66d62a1c1fa48d71e4377..ae328db2a6e3dbc99505cb6ad9d24de5f673eb93 100644 (file)
@@ -22,7 +22,7 @@ package org.codehaus.redback.integration.checks.security;
 import org.apache.archiva.redback.users.UserNotFoundException;
 import org.apache.commons.lang.StringUtils;
 import org.apache.archiva.redback.authentication.PasswordBasedAuthenticationDataSource;
-import org.codehaus.plexus.redback.configuration.UserConfiguration;
+import org.apache.archiva.redback.configuration.UserConfiguration;
 import org.codehaus.plexus.redback.rbac.RBACManager;
 import org.codehaus.plexus.redback.rbac.RbacManagerException;
 import org.codehaus.plexus.redback.rbac.Role;
index 79a09b53000121aac5d7756b86a146dedc2c47cf..0c30a13d524255122dfeba527aa2fb5bb832bb4a 100644 (file)
@@ -24,7 +24,6 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 
-import javax.annotation.Resource;
 import javax.inject.Inject;
 import javax.inject.Named;
 import javax.mail.Address;
@@ -34,7 +33,7 @@ import javax.mail.internet.AddressException;
 import javax.mail.internet.InternetAddress;
 import javax.mail.internet.MimeMessage;
 
-import org.codehaus.plexus.redback.configuration.UserConfiguration;
+import org.apache.archiva.redback.configuration.UserConfiguration;
 import org.codehaus.plexus.redback.keys.AuthenticationKey;
 import org.codehaus.plexus.redback.policy.UserSecurityPolicy;
 import org.codehaus.plexus.redback.policy.UserValidationSettings;
index 08092a55b648f113eda45a36798ba2920c972256..10b941285c87c40357a3a34c7a939b258b600d6e 100644 (file)
@@ -24,7 +24,7 @@ import org.apache.velocity.app.VelocityEngine;
 import org.apache.velocity.exception.MethodInvocationException;
 import org.apache.velocity.exception.ParseErrorException;
 import org.apache.velocity.exception.ResourceNotFoundException;
-import org.codehaus.plexus.redback.configuration.UserConfiguration;
+import org.apache.archiva.redback.configuration.UserConfiguration;
 import org.codehaus.plexus.redback.keys.AuthenticationKey;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
index ef46ff420c02847a8503f451a90835a7a7d3e109..56bfd936812282aa3f1d31acb27fdbd20bae9f40 100644 (file)
@@ -19,7 +19,7 @@ package org.codehaus.redback.integration.taglib.jsp;
  * under the License.
  */
 
-import org.codehaus.plexus.redback.configuration.UserConfiguration;
+import org.apache.archiva.redback.configuration.UserConfiguration;
 import org.springframework.context.ApplicationContext;
 import org.springframework.web.context.support.WebApplicationContextUtils;
 
index def35db0e59c3a4de2f337d5fc9aad85b632f581..6fb1a7ec6859a283782137a2bd84c3cdef0a7c36 100644 (file)
@@ -42,7 +42,7 @@
     </property>
   </bean>
 
-  <bean name="userConfiguration#custom-url" class="org.codehaus.plexus.redback.configuration.UserConfiguration">
+  <bean name="userConfiguration#custom-url" class="org.apache.archiva.redback.configuration.UserConfiguration">
     <property name="configs">
       <list>
         <value>src/test/config/mail.properties</value>
index 84562dc50514f14056087b6948b196380828fd82..7272a5293dc6978a65313e0f6c682204fd81dc79 100644 (file)
@@ -20,13 +20,13 @@ package org.codehaus.redback.rest.services;
  */
 
 import net.sf.ehcache.CacheManager;
+import org.apache.archiva.redback.configuration.UserConfiguration;
 import org.apache.archiva.redback.users.UserManager;
 import org.apache.archiva.redback.users.UserNotFoundException;
 import org.apache.commons.lang.StringUtils;
 import org.codehaus.plexus.cache.Cache;
 import org.apache.archiva.redback.authentication.AuthenticationException;
 import org.apache.archiva.redback.authentication.TokenBasedAuthenticationDataSource;
-import org.codehaus.plexus.redback.configuration.UserConfiguration;
 import org.codehaus.plexus.redback.keys.AuthenticationKey;
 import org.codehaus.plexus.redback.keys.KeyManager;
 import org.codehaus.plexus.redback.keys.KeyManagerException;
index 9442c71d9a56407a6d0e54d193dd8c863b82a5d2..26d4f61500e0b19ca646661dacd2dc4521330bf0 100644 (file)
@@ -20,7 +20,7 @@ package org.codehaus.redback.rest.services;
  */
 
 import org.apache.archiva.redback.users.UserManager;
-import org.codehaus.plexus.redback.configuration.UserConfiguration;
+import org.apache.archiva.redback.configuration.UserConfiguration;
 import org.codehaus.plexus.redback.rbac.RBACManager;
 import org.codehaus.plexus.redback.role.RoleManager;
 import org.codehaus.redback.rest.api.services.UserService;
index c37dbf883a836b026d23e1d50f89e0b63eaa951f..4d1be692a6191220b4986a4336feb83c3a731a00 100644 (file)
@@ -27,7 +27,7 @@ import org.apache.archiva.redback.authentication.AuthenticationException;
 import org.apache.archiva.redback.authentication.AuthenticationResult;
 import org.apache.archiva.redback.authentication.PasswordBasedAuthenticationDataSource;
 import org.apache.archiva.redback.authentication.TokenBasedAuthenticationDataSource;
-import org.codehaus.plexus.redback.configuration.UserConfiguration;
+import org.apache.archiva.redback.configuration.UserConfiguration;
 import org.codehaus.plexus.redback.keys.AuthenticationKey;
 import org.codehaus.plexus.redback.keys.KeyManagerException;
 import org.codehaus.plexus.redback.keys.KeyNotFoundException;
index 75354bbf8b6c41042a6dbb307293ec55580545ab..6e009350d5861f005566f7701920b043c60d3fe6 100644 (file)
@@ -20,13 +20,13 @@ package org.codehaus.plexus.redback.struts2.action.admin;
  */
 
 import org.apache.archiva.redback.authentication.AuthenticationException;
+import org.apache.archiva.redback.configuration.UserConfiguration;
 import org.apache.archiva.redback.users.UserManager;
 import org.apache.struts2.ServletActionContext;
 import org.apache.archiva.redback.authentication.AuthenticationConstants;
 import org.apache.archiva.redback.authentication.AuthenticationDataSource;
 import org.apache.archiva.redback.authentication.AuthenticationResult;
 import org.apache.archiva.redback.authentication.PasswordBasedAuthenticationDataSource;
-import org.codehaus.plexus.redback.configuration.UserConfiguration;
 import org.codehaus.plexus.redback.policy.AccountLockedException;
 import org.codehaus.plexus.redback.policy.MustChangePasswordException;
 import org.codehaus.plexus.redback.role.RoleManager;
index 548b126e91f17244d478d59410a66b90a566ecec..f8eec6377b8cef5a77e4a1fb4b819c801f41b2f8 100644 (file)
@@ -26,7 +26,7 @@ import org.apache.archiva.redback.users.UserNotFoundException;
 import org.apache.commons.lang.StringUtils;
 import org.apache.struts2.ServletActionContext;
 import org.apache.archiva.redback.authentication.PasswordBasedAuthenticationDataSource;
-import org.codehaus.plexus.redback.configuration.UserConfiguration;
+import org.apache.archiva.redback.configuration.UserConfiguration;
 import org.codehaus.plexus.redback.role.RoleManager;
 import org.codehaus.plexus.redback.role.RoleManagerException;
 import org.codehaus.plexus.redback.system.SecuritySession;
index 8ca6adb4cc68e7270f93abe22a9f6245fa0b9ed8..ef245218997d829cd743999f4b235103a6334303 100644 (file)
@@ -25,9 +25,9 @@ import java.util.Map;
 import javax.inject.Inject;
 import javax.servlet.http.HttpServletRequest;
 
+import org.apache.archiva.redback.configuration.UserConfiguration;
 import org.apache.archiva.redback.users.UserManager;
 import org.apache.struts2.ServletActionContext;
-import org.codehaus.plexus.redback.configuration.UserConfiguration;
 import org.codehaus.plexus.redback.policy.UserSecurityPolicy;
 import org.codehaus.plexus.redback.system.DefaultSecuritySession;
 import org.codehaus.plexus.redback.system.SecuritySession;
index 4228ff888a1d584bb271ff8841fd1f4ab1049cdb..1ecf622c6f00651d1eed2bb35e75a8afd3fdbc2a 100644 (file)
@@ -77,7 +77,7 @@
       </configuration>
       <requirements>
         <requirement>
-          <role>org.codehaus.plexus.redback.configuration.UserConfiguration</role>
+          <role>org.apache.archiva.redback.configuration.UserConfiguration</role>
           <field-name>userConf</field-name>
         </requirement>
       </requirements>
index ca7b15a387ab8c00ac96d843c8f030eaaa589e74..d0b8b024db2873b213bc12748aff40d53ff062d5 100644 (file)
@@ -40,7 +40,7 @@
     </property>
   </bean>
 
-  <bean name="userConfiguration" class="org.codehaus.plexus.redback.configuration.UserConfiguration">
+  <bean name="userConfiguration" class="org.apache.archiva.redback.configuration.UserConfiguration">
     <property name="registry" ref="test-conf"/>
   </bean>
 
index 4f9e407bb68e3ed19bb36a3e56661db7be7a0502..ba46dc01b47c3fac060ae0b1d3a08114fd71513c 100644 (file)
@@ -39,7 +39,7 @@
     </property>
   </bean>
 
-  <bean name="userConfiguration" class="org.codehaus.plexus.redback.configuration.UserConfiguration">
+  <bean name="userConfiguration" class="org.apache.archiva.redback.configuration.UserConfiguration">
     <property name="registry" ref="test-conf"/>
   </bean>
 
index 6a217ea08fff37f4324ff792895b0bb9a66ebee3..628a5dd6bb32ba8e3fa133750658571b0d214d3a 100644 (file)
@@ -19,11 +19,10 @@ package org.codehaus.plexus.redback.policy;
  * under the License.
  */
 
-import javax.annotation.Resource;
 import javax.inject.Inject;
 import javax.inject.Named;
 
-import org.codehaus.plexus.redback.configuration.UserConfiguration;
+import org.apache.archiva.redback.configuration.UserConfiguration;
 
 /**
  * Base class for cookie settings. These will only differ by their configuration keys.
index 370774276e75981b8183b5cd31e4d732c84a2f86..d93fc8b9e1a9a9adb6a086a7f2ecb6c15078b39b 100644 (file)
@@ -19,8 +19,8 @@ package org.codehaus.plexus.redback.policy;
  * under the License.
  */
 
+import org.apache.archiva.redback.configuration.UserConfiguration;
 import org.apache.archiva.redback.users.User;
-import org.codehaus.plexus.redback.configuration.UserConfiguration;
 import org.codehaus.plexus.redback.policy.rules.MustHavePasswordRule;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
index d3bb5e7c4a61d28206a06a6ba8a7235abaab6162..d3899fe0bd06a280b4a92b523efa9f03e906985d 100644 (file)
@@ -19,7 +19,7 @@ package org.codehaus.plexus.redback.policy;
  * under the License.
  */
 
-import org.codehaus.plexus.redback.configuration.UserConfiguration;
+import org.apache.archiva.redback.configuration.UserConfiguration;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.PostConstruct;
index 6e1394a3343e39450c05397f951c584042e327bc..7ebeddcc59257acc9bd12d55575096ffae5b2dd0 100644 (file)
@@ -16,7 +16,7 @@ package org.codehaus.plexus.redback.policy.rules;
  * limitations under the License.
  */
 
-import org.codehaus.plexus.redback.configuration.UserConfiguration;
+import org.apache.archiva.redback.configuration.UserConfiguration;
 import org.codehaus.plexus.redback.policy.PasswordRule;
 
 import javax.inject.Inject;
index b64319f7069a6fada6385c16b0752a6cdb697961..8928117c8acf1abd9ffb4c130bde6ff26c41d209 100755 (executable)
@@ -41,7 +41,7 @@
     </property>
   </bean>
 
-  <bean name="userConfiguration" class="org.codehaus.plexus.redback.configuration.UserConfiguration">
+  <bean name="userConfiguration" class="org.apache.archiva.redback.configuration.UserConfiguration">
     <property name="registry" ref="test-conf"/>
   </bean>
 
index 1881e883fa5205b6d004e498e7e07586efdb2a33..8c256723bdfcd0fd154f00e32c467fcf1059b6a6 100644 (file)
@@ -44,7 +44,7 @@
     </property>
   </bean>
 
-  <bean name="userConfiguration" class="org.codehaus.plexus.redback.configuration.UserConfiguration">
+  <bean name="userConfiguration" class="org.apache.archiva.redback.configuration.UserConfiguration">
     <property name="registry" ref="test-conf"/>
   </bean>
 
index 25d371fc6ea88cc15749e519f910f0e01c49fc2a..f151879d9f261a393b4ec9cf7ac0f34a11bd69b5 100755 (executable)
@@ -40,7 +40,7 @@
     </property>
   </bean>
 
-  <bean name="userConfiguration" class="org.codehaus.plexus.redback.configuration.UserConfiguration">
+  <bean name="userConfiguration" class="org.apache.archiva.redback.configuration.UserConfiguration">
     <property name="registry" ref="test-conf"/>
   </bean>
 
index 9bc14b88e083e2faa1246537796ba2c5eaebced8..da558f020e41f919d869733e6cdb639e9c916ae0 100644 (file)
@@ -73,7 +73,7 @@
     </property>
   </bean>
 
-  <bean name="userConfiguration" class="org.codehaus.plexus.redback.configuration.UserConfiguration">
+  <bean name="userConfiguration" class="org.apache.archiva.redback.configuration.UserConfiguration">
     <property name="registry" ref="test-conf"/>
   </bean>
 
index 2509c0f27a08a425e0b4352a6d51d3f639d31e9e..4c7a8d698c4e5faf3923196eb227195cddd6521e 100755 (executable)
@@ -42,7 +42,7 @@
     </property>
   </bean>
 
-  <bean name="userConfiguration" class="org.codehaus.plexus.redback.configuration.UserConfiguration">
+  <bean name="userConfiguration" class="org.apache.archiva.redback.configuration.UserConfiguration">
     <property name="registry" ref="test-conf"/>
   </bean>
 
index 4f9e407bb68e3ed19bb36a3e56661db7be7a0502..ba46dc01b47c3fac060ae0b1d3a08114fd71513c 100644 (file)
@@ -39,7 +39,7 @@
     </property>
   </bean>
 
-  <bean name="userConfiguration" class="org.codehaus.plexus.redback.configuration.UserConfiguration">
+  <bean name="userConfiguration" class="org.apache.archiva.redback.configuration.UserConfiguration">
     <property name="registry" ref="test-conf"/>
   </bean>
 
index eba794f0eb89dc68aeac0396832449fb0cfa38f1..f4d5cf40ae1289f11621f9ec227c215b6178fb11 100644 (file)
@@ -20,7 +20,7 @@ import org.apache.archiva.redback.users.AbstractUserManager;
 import org.apache.archiva.redback.users.User;
 import org.apache.archiva.redback.users.UserManager;
 import org.apache.archiva.redback.users.UserNotFoundException;
-import org.codehaus.plexus.redback.configuration.UserConfiguration;
+import org.apache.archiva.redback.configuration.UserConfiguration;
 import org.apache.archiva.redback.users.UserQuery;
 import org.springframework.context.ApplicationContext;
 import org.springframework.stereotype.Service;
index 8acaa1d54c02a9bfb75089d64f6ec76ae74e6558..286bac98cabd0228a1c6e1b3941695ff62ec064e 100644 (file)
@@ -34,7 +34,7 @@
     <property name="password" value=""/>
   </bean>
 
-  <bean name="userConfiguration" class="org.codehaus.plexus.redback.configuration.UserConfiguration">
+  <bean name="userConfiguration" class="org.apache.archiva.redback.configuration.UserConfiguration">
     <property name="registry" ref="test-conf"/>
   </bean>