From fde0cc137425d220341519a83b08d20f54167829 Mon Sep 17 00:00:00 2001 From: Martin Stockhammer Date: Tue, 24 Dec 2019 15:23:24 +0100 Subject: [PATCH] Cleanup of users dependencies --- .../redback/integration/HttpUtils.java | 2 +- .../checks/security/AdminAutoCreateCheck.java | 2 +- .../authentication/HttpAuthenticator.java | 2 +- .../basic/HttpBasicAuthentication.java | 2 +- .../digest/HttpDigestAuthentication.java | 2 +- .../digest/HttpDigestHeader.java | 2 +- .../SimpleAuthorizationFilter.java | 2 +- .../redback/integration/mail/MailerImpl.java | 2 +- .../integration/model/UserCredentials.java | 2 +- .../integration/util/AutoLoginCookies.java | 2 +- .../redback-users-jpa/pom.xml | 42 +++++++------------ .../redback/users/jpa/model/JpaUser.java | 4 -- .../redback-users-ldap/pom.xml | 32 +++++++++++--- .../redback-users-memory/pom.xml | 23 ++++++++-- redback-users/redback-users-tests/pom.xml | 17 ++++++++ 15 files changed, 88 insertions(+), 50 deletions(-) diff --git a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/HttpUtils.java b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/HttpUtils.java index b50b4977..995b4072 100644 --- a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/HttpUtils.java +++ b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/HttpUtils.java @@ -19,7 +19,7 @@ package org.apache.archiva.redback.integration; * under the License. */ -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import java.util.Properties; diff --git a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/checks/security/AdminAutoCreateCheck.java b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/checks/security/AdminAutoCreateCheck.java index 6821a4b1..7f70e02a 100644 --- a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/checks/security/AdminAutoCreateCheck.java +++ b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/checks/security/AdminAutoCreateCheck.java @@ -33,7 +33,7 @@ import org.apache.archiva.redback.users.UserManager; import org.apache.archiva.redback.users.UserManagerException; import org.apache.archiva.redback.users.UserNotFoundException; import org.apache.commons.io.IOUtils; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; diff --git a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/filter/authentication/HttpAuthenticator.java b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/filter/authentication/HttpAuthenticator.java index ed8ef614..7371699e 100644 --- a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/filter/authentication/HttpAuthenticator.java +++ b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/filter/authentication/HttpAuthenticator.java @@ -30,7 +30,7 @@ import org.apache.archiva.redback.policy.AccountLockedException; import org.apache.archiva.redback.system.SecuritySession; import org.apache.archiva.redback.system.SecuritySystem; import org.apache.archiva.redback.system.SecuritySystemConstants; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/filter/authentication/basic/HttpBasicAuthentication.java b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/filter/authentication/basic/HttpBasicAuthentication.java index 29ad8865..a1c9ff17 100644 --- a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/filter/authentication/basic/HttpBasicAuthentication.java +++ b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/filter/authentication/basic/HttpBasicAuthentication.java @@ -33,7 +33,7 @@ import org.apache.archiva.redback.authentication.AuthenticationResult; import org.apache.archiva.redback.authentication.PasswordBasedAuthenticationDataSource; import org.apache.archiva.redback.system.SecuritySession; import org.apache.archiva.redback.integration.filter.authentication.HttpAuthenticator; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; /** diff --git a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/filter/authentication/digest/HttpDigestAuthentication.java b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/filter/authentication/digest/HttpDigestAuthentication.java index 7a1bc18f..e784137e 100644 --- a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/filter/authentication/digest/HttpDigestAuthentication.java +++ b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/filter/authentication/digest/HttpDigestAuthentication.java @@ -31,7 +31,7 @@ import org.apache.archiva.redback.users.UserManager; import org.apache.archiva.redback.users.UserNotFoundException; import org.apache.archiva.redback.integration.filter.authentication.HttpAuthenticationException; import org.apache.archiva.redback.integration.filter.authentication.HttpAuthenticator; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import javax.inject.Inject; diff --git a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/filter/authentication/digest/HttpDigestHeader.java b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/filter/authentication/digest/HttpDigestHeader.java index c5872f94..1e7082ee 100644 --- a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/filter/authentication/digest/HttpDigestHeader.java +++ b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/filter/authentication/digest/HttpDigestHeader.java @@ -23,7 +23,7 @@ package org.apache.archiva.redback.integration.filter.authentication.digest; import org.apache.commons.codec.binary.Base64; import org.apache.archiva.redback.integration.HttpUtils; import org.apache.archiva.redback.integration.filter.authentication.HttpAuthenticationException; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.annotation.Scope; diff --git a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/filter/authorization/SimpleAuthorizationFilter.java b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/filter/authorization/SimpleAuthorizationFilter.java index f3d22ddb..40e772c1 100644 --- a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/filter/authorization/SimpleAuthorizationFilter.java +++ b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/filter/authorization/SimpleAuthorizationFilter.java @@ -23,7 +23,7 @@ import org.apache.archiva.redback.authorization.AuthorizationException; import org.apache.archiva.redback.system.SecuritySession; import org.apache.archiva.redback.system.SecuritySystem; import org.apache.archiva.redback.integration.filter.SpringServletFilter; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/mail/MailerImpl.java b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/mail/MailerImpl.java index 462699dc..754edce6 100644 --- a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/mail/MailerImpl.java +++ b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/mail/MailerImpl.java @@ -39,7 +39,7 @@ import org.apache.archiva.redback.keys.AuthenticationKey; import org.apache.archiva.redback.policy.UserSecurityPolicy; import org.apache.archiva.redback.policy.UserValidationSettings; import org.apache.archiva.redback.system.SecuritySystem; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.mail.javamail.JavaMailSender; diff --git a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/model/UserCredentials.java b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/model/UserCredentials.java index 2cde9002..c43eaecd 100644 --- a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/model/UserCredentials.java +++ b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/model/UserCredentials.java @@ -22,7 +22,7 @@ package org.apache.archiva.redback.integration.model; import org.apache.archiva.redback.users.User; import org.apache.archiva.redback.users.UserManager; import org.apache.archiva.redback.users.UserManagerException; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import java.io.Serializable; diff --git a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/util/AutoLoginCookies.java b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/util/AutoLoginCookies.java index b3f4639d..fe559aaf 100644 --- a/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/util/AutoLoginCookies.java +++ b/redback-integrations/redback-common-integrations/src/main/java/org/apache/archiva/redback/integration/util/AutoLoginCookies.java @@ -30,7 +30,7 @@ import org.apache.archiva.redback.keys.KeyManagerException; import org.apache.archiva.redback.keys.KeyNotFoundException; import org.apache.archiva.redback.policy.CookieSettings; import org.apache.archiva.redback.system.SecuritySystem; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; diff --git a/redback-users/redback-users-providers/redback-users-jpa/pom.xml b/redback-users/redback-users-providers/redback-users-jpa/pom.xml index 874b7ee9..61a56308 100644 --- a/redback-users/redback-users-providers/redback-users-jpa/pom.xml +++ b/redback-users/redback-users-providers/redback-users-jpa/pom.xml @@ -38,10 +38,7 @@ org.apache.archiva.redback redback-policy - - org.apache.archiva.redback - redback-common-jpa - + org.slf4j slf4j-api @@ -66,15 +63,19 @@ org.springframework spring-context - - - commons-logging - commons-logging - - + + org.apache.archiva.redback + redback-common-jpa + runtime + + + org.apache.openjpa + openjpa + runtime + org.apache.archiva.components.registry @@ -82,15 +83,6 @@ test - - commons-beanutils - commons-beanutils - - - org.apache.openjpa - openjpa - - org.springframework spring-tx @@ -98,13 +90,6 @@ runtime - - org.springframework - spring-orm - ${springVersion} - test - - org.springframework spring-context-support @@ -194,6 +179,11 @@ commons-logging ${commons.logging.version} + + org.apache.archiva.redback + redback-common-jpa + ${project.version} + diff --git a/redback-users/redback-users-providers/redback-users-jpa/src/main/java/org/apache/archiva/redback/users/jpa/model/JpaUser.java b/redback-users/redback-users-providers/redback-users-jpa/src/main/java/org/apache/archiva/redback/users/jpa/model/JpaUser.java index e5ee5eb4..4ed4d649 100644 --- a/redback-users/redback-users-providers/redback-users-jpa/src/main/java/org/apache/archiva/redback/users/jpa/model/JpaUser.java +++ b/redback-users/redback-users-providers/redback-users-jpa/src/main/java/org/apache/archiva/redback/users/jpa/model/JpaUser.java @@ -19,9 +19,6 @@ package org.apache.archiva.redback.users.jpa.model; * under the License. */ -import org.apache.openjpa.persistence.ExternalValues; -import org.apache.openjpa.persistence.Type; - import javax.persistence.CollectionTable; import javax.persistence.Column; import javax.persistence.ElementCollection; @@ -29,7 +26,6 @@ import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id; import javax.persistence.JoinColumn; -import javax.persistence.OneToMany; import javax.persistence.OrderColumn; import javax.persistence.Table; import java.util.ArrayList; diff --git a/redback-users/redback-users-providers/redback-users-ldap/pom.xml b/redback-users/redback-users-providers/redback-users-ldap/pom.xml index 6bd6dbb6..078e441d 100644 --- a/redback-users/redback-users-providers/redback-users-ldap/pom.xml +++ b/redback-users/redback-users-providers/redback-users-ldap/pom.xml @@ -47,23 +47,43 @@ org.apache.archiva.redback redback-common-ldap + + org.apache.archiva.redback + redback-configuration + org.springframework - spring-context-support + spring-context org.apache.archiva.components.cache archiva-components-spring-cache-api - - org.apache.archiva.components.cache - archiva-components-spring-cache-ehcache - + javax.annotation javax.annotation-api - + + + javax.inject + javax.inject + + + org.apache.commons + commons-lang3 + + + org.apache.archiva.components.cache + archiva-components-spring-cache-ehcache + runtime + + + + org.springframework + spring-context-support + test + org.junit.platform junit-platform-launcher diff --git a/redback-users/redback-users-providers/redback-users-memory/pom.xml b/redback-users/redback-users-providers/redback-users-memory/pom.xml index 7165d99f..3785cf0e 100644 --- a/redback-users/redback-users-providers/redback-users-memory/pom.xml +++ b/redback-users/redback-users-providers/redback-users-memory/pom.xml @@ -38,10 +38,6 @@ org.apache.archiva.redback redback-policy - - org.springframework - spring-context-support - org.apache.archiva.components.registry archiva-components-spring-registry-commons @@ -55,6 +51,25 @@ org.apache.commons commons-lang3 + + org.springframework + spring-context + + + javax.inject + javax.inject + + + + org.junit.platform + junit-platform-console-standalone + test + + + org.springframework + spring-context-support + test + org.apache.archiva.redback redback-users-tests diff --git a/redback-users/redback-users-tests/pom.xml b/redback-users/redback-users-tests/pom.xml index 10ba7a05..291fb82c 100644 --- a/redback-users/redback-users-tests/pom.xml +++ b/redback-users/redback-users-tests/pom.xml @@ -35,7 +35,13 @@ org.apache.archiva.redback redback-policy + + org.apache.archiva.redback + redback-users-api + + + org.junit.platform junit-platform-launcher @@ -51,11 +57,22 @@ junit-jupiter-engine compile + + org.junit.jupiter + junit-jupiter-api + compile + org.junit.vintage junit-vintage-engine compile + + junit + junit + compile + + org.springframework