From 6d6eb1b4cda1fe608754249ac95fbdaa37b72703 Mon Sep 17 00:00:00 2001 From: Brian Demers Date: Tue, 2 Jan 2018 19:54:59 -0500 Subject: [PATCH] Removes duplicate classes from classpath Add Enforcer rule to detect duplicate classes Fixes: SHIRO-632 --- all/pom.xml | 28 ------------ cache/pom.xml | 21 --------- config/core/pom.xml | 22 --------- config/ogdl/pom.xml | 16 ------- core/pom.xml | 9 +++- crypto/cipher/pom.xml | 21 --------- crypto/core/pom.xml | 21 --------- crypto/hash/pom.xml | 21 --------- event/pom.xml | 21 --------- integration-tests/support/pom.xml | 21 --------- lang/pom.xml | 24 ---------- pom.xml | 74 ++++++++++++++++++++++++++++++- samples/quickstart-guice/pom.xml | 4 ++ samples/quickstart/pom.xml | 4 ++ support/aspectj/pom.xml | 10 +++-- support/ehcache/pom.xml | 2 +- support/guice/pom.xml | 4 ++ support/hazelcast/pom.xml | 2 +- support/quartz/pom.xml | 4 ++ test-coverage/pom.xml | 44 +++++------------- web/pom.xml | 4 ++ 21 files changed, 122 insertions(+), 255 deletions(-) diff --git a/all/pom.xml b/all/pom.xml index cdf008afcc..e588c9e68a 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -33,34 +33,6 @@ pom - - org.apache.shiro - shiro-lang - - - org.apache.shiro - shiro-config-core - - - org.apache.shiro - shiro-config-ogdl - - - org.apache.shiro - shiro-crypto-core - - - org.apache.shiro - shiro-crypto-hash - - - org.apache.shiro - shiro-crypto-cipher - - - org.apache.shiro - shiro-event - org.apache.shiro shiro-core diff --git a/cache/pom.xml b/cache/pom.xml index 2b316708aa..7e91a15c6f 100644 --- a/cache/pom.xml +++ b/cache/pom.xml @@ -29,27 +29,6 @@ 4.0.0 shiro-cache Apache Shiro :: Cache - bundle - - - - - org.apache.felix - maven-bundle-plugin - true - - - org.apache.shiro.cache - org.apache.shiro.cache*;version=${project.version} - - org.apache.shiro*;version="${shiro.osgi.importRange}", - * - - - - - - diff --git a/config/core/pom.xml b/config/core/pom.xml index 643a45f1bf..b548f5c478 100644 --- a/config/core/pom.xml +++ b/config/core/pom.xml @@ -30,28 +30,6 @@ shiro-config-core Apache Shiro :: Configuration :: Core - bundle - - - - - org.apache.felix - maven-bundle-plugin - true - - - org.apache.shiro.config.core - org.apache.shiro.config*;version=${project.version} - - org.apache.shiro*;version="${shiro.osgi.importRange}", - * - - - - - - - org.apache.shiro diff --git a/config/ogdl/pom.xml b/config/ogdl/pom.xml index 9dc88859c7..5e062da870 100644 --- a/config/ogdl/pom.xml +++ b/config/ogdl/pom.xml @@ -31,7 +31,6 @@ Apache Shiro :: Configuration :: OGDL Support for Shiro's Object Graph Definition Language (mostly used in Ini configuration) where declared name/value pairs are interpreted to create an object graph - bundle @@ -47,21 +46,6 @@ - - org.apache.felix - maven-bundle-plugin - true - - - org.apache.shiro.config.core - org.apache.shiro.config*;version=${project.version} - - org.apache.shiro*;version="${shiro.osgi.importRange}", - * - - - - diff --git a/core/pom.xml b/core/pom.xml index 6761d26cd3..f4be55b047 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -55,7 +55,6 @@ org.apache.shiro*;version=${project.version} org.apache.shiro*;version="${shiro.osgi.importRange}", - org.apache.commons.beanutils*;resolution:=optional, * @@ -93,6 +92,14 @@ org.apache.shiro shiro-event + + commons-beanutils + commons-beanutils + + + org.slf4j + slf4j-api + diff --git a/crypto/cipher/pom.xml b/crypto/cipher/pom.xml index e64d75173f..c9955e5bd0 100644 --- a/crypto/cipher/pom.xml +++ b/crypto/cipher/pom.xml @@ -29,27 +29,6 @@ 4.0.0 shiro-crypto-cipher Apache Shiro :: Cryptography :: Ciphers - bundle - - - - - org.apache.felix - maven-bundle-plugin - true - - - org.apache.shiro.crypto.cipher - org.apache.shiro.crypto.*;version=${project.version} - - org.apache.shiro.crypto**;version="${shiro.osgi.importRange}", - * - - - - - - diff --git a/crypto/core/pom.xml b/crypto/core/pom.xml index 5592f46b98..982c34d54e 100644 --- a/crypto/core/pom.xml +++ b/crypto/core/pom.xml @@ -29,27 +29,6 @@ 4.0.0 shiro-crypto-core Apache Shiro :: Cryptography :: Core - bundle - - - - - org.apache.felix - maven-bundle-plugin - true - - - org.apache.shiro.crypto.core - org.apache.shiro.crypto*;version=${project.version} - - org.apache.shiro.crypto*;version="${shiro.osgi.importRange}", - * - - - - - - diff --git a/crypto/hash/pom.xml b/crypto/hash/pom.xml index 4944d20ad3..8bd435a043 100644 --- a/crypto/hash/pom.xml +++ b/crypto/hash/pom.xml @@ -29,27 +29,6 @@ 4.0.0 shiro-crypto-hash Apache Shiro :: Cryptography :: Hashing - bundle - - - - - org.apache.felix - maven-bundle-plugin - true - - - org.apache.shiro.crypto.hash - org.apache.shiro.crypto.hash*;version=${project.version} - - org.apache.shiro.crypto.core*;version="${shiro.osgi.importRange}", - * - - - - - - diff --git a/event/pom.xml b/event/pom.xml index c08d56c804..8333031eb8 100644 --- a/event/pom.xml +++ b/event/pom.xml @@ -29,27 +29,6 @@ 4.0.0 shiro-event Apache Shiro :: Event - bundle - - - - - org.apache.felix - maven-bundle-plugin - true - - - org.apache.shiro.event - org.apache.shiro.event*;version=${project.version} - - org.apache.shiro*;version="${shiro.osgi.importRange}", - * - - - - - - diff --git a/integration-tests/support/pom.xml b/integration-tests/support/pom.xml index 789d72a419..0c2f75fdb6 100644 --- a/integration-tests/support/pom.xml +++ b/integration-tests/support/pom.xml @@ -30,16 +30,6 @@ Apache Shiro :: ITs :: Support - - javax.servlet - jstl - compile - - - javax.servlet - javax.servlet-api - provided - org.slf4j slf4j-log4j12 @@ -61,17 +51,6 @@ net.sourceforge.htmlunit htmlunit - - org.eclipse.jetty - apache-jsp - ${jetty.version} - - - org.eclipse.jetty - apache-jstl - ${jetty.version} - pom - com.github.mjeanroy junit-servers-jetty diff --git a/lang/pom.xml b/lang/pom.xml index 6787ee7989..416539c851 100644 --- a/lang/pom.xml +++ b/lang/pom.xml @@ -34,7 +34,6 @@ The lang module encapsulates only language-specific utilities that are used by various other modules. It exists to augment what we would have liked to see in the JDK but does not exist. - bundle @@ -52,27 +51,4 @@ log4j - - - - - org.apache.felix - maven-bundle-plugin - true - - - org.apache.shiro.lang - org.apache.shiro.*;version=${project.version} - - - org.apache.shiro*;version="${shiro.osgi.importRange}", - javax.servlet.jsp*;resolution:=optional, - * - - - - - - - diff --git a/pom.xml b/pom.xml index 10527df22e..967877c6ed 100644 --- a/pom.xml +++ b/pom.xml @@ -229,7 +229,7 @@ org.apache.felix maven-bundle-plugin - 3.2.0 + 3.4.0 org.apache.maven.plugins @@ -555,6 +555,37 @@ apache.releases.https + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M1 + + + enforce-ban-duplicate-classes + + enforce + + + + + true + + compile + + + + true + + + + + + org.codehaus.mojo + extra-enforcer-rules + 1.0-beta-6 + + + @@ -618,6 +649,40 @@ org.apache.shiro shiro-core 1.4.1-SNAPSHOT + + + org.apache.shiro + shiro-config-core + + + org.apache.shiro + shiro-config-ogdl + + + org.apache.shiro + shiro-lang + + + org.apache.shiro + shiro-event + + + org.apache.shiro + shiro-crypto-core + + + org.apache.shiro + shiro-crypto-cipher + + + org.apache.shiro + shiro-crypto-hash + + + org.apache.shiro + shiro-cache + + org.apache.shiro @@ -752,6 +817,13 @@ junit junit ${junit.version} + + + + org.hamcrest + hamcrest-core + + diff --git a/samples/quickstart-guice/pom.xml b/samples/quickstart-guice/pom.xml index 4ec41925dd..4485f3a3f9 100644 --- a/samples/quickstart-guice/pom.xml +++ b/samples/quickstart-guice/pom.xml @@ -61,6 +61,10 @@ org.apache.shiro shiro-guice + + org.slf4j + slf4j-api + diff --git a/samples/quickstart/pom.xml b/samples/quickstart/pom.xml index 9441eece03..1c36dfcac2 100644 --- a/samples/quickstart/pom.xml +++ b/samples/quickstart/pom.xml @@ -61,6 +61,10 @@ + + org.slf4j + slf4j-api + org.slf4j jcl-over-slf4j diff --git a/support/aspectj/pom.xml b/support/aspectj/pom.xml index d4bbd93d99..fc11275770 100644 --- a/support/aspectj/pom.xml +++ b/support/aspectj/pom.xml @@ -38,11 +38,15 @@ org.aspectj - aspectjrt + aspectjweaver + + commons-beanutils + commons-beanutils + - org.aspectj - aspectjweaver + org.slf4j + slf4j-api diff --git a/support/ehcache/pom.xml b/support/ehcache/pom.xml index 32c6f28ea4..ad6563f5bd 100644 --- a/support/ehcache/pom.xml +++ b/support/ehcache/pom.xml @@ -34,7 +34,7 @@ org.apache.shiro - shiro-cache + shiro-core net.sf.ehcache diff --git a/support/guice/pom.xml b/support/guice/pom.xml index 159058ccfa..4819a6c97b 100644 --- a/support/guice/pom.xml +++ b/support/guice/pom.xml @@ -54,6 +54,10 @@ guice-servlet true + + commons-beanutils + commons-beanutils + javax.servlet javax.servlet-api diff --git a/support/hazelcast/pom.xml b/support/hazelcast/pom.xml index 84d1eb2602..49e1bde672 100644 --- a/support/hazelcast/pom.xml +++ b/support/hazelcast/pom.xml @@ -38,7 +38,7 @@ org.apache.shiro - shiro-cache + shiro-core com.hazelcast diff --git a/support/quartz/pom.xml b/support/quartz/pom.xml index 7a8e07e119..8a110c1d64 100644 --- a/support/quartz/pom.xml +++ b/support/quartz/pom.xml @@ -40,6 +40,10 @@ org.opensymphony.quartz quartz + + org.slf4j + slf4j-api + org.slf4j diff --git a/test-coverage/pom.xml b/test-coverage/pom.xml index 697380fec8..4709148ea6 100644 --- a/test-coverage/pom.xml +++ b/test-coverage/pom.xml @@ -32,38 +32,10 @@ pom - - org.apache.shiro - shiro-lang - org.apache.shiro shiro-core - - org.apache.shiro - shiro-event - - - org.apache.shiro - shiro-config-core - - - org.apache.shiro - shiro-config-ogdl - - - org.apache.shiro - shiro-crypto-cipher - - - org.apache.shiro - shiro-crypto-hash - - - org.apache.shiro - shiro-crypto-core - org.apache.shiro shiro-web @@ -79,12 +51,14 @@ org.apache.shiro shiro-cas + + + javax.servlet + servlet-api + + - - org.apache.shiro - shiro-cache - org.apache.shiro shiro-ehcache @@ -97,6 +71,12 @@ org.apache.shiro shiro-guice + + + aopalliance + aopalliance + + org.apache.shiro diff --git a/web/pom.xml b/web/pom.xml index 61fab4f7a6..88679b54ad 100644 --- a/web/pom.xml +++ b/web/pom.xml @@ -62,6 +62,10 @@ test-jar test + + org.slf4j + slf4j-api + org.slf4j jcl-over-slf4j