This is an automated email from the ASF dual-hosted git repository. martin_s pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/archiva-redback-core.git
commit 90b7e4c1f027f747947f2494a1f488213fcf8fd7 Author: Martin Stockhammer <[email protected]> AuthorDate: Sat Dec 14 14:46:30 2019 +0100 Dependency cleanup for common-ldap --- redback-common/redback-common-ldap/pom.xml | 33 ++++++++++++++------ .../role/DefaultLdapRoleMapperConfiguration.java | 7 +++-- .../src/test/resources/log4j2-test.xml | 35 ++++++++++++++++++++++ 3 files changed, 63 insertions(+), 12 deletions(-) diff --git a/redback-common/redback-common-ldap/pom.xml b/redback-common/redback-common-ldap/pom.xml index 56656d1..b44dfec 100644 --- a/redback-common/redback-common-ldap/pom.xml +++ b/redback-common/redback-common-ldap/pom.xml @@ -47,33 +47,47 @@ <artifactId>archiva-components-spring-registry-commons</artifactId> </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-context-support</artifactId> - </dependency> + <dependency> <groupId>javax.annotation</groupId> - <artifactId>jsr250-api</artifactId> + <artifactId>javax.annotation-api</artifactId> + </dependency> + <dependency> + <groupId>javax.inject</groupId> + <artifactId>javax.inject</artifactId> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> </dependency> <dependency> - <groupId>com.google.guava</groupId> - <artifactId>guava</artifactId> + <groupId>org.apache.commons</groupId> + <artifactId>commons-collections4</artifactId> </dependency> <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </dependency> + + + <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> </dependency> + <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-simple</artifactId> + <groupId>org.springframework</groupId> + <artifactId>spring-context-support</artifactId> <scope>test</scope> </dependency> <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-slf4j-impl</artifactId> + <scope>test</scope> + </dependency> + + <dependency> <groupId>org.assertj</groupId> <artifactId>assertj-core</artifactId> <scope>test</scope> @@ -96,6 +110,7 @@ <dependency> <groupId>commons-beanutils</groupId> <artifactId>commons-beanutils</artifactId> + <scope>test</scope> </dependency> </dependencies> diff --git a/redback-common/redback-common-ldap/src/main/java/org/apache/archiva/redback/common/ldap/role/DefaultLdapRoleMapperConfiguration.java b/redback-common/redback-common-ldap/src/main/java/org/apache/archiva/redback/common/ldap/role/DefaultLdapRoleMapperConfiguration.java index 3dd27e5..d49561e 100644 --- a/redback-common/redback-common-ldap/src/main/java/org/apache/archiva/redback/common/ldap/role/DefaultLdapRoleMapperConfiguration.java +++ b/redback-common/redback-common-ldap/src/main/java/org/apache/archiva/redback/common/ldap/role/DefaultLdapRoleMapperConfiguration.java @@ -18,11 +18,12 @@ package org.apache.archiva.redback.common.ldap.role; * under the License. */ -import com.google.common.collect.ArrayListMultimap; -import com.google.common.collect.Multimap; import org.apache.archiva.redback.common.ldap.MappingException; import org.apache.archiva.redback.configuration.UserConfiguration; import org.apache.archiva.redback.configuration.UserConfigurationKeys; +import org.apache.commons.collections4.MultiMap; +import org.apache.commons.collections4.MultiValuedMap; +import org.apache.commons.collections4.multimap.ArrayListValuedHashMap; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -82,7 +83,7 @@ public class DefaultLdapRoleMapperConfiguration public Map<String, Collection<String>> getLdapGroupMappings() { - Multimap<String, String> map = ArrayListMultimap.create(); + MultiValuedMap<String, String> map = new ArrayListValuedHashMap<>( ); Collection<String> keys = userConf.getKeys(); diff --git a/redback-common/redback-common-ldap/src/test/resources/log4j2-test.xml b/redback-common/redback-common-ldap/src/test/resources/log4j2-test.xml new file mode 100644 index 0000000..91af3f0 --- /dev/null +++ b/redback-common/redback-common-ldap/src/test/resources/log4j2-test.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!-- + ~ 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. + --> +<configuration> + <appenders> + <Console name="console" target="SYSTEM_OUT"> + <PatternLayout pattern="[%t] %-5p %c %x - %m%n"/> + </Console> + </appenders> + <loggers> + <logger name="org.apache.archiva" level="info"/> + + <root level="error" includeLocation="true"> + <appender-ref ref="console"/> + </root> + </loggers> +</configuration> + +
