From 537ff689e7e39ce7ca4d9f0b94abcece5ee7c569 Mon Sep 17 00:00:00 2001 From: Brett Porter Date: Sat, 14 Mar 2009 02:33:57 +0000 Subject: [PATCH] [MRM-1140] centralise logging through slf4j git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@753590 13f79535-47bb-0310-9956-ffa450edef68 --- archiva-cli/pom.xml | 23 ++++-- .../archiva-artifact-converter/pom.xml | 5 ++ .../archiva-base/archiva-checksum/pom.xml | 5 ++ .../archiva-configuration/pom.xml | 5 ++ .../src/test/resources/log4j.properties | 10 --- .../archiva-core-consumers/pom.xml | 5 ++ .../archiva-database-consumers/pom.xml | 5 ++ .../archiva-dependency-tree-consumer/pom.xml | 5 ++ .../archiva-lucene-consumers/pom.xml | 5 ++ .../archiva-base/archiva-converter/pom.xml | 5 ++ .../src/test/resources/log4j.properties | 10 --- .../archiva-dependency-graph/pom.xml | 5 ++ .../archiva-base/archiva-indexer/pom.xml | 5 ++ .../src/test/resources/log4j.xml | 76 ------------------- .../archiva-base/archiva-model/pom.xml | 10 +++ .../src/test/resources/log4j.xml | 76 ------------------- .../archiva-base/archiva-policies/pom.xml | 10 +++ .../PropagateErrorsDownloadPolicy.java | 7 +- ...PropagateErrorsOnUpdateDownloadPolicy.java | 6 +- .../src/test/resources/log4j.xml | 55 -------------- .../archiva-base/archiva-proxy/pom.xml | 5 ++ .../src/test/resources/log4j.xml | 47 ------------ .../archiva-repository-layer/pom.xml | 5 ++ .../src/test/resources/log4j.xml | 40 ---------- .../archiva-base/archiva-transaction/pom.xml | 10 +++ archiva-modules/archiva-database/pom.xml | 9 ++- .../src/test/resources/log4j.xml | 76 ------------------- .../archiva-artifact-reports/pom.xml | 5 ++ .../src/test/resources/log4j.xml | 76 ------------------- .../archiva-report-manager/pom.xml | 5 ++ .../src/test/resources/log4j.properties | 10 --- archiva-modules/archiva-scheduled/pom.xml | 5 ++ .../src/test/resources/log4j.xml | 47 ------------ .../archiva-web/archiva-rss/pom.xml | 5 ++ .../archiva-web/archiva-security/pom.xml | 5 ++ .../src/test/resources/log4j.properties | 10 --- .../archiva-web/archiva-webapp/pom.xml | 6 ++ .../archiva/web/action/BrowseAction.java | 10 +-- .../web/action/PlexusActionSupport.java | 24 ++---- .../archiva/web/action/SearchAction.java | 6 +- .../web/action/ShowArtifactAction.java | 8 +- .../archiva/web/action/UploadAction.java | 6 +- .../web/action/admin/SchedulerAction.java | 4 +- .../action/admin/database/DatabaseAction.java | 2 +- .../DeleteLegacyArtifactPathAction.java | 2 +- .../AbstractManagedRepositoriesAction.java | 2 +- .../DeleteManagedRepositoryAction.java | 6 +- .../scanning/RepositoryScanningAction.java | 8 +- .../src/test/resources/log4j.xml | 55 -------------- .../web/action/ShowArtifactActionTest.xml | 5 -- .../proxy/AddProxyConnectorActionTest.xml | 6 -- .../proxy/EditProxyConnectorActionTest.xml | 6 -- .../AbstractManagedRepositoriesActionTest.xml | 6 -- .../DeleteManagedRepositoryActionTest.xml | 5 -- .../repositories/RepositoriesActionTest.xml | 5 -- .../archiva/web/rss/RssFeedServletTest.xml | 39 ++++------ .../archiva-web/archiva-webdav/pom.xml | 9 ++- .../maven/archiva/webdav/util/MimeTypes.java | 24 +++--- .../src/test/resources/log4j.xml | 55 -------------- .../webdav/RepositoryServletSecurityTest.xml | 12 +-- .../archiva/webdav/RepositoryServletTest.xml | 9 --- .../archiva-xmlrpc-client/pom.xml | 47 +++++------- .../archiva-xmlrpc-security/pom.xml | 5 ++ .../archiva-xmlrpc-services/pom.xml | 5 ++ pom.xml | 27 +++---- 65 files changed, 259 insertions(+), 838 deletions(-) delete mode 100644 archiva-modules/archiva-base/archiva-configuration/src/test/resources/log4j.properties delete mode 100644 archiva-modules/archiva-base/archiva-converter/src/test/resources/log4j.properties delete mode 100644 archiva-modules/archiva-base/archiva-indexer/src/test/resources/log4j.xml delete mode 100644 archiva-modules/archiva-base/archiva-model/src/test/resources/log4j.xml delete mode 100644 archiva-modules/archiva-base/archiva-policies/src/test/resources/log4j.xml delete mode 100644 archiva-modules/archiva-base/archiva-proxy/src/test/resources/log4j.xml delete mode 100644 archiva-modules/archiva-base/archiva-repository-layer/src/test/resources/log4j.xml delete mode 100644 archiva-modules/archiva-database/src/test/resources/log4j.xml delete mode 100644 archiva-modules/archiva-reporting/archiva-artifact-reports/src/test/resources/log4j.xml delete mode 100644 archiva-modules/archiva-reporting/archiva-report-manager/src/test/resources/log4j.properties delete mode 100644 archiva-modules/archiva-scheduled/src/test/resources/log4j.xml delete mode 100644 archiva-modules/archiva-web/archiva-security/src/test/resources/log4j.properties delete mode 100644 archiva-modules/archiva-web/archiva-webapp/src/test/resources/log4j.xml delete mode 100644 archiva-modules/archiva-web/archiva-webdav/src/test/resources/log4j.xml diff --git a/archiva-cli/pom.xml b/archiva-cli/pom.xml index 70f20a3ce..a18f2ff8a 100644 --- a/archiva-cli/pom.xml +++ b/archiva-cli/pom.xml @@ -55,11 +55,6 @@ cli 7 - - org.slf4j - slf4j-log4j12 - runtime - org.codehaus.plexus plexus-spring @@ -67,6 +62,12 @@ org.slf4j jcl104-over-slf4j + compile + + + org.slf4j + slf4j-log4j12 + compile @@ -74,7 +75,7 @@ org.apache.maven.plugins maven-shade-plugin - 1.0.1 + 1.2 package @@ -111,6 +112,16 @@ + + org.codehaus.mojo + exec-maven-plugin + + java + org.apache.maven.archiva.cli.ArchivaCli + + + + diff --git a/archiva-modules/archiva-base/archiva-artifact-converter/pom.xml b/archiva-modules/archiva-base/archiva-artifact-converter/pom.xml index 2a3232fa4..72d7f5598 100644 --- a/archiva-modules/archiva-base/archiva-artifact-converter/pom.xml +++ b/archiva-modules/archiva-base/archiva-artifact-converter/pom.xml @@ -53,6 +53,11 @@ org.apache.maven.shared maven-model-converter + + org.slf4j + slf4j-simple + test + diff --git a/archiva-modules/archiva-base/archiva-checksum/pom.xml b/archiva-modules/archiva-base/archiva-checksum/pom.xml index 0764fcc12..2973a6170 100644 --- a/archiva-modules/archiva-base/archiva-checksum/pom.xml +++ b/archiva-modules/archiva-base/archiva-checksum/pom.xml @@ -43,6 +43,11 @@ org.slf4j slf4j-api + + org.slf4j + slf4j-simple + test + commons-lang commons-lang diff --git a/archiva-modules/archiva-base/archiva-configuration/pom.xml b/archiva-modules/archiva-base/archiva-configuration/pom.xml index e262e2beb..805d5a2d5 100644 --- a/archiva-modules/archiva-base/archiva-configuration/pom.xml +++ b/archiva-modules/archiva-base/archiva-configuration/pom.xml @@ -58,6 +58,11 @@ xmlunit test + + org.slf4j + slf4j-simple + test + diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/resources/log4j.properties b/archiva-modules/archiva-base/archiva-configuration/src/test/resources/log4j.properties deleted file mode 100644 index 6d107570b..000000000 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/resources/log4j.properties +++ /dev/null @@ -1,10 +0,0 @@ -# Set root logger level to DEBUG and its only appender to A1. -log4j.rootLogger=INFO, A1 - -# A1 is set to be a ConsoleAppender. -log4j.appender.A1=org.apache.log4j.ConsoleAppender - -# A1 uses PatternLayout. -log4j.appender.A1.layout=org.apache.log4j.PatternLayout -log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n - diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml index 538c0cd4d..b620b3b13 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml @@ -51,6 +51,11 @@ + + org.slf4j + slf4j-simple + test + hsqldb hsqldb diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-database-consumers/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-database-consumers/pom.xml index 798ee845a..270e04f47 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-database-consumers/pom.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-database-consumers/pom.xml @@ -63,5 +63,10 @@ hsqldb test + + org.slf4j + slf4j-simple + test + diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-dependency-tree-consumer/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-dependency-tree-consumer/pom.xml index c675a7c6a..d1a78a39d 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-dependency-tree-consumer/pom.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-dependency-tree-consumer/pom.xml @@ -43,5 +43,10 @@ xmlunit test + + org.slf4j + slf4j-simple + test + diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml index cc346c218..616aadbd5 100644 --- a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml +++ b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml @@ -59,5 +59,10 @@ bcel 5.2 + + org.slf4j + slf4j-simple + test + diff --git a/archiva-modules/archiva-base/archiva-converter/pom.xml b/archiva-modules/archiva-base/archiva-converter/pom.xml index 2c0813c8f..e30c4d9e2 100644 --- a/archiva-modules/archiva-base/archiva-converter/pom.xml +++ b/archiva-modules/archiva-base/archiva-converter/pom.xml @@ -49,5 +49,10 @@ plexus-spring test + + org.slf4j + slf4j-simple + test + diff --git a/archiva-modules/archiva-base/archiva-converter/src/test/resources/log4j.properties b/archiva-modules/archiva-base/archiva-converter/src/test/resources/log4j.properties deleted file mode 100644 index 9b2c26ade..000000000 --- a/archiva-modules/archiva-base/archiva-converter/src/test/resources/log4j.properties +++ /dev/null @@ -1,10 +0,0 @@ -# Set root logger level to DEBUG and its only appender to A1. -log4j.rootLogger=WARN, A1 - -# A1 is set to be a ConsoleAppender. -log4j.appender.A1=org.apache.log4j.ConsoleAppender - -# A1 uses PatternLayout. -log4j.appender.A1.layout=org.apache.log4j.PatternLayout -log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n - diff --git a/archiva-modules/archiva-base/archiva-dependency-graph/pom.xml b/archiva-modules/archiva-base/archiva-dependency-graph/pom.xml index c95065013..741cd0f15 100644 --- a/archiva-modules/archiva-base/archiva-dependency-graph/pom.xml +++ b/archiva-modules/archiva-base/archiva-dependency-graph/pom.xml @@ -45,6 +45,11 @@ org.apache.archiva archiva-repository-layer + + org.slf4j + slf4j-simple + test + diff --git a/archiva-modules/archiva-base/archiva-indexer/pom.xml b/archiva-modules/archiva-base/archiva-indexer/pom.xml index a5eb3227d..a0d7681f9 100644 --- a/archiva-modules/archiva-base/archiva-indexer/pom.xml +++ b/archiva-modules/archiva-base/archiva-indexer/pom.xml @@ -69,6 +69,11 @@ org.sonatype.nexus nexus-indexer + + org.slf4j + slf4j-simple + test + diff --git a/archiva-modules/archiva-base/archiva-indexer/src/test/resources/log4j.xml b/archiva-modules/archiva-base/archiva-indexer/src/test/resources/log4j.xml deleted file mode 100644 index a11494a31..000000000 --- a/archiva-modules/archiva-base/archiva-indexer/src/test/resources/log4j.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archiva-modules/archiva-base/archiva-model/pom.xml b/archiva-modules/archiva-base/archiva-model/pom.xml index 16288f304..23229135c 100755 --- a/archiva-modules/archiva-base/archiva-model/pom.xml +++ b/archiva-modules/archiva-base/archiva-model/pom.xml @@ -49,6 +49,16 @@ javax.jdo jdo2-api + + org.slf4j + slf4j-simple + test + + + org.slf4j + jcl104-over-slf4j + runtime + diff --git a/archiva-modules/archiva-base/archiva-model/src/test/resources/log4j.xml b/archiva-modules/archiva-base/archiva-model/src/test/resources/log4j.xml deleted file mode 100644 index 395941ac3..000000000 --- a/archiva-modules/archiva-base/archiva-model/src/test/resources/log4j.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archiva-modules/archiva-base/archiva-policies/pom.xml b/archiva-modules/archiva-base/archiva-policies/pom.xml index 0e8c2e01e..ac5f13f09 100644 --- a/archiva-modules/archiva-base/archiva-policies/pom.xml +++ b/archiva-modules/archiva-base/archiva-policies/pom.xml @@ -49,6 +49,16 @@ org.codehaus.plexus.cache plexus-cache-ehcache + + org.slf4j + slf4j-simple + test + + + org.slf4j + jcl104-over-slf4j + runtime + diff --git a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/maven/archiva/policies/PropagateErrorsDownloadPolicy.java b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/maven/archiva/policies/PropagateErrorsDownloadPolicy.java index cca1c6750..76b688f21 100644 --- a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/maven/archiva/policies/PropagateErrorsDownloadPolicy.java +++ b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/maven/archiva/policies/PropagateErrorsDownloadPolicy.java @@ -21,6 +21,8 @@ package org.apache.maven.archiva.policies; import org.apache.commons.lang.StringUtils; import org.codehaus.plexus.logging.AbstractLogEnabled; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.File; import java.util.ArrayList; @@ -35,9 +37,10 @@ import java.util.Properties; * role-hint="propagate-errors" */ public class PropagateErrorsDownloadPolicy - extends AbstractLogEnabled implements DownloadErrorPolicy { + private Logger log = LoggerFactory.getLogger( PropagateErrorsDownloadPolicy.class ); + /** * Signifies any error should stop searching for other proxies. */ @@ -76,7 +79,7 @@ public class PropagateErrorsDownloadPolicy if ( IGNORE.equals( policySetting ) ) { // Ignore. - getLogger().debug( "Error policy set to IGNORE." ); + log.debug( "Error policy set to IGNORE." ); return false; } diff --git a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/maven/archiva/policies/PropagateErrorsOnUpdateDownloadPolicy.java b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/maven/archiva/policies/PropagateErrorsOnUpdateDownloadPolicy.java index d2b471af3..9e20ba524 100644 --- a/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/maven/archiva/policies/PropagateErrorsOnUpdateDownloadPolicy.java +++ b/archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/maven/archiva/policies/PropagateErrorsOnUpdateDownloadPolicy.java @@ -19,15 +19,14 @@ package org.apache.maven.archiva.policies; * under the License. */ -import org.apache.commons.lang.StringUtils; -import org.codehaus.plexus.logging.AbstractLogEnabled; - import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Properties; +import org.apache.commons.lang.StringUtils; + /** * PropagateErrorsPolicy - a policy applied on error to determine how to treat the error. * @@ -35,7 +34,6 @@ import java.util.Properties; * role-hint="propagate-errors-on-update" */ public class PropagateErrorsOnUpdateDownloadPolicy - extends AbstractLogEnabled implements DownloadErrorPolicy { /** diff --git a/archiva-modules/archiva-base/archiva-policies/src/test/resources/log4j.xml b/archiva-modules/archiva-base/archiva-policies/src/test/resources/log4j.xml deleted file mode 100644 index 9bb5e1e5a..000000000 --- a/archiva-modules/archiva-base/archiva-policies/src/test/resources/log4j.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archiva-modules/archiva-base/archiva-proxy/pom.xml b/archiva-modules/archiva-base/archiva-proxy/pom.xml index f4b39942a..a5a21015e 100644 --- a/archiva-modules/archiva-base/archiva-proxy/pom.xml +++ b/archiva-modules/archiva-base/archiva-proxy/pom.xml @@ -84,6 +84,11 @@ ${wagon.version} test + + org.slf4j + slf4j-simple + test + diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/resources/log4j.xml b/archiva-modules/archiva-base/archiva-proxy/src/test/resources/log4j.xml deleted file mode 100644 index 901c99f33..000000000 --- a/archiva-modules/archiva-base/archiva-proxy/src/test/resources/log4j.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archiva-modules/archiva-base/archiva-repository-layer/pom.xml b/archiva-modules/archiva-base/archiva-repository-layer/pom.xml index 67c967173..e8ebd8734 100644 --- a/archiva-modules/archiva-base/archiva-repository-layer/pom.xml +++ b/archiva-modules/archiva-base/archiva-repository-layer/pom.xml @@ -66,6 +66,11 @@ plexus-spring test + + org.slf4j + slf4j-simple + test + diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/test/resources/log4j.xml b/archiva-modules/archiva-base/archiva-repository-layer/src/test/resources/log4j.xml deleted file mode 100644 index 23d4d08d6..000000000 --- a/archiva-modules/archiva-base/archiva-repository-layer/src/test/resources/log4j.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archiva-modules/archiva-base/archiva-transaction/pom.xml b/archiva-modules/archiva-base/archiva-transaction/pom.xml index c9655ca90..7c9bae559 100644 --- a/archiva-modules/archiva-base/archiva-transaction/pom.xml +++ b/archiva-modules/archiva-base/archiva-transaction/pom.xml @@ -49,5 +49,15 @@ org.codehaus.plexus plexus-component-api + + org.slf4j + slf4j-simple + test + + + org.slf4j + jcl104-over-slf4j + runtime + diff --git a/archiva-modules/archiva-database/pom.xml b/archiva-modules/archiva-database/pom.xml index 097c4e3c5..7e5e1d23b 100755 --- a/archiva-modules/archiva-database/pom.xml +++ b/archiva-modules/archiva-database/pom.xml @@ -70,10 +70,6 @@ commons-io commons-io - - log4j - log4j - org.codehaus.plexus.registry @@ -90,6 +86,11 @@ derbytools test + + org.slf4j + slf4j-simple + test + diff --git a/archiva-modules/archiva-database/src/test/resources/log4j.xml b/archiva-modules/archiva-database/src/test/resources/log4j.xml deleted file mode 100644 index 395941ac3..000000000 --- a/archiva-modules/archiva-database/src/test/resources/log4j.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archiva-modules/archiva-reporting/archiva-artifact-reports/pom.xml b/archiva-modules/archiva-reporting/archiva-artifact-reports/pom.xml index 30969cb23..0d48e19a8 100755 --- a/archiva-modules/archiva-reporting/archiva-artifact-reports/pom.xml +++ b/archiva-modules/archiva-reporting/archiva-artifact-reports/pom.xml @@ -59,5 +59,10 @@ hsqldb test + + org.slf4j + slf4j-simple + test + diff --git a/archiva-modules/archiva-reporting/archiva-artifact-reports/src/test/resources/log4j.xml b/archiva-modules/archiva-reporting/archiva-artifact-reports/src/test/resources/log4j.xml deleted file mode 100644 index 395941ac3..000000000 --- a/archiva-modules/archiva-reporting/archiva-artifact-reports/src/test/resources/log4j.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archiva-modules/archiva-reporting/archiva-report-manager/pom.xml b/archiva-modules/archiva-reporting/archiva-report-manager/pom.xml index cf94e84b8..89d6a61f8 100755 --- a/archiva-modules/archiva-reporting/archiva-report-manager/pom.xml +++ b/archiva-modules/archiva-reporting/archiva-report-manager/pom.xml @@ -53,6 +53,11 @@ plexus-spring test + + org.slf4j + slf4j-simple + test + diff --git a/archiva-modules/archiva-reporting/archiva-report-manager/src/test/resources/log4j.properties b/archiva-modules/archiva-reporting/archiva-report-manager/src/test/resources/log4j.properties deleted file mode 100644 index 9b2c26ade..000000000 --- a/archiva-modules/archiva-reporting/archiva-report-manager/src/test/resources/log4j.properties +++ /dev/null @@ -1,10 +0,0 @@ -# Set root logger level to DEBUG and its only appender to A1. -log4j.rootLogger=WARN, A1 - -# A1 is set to be a ConsoleAppender. -log4j.appender.A1=org.apache.log4j.ConsoleAppender - -# A1 uses PatternLayout. -log4j.appender.A1.layout=org.apache.log4j.PatternLayout -log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n - diff --git a/archiva-modules/archiva-scheduled/pom.xml b/archiva-modules/archiva-scheduled/pom.xml index ddaa5a251..fb729fbeb 100644 --- a/archiva-modules/archiva-scheduled/pom.xml +++ b/archiva-modules/archiva-scheduled/pom.xml @@ -81,6 +81,11 @@ plexus-registry-commons test + + org.slf4j + slf4j-simple + test + diff --git a/archiva-modules/archiva-scheduled/src/test/resources/log4j.xml b/archiva-modules/archiva-scheduled/src/test/resources/log4j.xml deleted file mode 100644 index 3c782b138..000000000 --- a/archiva-modules/archiva-scheduled/src/test/resources/log4j.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archiva-modules/archiva-web/archiva-rss/pom.xml b/archiva-modules/archiva-web/archiva-rss/pom.xml index be70c4a21..b59182f7e 100644 --- a/archiva-modules/archiva-web/archiva-rss/pom.xml +++ b/archiva-modules/archiva-web/archiva-rss/pom.xml @@ -41,5 +41,10 @@ xmlunit test + + org.slf4j + slf4j-simple + test + diff --git a/archiva-modules/archiva-web/archiva-security/pom.xml b/archiva-modules/archiva-web/archiva-security/pom.xml index 13cc1d8b5..e4c410a21 100644 --- a/archiva-modules/archiva-web/archiva-security/pom.xml +++ b/archiva-modules/archiva-web/archiva-security/pom.xml @@ -79,5 +79,10 @@ redback-rbac-memory test + + org.slf4j + slf4j-simple + test + diff --git a/archiva-modules/archiva-web/archiva-security/src/test/resources/log4j.properties b/archiva-modules/archiva-web/archiva-security/src/test/resources/log4j.properties deleted file mode 100644 index 6d107570b..000000000 --- a/archiva-modules/archiva-web/archiva-security/src/test/resources/log4j.properties +++ /dev/null @@ -1,10 +0,0 @@ -# Set root logger level to DEBUG and its only appender to A1. -log4j.rootLogger=INFO, A1 - -# A1 is set to be a ConsoleAppender. -log4j.appender.A1=org.apache.log4j.ConsoleAppender - -# A1 uses PatternLayout. -log4j.appender.A1.layout=org.apache.log4j.PatternLayout -log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n - diff --git a/archiva-modules/archiva-web/archiva-webapp/pom.xml b/archiva-modules/archiva-web/archiva-webapp/pom.xml index 4fb54638a..ccdbe7130 100644 --- a/archiva-modules/archiva-web/archiva-webapp/pom.xml +++ b/archiva-modules/archiva-web/archiva-webapp/pom.xml @@ -130,6 +130,12 @@ org.slf4j slf4j-log4j12 + runtime + + + httpunit + httpunit + test commons-lang diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/BrowseAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/BrowseAction.java index d2692cb08..aebfb1527 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/BrowseAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/BrowseAction.java @@ -195,11 +195,11 @@ public class BrowseAction } catch ( ObjectNotFoundException e ) { - getLogger().debug( e.getMessage(), e ); + log.debug( e.getMessage(), e ); } catch ( ArchivaDatabaseException e ) { - getLogger().debug( e.getMessage(), e ); + log.debug( e.getMessage(), e ); } } } @@ -217,16 +217,16 @@ public class BrowseAction } catch ( PrincipalNotFoundException e ) { - getLogger().warn( e.getMessage(), e ); + log.warn( e.getMessage(), e ); } catch ( AccessDeniedException e ) { - getLogger().warn( e.getMessage(), e ); + log.warn( e.getMessage(), e ); // TODO: pass this onto the screen. } catch ( ArchivaSecurityException e ) { - getLogger().warn( e.getMessage(), e ); + log.warn( e.getMessage(), e ); } return Collections.emptyList(); } diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/PlexusActionSupport.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/PlexusActionSupport.java index d68b6be40..de6e508c5 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/PlexusActionSupport.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/PlexusActionSupport.java @@ -19,36 +19,28 @@ package org.apache.maven.archiva.web.action; * under the License. */ -import com.opensymphony.xwork2.ActionSupport; import java.util.Map; + import org.apache.struts2.interceptor.SessionAware; -import org.codehaus.plexus.logging.LogEnabled; -import org.codehaus.plexus.logging.Logger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.opensymphony.xwork2.ActionSupport; /** * LogEnabled and SessionAware ActionSupport */ public abstract class PlexusActionSupport extends ActionSupport - implements LogEnabled, SessionAware + implements SessionAware { protected Map session; - private Logger logger; - + protected Logger log = LoggerFactory.getLogger( getClass() ); + public void setSession( Map map ) { //noinspection AssignmentToCollectionOrArrayFieldFromParameter this.session = map; } - - public void enableLogging( Logger logger ) - { - this.logger = logger; - } - - protected Logger getLogger() - { - return logger; - } } diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java index 6cbe7e483..c5d017bf7 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java @@ -413,15 +413,15 @@ public class SearchAction } catch ( PrincipalNotFoundException e ) { - getLogger().warn( e.getMessage(), e ); + log.warn( e.getMessage(), e ); } catch ( AccessDeniedException e ) { - getLogger().warn( e.getMessage(), e ); + log.warn( e.getMessage(), e ); } catch ( ArchivaSecurityException e ) { - getLogger().warn( e.getMessage(), e ); + log.warn( e.getMessage(), e ); } return Collections.emptyList(); } diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java index aef774310..9525c7f53 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java @@ -129,7 +129,7 @@ public class ShowArtifactAction } catch ( ObjectNotFoundException e ) { - getLogger().debug( e.getMessage(), e ); + log.debug( e.getMessage(), e ); addActionError( e.getMessage() ); return ERROR; } @@ -213,16 +213,16 @@ public class ShowArtifactAction } catch ( PrincipalNotFoundException e ) { - getLogger().warn( e.getMessage(), e ); + log.warn( e.getMessage(), e ); } catch ( AccessDeniedException e ) { - getLogger().warn( e.getMessage(), e ); + log.warn( e.getMessage(), e ); // TODO: pass this onto the screen. } catch ( ArchivaSecurityException e ) { - getLogger().warn( e.getMessage(), e ); + log.warn( e.getMessage(), e ); } return Collections.emptyList(); } diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java index 242436882..9cc6b5a1a 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java @@ -630,16 +630,16 @@ public class UploadAction } catch ( PrincipalNotFoundException e ) { - getLogger().warn( e.getMessage(), e ); + log.warn( e.getMessage(), e ); } catch ( AccessDeniedException e ) { - getLogger().warn( e.getMessage(), e ); + log.warn( e.getMessage(), e ); // TODO: pass this onto the screen. } catch ( ArchivaSecurityException e ) { - getLogger().warn( e.getMessage(), e ); + log.warn( e.getMessage(), e ); } return Collections.emptyList(); } diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/SchedulerAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/SchedulerAction.java index a3df57d2d..fa10c51dd 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/SchedulerAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/SchedulerAction.java @@ -157,14 +157,14 @@ public class SchedulerAction public void addActionMessage( String aMessage ) { super.addActionMessage( aMessage ); - getLogger().info( "[ActionMessage] " + aMessage ); + log.info( "[ActionMessage] " + aMessage ); } @Override public void addActionError( String anErrorMessage ) { super.addActionError( anErrorMessage ); - getLogger().warn( "[ActionError] " + anErrorMessage ); + log.warn( "[ActionError] " + anErrorMessage ); } public SecureActionBundle getSecureActionBundle() diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/database/DatabaseAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/database/DatabaseAction.java index 5d83d959a..0bd57b4f0 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/database/DatabaseAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/database/DatabaseAction.java @@ -132,7 +132,7 @@ public class DatabaseAction } catch ( RegistryException e ) { - getLogger().error( e.getMessage(), e ); + log.error( e.getMessage(), e ); addActionError( "Error in saving configuration" ); return INPUT; } diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/legacy/DeleteLegacyArtifactPathAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/legacy/DeleteLegacyArtifactPathAction.java index 5829e61c0..e337a23db 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/legacy/DeleteLegacyArtifactPathAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/legacy/DeleteLegacyArtifactPathAction.java @@ -47,7 +47,7 @@ public class DeleteLegacyArtifactPathAction public String delete() { - getLogger().info( "remove [" + path + "] from legacy artifact path resolution" ); + log.info( "remove [" + path + "] from legacy artifact path resolution" ); Configuration configuration = archivaConfiguration.getConfiguration(); for ( Iterator iterator = configuration.getLegacyArtifactPaths().iterator(); iterator.hasNext(); ) { diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesAction.java index 1bcba9577..c0e724efd 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesAction.java @@ -123,6 +123,6 @@ public abstract class AbstractManagedRepositoriesAction roleManager.removeTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, repoId ); } - getLogger().debug( "removed user roles associated with repository " + repoId ); + log.debug( "removed user roles associated with repository " + repoId ); } } diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryAction.java index 7efe7827b..2ef89df70 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryAction.java @@ -175,7 +175,7 @@ public class DeleteManagedRepositoryAction for ( ArchivaArtifact artifact : artifacts ) { - getLogger().info( "Removing artifact " + artifact + " from the database." ); + log.info( "Removing artifact " + artifact + " from the database." ); try { archivaDAO.getArtifactDAO().deleteArtifact( artifact ); @@ -188,12 +188,12 @@ public class DeleteManagedRepositoryAction } catch ( ObjectNotFoundException oe ) { - getLogger().info( "Project model of artifact " + artifact + " does not exist in the database. " + + log.info( "Project model of artifact " + artifact + " does not exist in the database. " + "Moving on to the next artifact." ); } catch ( ArchivaDatabaseException ae ) { - getLogger().info( "Unable to delete artifact " + artifact + " from the database. " + + log.info( "Unable to delete artifact " + artifact + " from the database. " + "Moving on to the next artifact." ); } } diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/scanning/RepositoryScanningAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/scanning/RepositoryScanningAction.java index becb6d3c6..0d8086c1b 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/scanning/RepositoryScanningAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/scanning/RepositoryScanningAction.java @@ -96,18 +96,18 @@ public class RepositoryScanningAction public void addActionError( String anErrorMessage ) { super.addActionError( anErrorMessage ); - getLogger().warn( "[ActionError] " + anErrorMessage ); + log.warn( "[ActionError] " + anErrorMessage ); } public void addActionMessage( String aMessage ) { super.addActionMessage( aMessage ); - getLogger().info( "[ActionMessage] " + aMessage ); + log.info( "[ActionMessage] " + aMessage ); } public String addFiletypePattern() { - getLogger().info( "Add New File Type Pattern [" + getFileTypeId() + ":" + getPattern() + "]" ); + log.info( "Add New File Type Pattern [" + getFileTypeId() + ":" + getPattern() + "]" ); if ( !isValidFiletypeCommand() ) { @@ -207,7 +207,7 @@ public class RepositoryScanningAction public String removeFiletypePattern() { - getLogger().info( "Remove File Type Pattern [" + getFileTypeId() + ":" + getPattern() + "]" ); + log.info( "Remove File Type Pattern [" + getFileTypeId() + ":" + getPattern() + "]" ); if ( !isValidFiletypeCommand() ) { diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/log4j.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/log4j.xml deleted file mode 100644 index a2e7ea23d..000000000 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/log4j.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/ShowArtifactActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/ShowArtifactActionTest.xml index 81c5b43b6..d51572b7f 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/ShowArtifactActionTest.xml +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/ShowArtifactActionTest.xml @@ -19,11 +19,6 @@ - - org.codehaus.plexus.logging.LoggerManager - org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager - basic - org.apache.maven.archiva.database.ArchivaDAO jdo diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/AddProxyConnectorActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/AddProxyConnectorActionTest.xml index 924f07f7c..dc32d3f3d 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/AddProxyConnectorActionTest.xml +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/AddProxyConnectorActionTest.xml @@ -19,12 +19,6 @@ - - org.codehaus.plexus.logging.LoggerManager - org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager - basic - - org.codehaus.plexus.cache.Cache url-failures-cache diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/EditProxyConnectorActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/EditProxyConnectorActionTest.xml index 924f07f7c..dc32d3f3d 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/EditProxyConnectorActionTest.xml +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/EditProxyConnectorActionTest.xml @@ -19,12 +19,6 @@ - - org.codehaus.plexus.logging.LoggerManager - org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager - basic - - org.codehaus.plexus.cache.Cache url-failures-cache diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesActionTest.xml index 5feec48ed..afb64ee15 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesActionTest.xml +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesActionTest.xml @@ -19,12 +19,6 @@ - - org.codehaus.plexus.logging.LoggerManager - org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager - basic - - com.opensymphony.xwork2.Action addManagedRepositoryAction diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.xml index 40c33e013..f4d20ee61 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.xml +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.xml @@ -19,11 +19,6 @@ - - org.codehaus.plexus.logging.LoggerManager - org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager - basic - org.codehaus.plexus.redback.role.RoleManager default diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/RepositoriesActionTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/RepositoriesActionTest.xml index bffa41699..c09e524a2 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/RepositoriesActionTest.xml +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/RepositoriesActionTest.xml @@ -19,11 +19,6 @@ - - org.codehaus.plexus.logging.LoggerManager - org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager - basic - com.opensymphony.xwork2.Action repositoriesAction diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/rss/RssFeedServletTest.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/rss/RssFeedServletTest.xml index 33988de51..0fec42f00 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/rss/RssFeedServletTest.xml +++ b/archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/rss/RssFeedServletTest.xml @@ -20,31 +20,22 @@ - - org.codehaus.plexus.logging.LoggerManager - org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager - basic + org.apache.maven.archiva.database.ArtifactDAO + jdo + org.apache.maven.archiva.web.rss.ArtifactDAOStub + + + + org.codehaus.plexus.redback.system.SecuritySystem + default + org.apache.maven.archiva.web.rss.SecuritySystemStub + + + + org.apache.maven.archiva.security.UserRepositories + default + org.apache.maven.archiva.security.UserRepositoriesStub - - - org.apache.maven.archiva.database.ArtifactDAO - jdo - org.apache.maven.archiva.web.rss.ArtifactDAOStub - - - - org.codehaus.plexus.redback.system.SecuritySystem - default - org.apache.maven.archiva.web.rss.SecuritySystemStub - - - - org.apache.maven.archiva.security.UserRepositories - default - org.apache.maven.archiva.security.UserRepositoriesStub - diff --git a/archiva-modules/archiva-web/archiva-webdav/pom.xml b/archiva-modules/archiva-web/archiva-webdav/pom.xml index 2a825f08a..c9548b53a 100644 --- a/archiva-modules/archiva-web/archiva-webdav/pom.xml +++ b/archiva-modules/archiva-web/archiva-webdav/pom.xml @@ -109,8 +109,8 @@ test - org.codehaus.plexus - plexus-slf4j-logging + org.slf4j + slf4j-simple test @@ -129,5 +129,10 @@ + + httpunit + httpunit + test + diff --git a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/util/MimeTypes.java b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/util/MimeTypes.java index 8262ba553..731019cb3 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/util/MimeTypes.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/util/MimeTypes.java @@ -19,12 +19,6 @@ package org.apache.maven.archiva.webdav.util; * under the License. */ -import org.apache.commons.io.IOUtils; -import org.apache.commons.lang.StringUtils; -import org.codehaus.plexus.logging.AbstractLogEnabled; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; -import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; - import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; @@ -37,6 +31,13 @@ import java.util.HashMap; import java.util.Map; import java.util.StringTokenizer; +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; +import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; +import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + /** * MimeTypes * @@ -45,7 +46,6 @@ import java.util.StringTokenizer; * @plexus.component role="org.apache.maven.archiva.webdav.util.MimeTypes" */ public class MimeTypes - extends AbstractLogEnabled implements Initializable { private static final String DEFAULT_MIME_TYPE = "application/octet-stream"; @@ -54,6 +54,8 @@ public class MimeTypes private Map mimeMap = new HashMap(); + private Logger log = LoggerFactory.getLogger( MimeTypes.class ); + /** * Get the Mime Type for the provided filename. * @@ -93,7 +95,7 @@ public class MimeTypes { if ( !file.exists() || !file.isFile() || !file.canRead() ) { - getLogger().error( "Unable to load mime types from file " + file.getAbsolutePath() + " : not a readable file." ); + log.error( "Unable to load mime types from file " + file.getAbsolutePath() + " : not a readable file." ); return; } @@ -105,7 +107,7 @@ public class MimeTypes } catch ( FileNotFoundException e ) { - getLogger().error( "Unable to load mime types from file " + file.getAbsolutePath() + " : " + e.getMessage(), e ); + log.error( "Unable to load mime types from file " + file.getAbsolutePath() + " : " + e.getMessage(), e ); } finally { @@ -134,7 +136,7 @@ public class MimeTypes } catch ( IOException e ) { - getLogger().error( "Unable to load mime map " + resourceName + " : " + e.getMessage(), e ); + log.error( "Unable to load mime map " + resourceName + " : " + e.getMessage(), e ); } finally { @@ -185,7 +187,7 @@ public class MimeTypes } catch ( IOException e ) { - getLogger().error( "Unable to read mime types from input stream : " + e.getMessage(), e ); + log.error( "Unable to read mime types from input stream : " + e.getMessage(), e ); } finally { diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/resources/log4j.xml b/archiva-modules/archiva-web/archiva-webdav/src/test/resources/log4j.xml deleted file mode 100644 index a2e7ea23d..000000000 --- a/archiva-modules/archiva-web/archiva-webdav/src/test/resources/log4j.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/RepositoryServletSecurityTest.xml b/archiva-modules/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/RepositoryServletSecurityTest.xml index 7317210ef..b55a4e151 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/RepositoryServletSecurityTest.xml +++ b/archiva-modules/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/RepositoryServletSecurityTest.xml @@ -20,15 +20,6 @@ - - - org.codehaus.plexus.logging.LoggerManager - org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager - basic - - @@ -102,8 +93,7 @@ default org.codehaus.plexus.redback.system.DefaultSecuritySystem - - + org.apache.maven.archiva.webdav.ArchivaDavResourceFactory org.apache.maven.archiva.webdav.ArchivaDavResourceFactory diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/RepositoryServletTest.xml b/archiva-modules/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/RepositoryServletTest.xml index 8392c87c0..e73c0f41f 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/RepositoryServletTest.xml +++ b/archiva-modules/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/RepositoryServletTest.xml @@ -20,15 +20,6 @@ - - - org.codehaus.plexus.logging.LoggerManager - org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager - basic - - diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/pom.xml b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/pom.xml index 07c668a99..2b6357ed0 100644 --- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/pom.xml +++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/pom.xml @@ -33,6 +33,24 @@ com.atlassian.xmlrpc atlassian-xmlrpc-binder + + + commons-logging + commons-logging + + + + + org.slf4j + jcl104-over-slf4j + + compile + + + org.slf4j + slf4j-simple + + compile @@ -54,35 +72,6 @@ - - - org.apache.maven.plugins - maven-enforcer-plugin - 1.0-alpha-3 - - - - enforce - - - - - - org.codehaus.plexus:plexus-container-default - velocity:velocity-dep - classworlds:classworlds - javax.transaction:jta - javax.sql:jdbc-stdext - ant:ant-optional - - xom:xom - - - - - - - diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/pom.xml b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/pom.xml index bdc0a947a..e246ed386 100644 --- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/pom.xml +++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/pom.xml @@ -64,5 +64,10 @@ redback-rbac-memory test + + org.slf4j + slf4j-simple + test + diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/pom.xml b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/pom.xml index 0d7e136b1..ddc213e57 100644 --- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/pom.xml +++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/pom.xml @@ -45,5 +45,10 @@ plexus-spring test + + org.slf4j + slf4j-simple + test + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 757e9a371..7f3f5e22e 100644 --- a/pom.xml +++ b/pom.xml @@ -75,13 +75,13 @@ org.codehaus.plexus:plexus-container-default + org.codehaus.plexus:plexus-log4j-logging commons-logging:commons-logging velocity:velocity-dep classworlds:classworlds javax.transaction:jta javax.sql:jdbc-stdext ant:ant-optional - xom:xom org.codehaus.plexus:plexus-xwork-integration @@ -213,12 +213,6 @@ 3.8.1 test - - httpunit - httpunit - 1.6.2 - test - easymock easymock @@ -231,19 +225,15 @@ 1.2 test - - org.slf4j - jcl104-over-slf4j - test - - - org.slf4j - slf4j-log4j12 - test - + + httpunit + httpunit + 1.6.2 + test + org.apache.jackrabbit jackrabbit-webdav @@ -890,6 +880,7 @@ org.slf4j jcl104-over-slf4j 1.5.0 + runtime org.slf4j @@ -900,11 +891,13 @@ org.slf4j slf4j-simple 1.5.0 + test org.slf4j slf4j-log4j12 1.5.0 + runtime taglibs -- 2.39.5