]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1140] centralise logging through slf4j
authorBrett Porter <brett@apache.org>
Sat, 14 Mar 2009 02:33:57 +0000 (02:33 +0000)
committerBrett Porter <brett@apache.org>
Sat, 14 Mar 2009 02:33:57 +0000 (02:33 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@753590 13f79535-47bb-0310-9956-ffa450edef68

65 files changed:
archiva-cli/pom.xml
archiva-modules/archiva-base/archiva-artifact-converter/pom.xml
archiva-modules/archiva-base/archiva-checksum/pom.xml
archiva-modules/archiva-base/archiva-configuration/pom.xml
archiva-modules/archiva-base/archiva-configuration/src/test/resources/log4j.properties [deleted file]
archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml
archiva-modules/archiva-base/archiva-consumers/archiva-database-consumers/pom.xml
archiva-modules/archiva-base/archiva-consumers/archiva-dependency-tree-consumer/pom.xml
archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml
archiva-modules/archiva-base/archiva-converter/pom.xml
archiva-modules/archiva-base/archiva-converter/src/test/resources/log4j.properties [deleted file]
archiva-modules/archiva-base/archiva-dependency-graph/pom.xml
archiva-modules/archiva-base/archiva-indexer/pom.xml
archiva-modules/archiva-base/archiva-indexer/src/test/resources/log4j.xml [deleted file]
archiva-modules/archiva-base/archiva-model/pom.xml
archiva-modules/archiva-base/archiva-model/src/test/resources/log4j.xml [deleted file]
archiva-modules/archiva-base/archiva-policies/pom.xml
archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/maven/archiva/policies/PropagateErrorsDownloadPolicy.java
archiva-modules/archiva-base/archiva-policies/src/main/java/org/apache/maven/archiva/policies/PropagateErrorsOnUpdateDownloadPolicy.java
archiva-modules/archiva-base/archiva-policies/src/test/resources/log4j.xml [deleted file]
archiva-modules/archiva-base/archiva-proxy/pom.xml
archiva-modules/archiva-base/archiva-proxy/src/test/resources/log4j.xml [deleted file]
archiva-modules/archiva-base/archiva-repository-layer/pom.xml
archiva-modules/archiva-base/archiva-repository-layer/src/test/resources/log4j.xml [deleted file]
archiva-modules/archiva-base/archiva-transaction/pom.xml
archiva-modules/archiva-database/pom.xml
archiva-modules/archiva-database/src/test/resources/log4j.xml [deleted file]
archiva-modules/archiva-reporting/archiva-artifact-reports/pom.xml
archiva-modules/archiva-reporting/archiva-artifact-reports/src/test/resources/log4j.xml [deleted file]
archiva-modules/archiva-reporting/archiva-report-manager/pom.xml
archiva-modules/archiva-reporting/archiva-report-manager/src/test/resources/log4j.properties [deleted file]
archiva-modules/archiva-scheduled/pom.xml
archiva-modules/archiva-scheduled/src/test/resources/log4j.xml [deleted file]
archiva-modules/archiva-web/archiva-rss/pom.xml
archiva-modules/archiva-web/archiva-security/pom.xml
archiva-modules/archiva-web/archiva-security/src/test/resources/log4j.properties [deleted file]
archiva-modules/archiva-web/archiva-webapp/pom.xml
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/BrowseAction.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/PlexusActionSupport.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/SearchAction.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/UploadAction.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/SchedulerAction.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/database/DatabaseAction.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/legacy/DeleteLegacyArtifactPathAction.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesAction.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryAction.java
archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/scanning/RepositoryScanningAction.java
archiva-modules/archiva-web/archiva-webapp/src/test/resources/log4j.xml [deleted file]
archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/ShowArtifactActionTest.xml
archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/AddProxyConnectorActionTest.xml
archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/connectors/proxy/EditProxyConnectorActionTest.xml
archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/AbstractManagedRepositoriesActionTest.xml
archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/DeleteManagedRepositoryActionTest.xml
archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/action/admin/repositories/RepositoriesActionTest.xml
archiva-modules/archiva-web/archiva-webapp/src/test/resources/org/apache/maven/archiva/web/rss/RssFeedServletTest.xml
archiva-modules/archiva-web/archiva-webdav/pom.xml
archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/util/MimeTypes.java
archiva-modules/archiva-web/archiva-webdav/src/test/resources/log4j.xml [deleted file]
archiva-modules/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/RepositoryServletSecurityTest.xml
archiva-modules/archiva-web/archiva-webdav/src/test/resources/org/apache/maven/archiva/webdav/RepositoryServletTest.xml
archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-client/pom.xml
archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-security/pom.xml
archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-services/pom.xml
pom.xml

index 70f20a3ce9c5ab3b806a1b5a158320453a550e4b..a18f2ff8a46b8a2573610bf462c443e5b2ae8771 100644 (file)
       <artifactId>cli</artifactId>
       <version>7</version>
     </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-      <scope>runtime</scope>
-    </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-spring</artifactId>
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>jcl104-over-slf4j</artifactId>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+      <scope>compile</scope>
     </dependency>
   </dependencies>
   <build>
@@ -74,7 +75,7 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-shade-plugin</artifactId>
-        <version>1.0.1</version>
+        <version>1.2</version>
         <executions>
           <execution>
             <phase>package</phase>
           </archive>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>exec-maven-plugin</artifactId>
+        <configuration>
+          <executable>java</executable>
+          <mainClass>org.apache.maven.archiva.cli.ArchivaCli</mainClass>
+          <arguments>
+          </arguments>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 </project>
index 2a3232fa4548918129c65ec63353d3f515e36097..72d7f55985596f78fa6d4cfd3d3615e4fbdbe82a 100644 (file)
       <groupId>org.apache.maven.shared</groupId>
       <artifactId>maven-model-converter</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
   <build>
     <plugins>
index 0764fcc12af690684f2c1160a9c9937866ab81b4..2973a6170dbe28885397be283b94d428d8368bcc 100644 (file)
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-api</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>commons-lang</groupId>
       <artifactId>commons-lang</artifactId>
index e262e2beb163adcb7b625ab1c3bae7abeedcf9c8..805d5a2d54e7bc1eb130aa71e1d068ea813dbce7 100644 (file)
       <artifactId>xmlunit</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
   <build>
     <plugins>
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 (file)
index 6d10757..0000000
+++ /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
-
index 538c0cd4db1e1f3482e6e832e19031b1baabee72..b620b3b130e8a9f91657a82a92c10ec7a27d6339 100644 (file)
     </dependency>
 
     <!-- test dependencies -->
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>hsqldb</groupId>
       <artifactId>hsqldb</artifactId>
index 798ee845ab962cf10b23a20191471fa41d99dca0..270e04f47190ff69f719b6bd75ecce317881e21a 100644 (file)
       <artifactId>hsqldb</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 </project>
index c675a7c6aa9a6a3e4e908a57eab737b89b088977..d1a78a39d6b96bc0475606b37f371b29295526b5 100644 (file)
       <artifactId>xmlunit</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 </project>
index cc346c21842f4a8b673c344b9109f25e238fcbfa..616aadbd5b4c69078e53a4228293fe5805e0d18d 100644 (file)
       <artifactId>bcel</artifactId>
       <version>5.2</version>
     </dependency>   
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 </project>
index 2c0813c8f4f90ac794bdb1fd71f581efc4a41dea..e30c4d9e29bc883a74eecc830f82c6aa0cadc017 100644 (file)
       <artifactId>plexus-spring</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 </project>
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 (file)
index 9b2c26a..0000000
+++ /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
-
index c9506501308db06277068b98e0e01c1c8e163026..741cd0f15184b4571c84ee18799c3b83b8f699a7 100644 (file)
       <groupId>org.apache.archiva</groupId>
       <artifactId>archiva-repository-layer</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
   <build>
     <plugins>
index a5eb3227d78c9037b4c33219fc876bf134a39d38..a0d7681f9a7f57fe6472f41a10e7cdc2f2263968 100644 (file)
       <groupId>org.sonatype.nexus</groupId>
       <artifactId>nexus-indexer</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
   <build>
     <plugins>
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 (file)
index a11494a..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-
-  <appender name="console" class="org.apache.log4j.ConsoleAppender">
-    <param name="Target" value="System.out"/>
-    <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%d [%t] %-5p %-30c{1} - %m%n"/>
-    </layout>
-  </appender>
-
-  <!-- Help identify bugs during testing -->
-  <logger name="org.apache.maven">
-    <level value="debug"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.security">
-    <level value="info"/>
-  </logger>
-
-  <!-- squelch noisy objects (for now) -->
-  <logger name="org.codehaus.plexus.mailsender.MailSender">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.quartz">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.apache.jasper">
-    <level value="info"/>
-  </logger>
-
-  <logger name="com.opensymphony.xwork">
-    <level value="info"/>
-  </logger>
-
-  <logger name="com.opensymphony.webwork">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.PlexusContainer">
-    <level value="info"/>
-  </logger>
-
-  <logger name="JPOX">
-    <level value="warn"/>
-  </logger>
-
-  <logger name="JPOX.MetaData">
-    <level value="error"/>
-  </logger>
-
-  <logger name="JPOX.RDBMS.SQL">
-    <level value="error"/>
-  </logger>
-
-  <logger name="SQL">
-    <level value="error"/>
-  </logger>
-
-  <logger name="freemarker">
-    <level value="warn"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.component.manager.ClassicSingletonComponentManager">
-    <level value="error"/>
-  </logger>
-
-  <root>
-    <priority value="debug" />
-    <appender-ref ref="console" />
-  </root>
-
-</log4j:configuration>
index 16288f3044ac7c99b8b484c7273e3741fd2d0674..23229135c3e89ca44b6385fe8d741c799d3e4bb6 100755 (executable)
       <groupId>javax.jdo</groupId>
       <artifactId>jdo2-api</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>jcl104-over-slf4j</artifactId>
+      <scope>runtime</scope>
+    </dependency>
   </dependencies>
   <build>
     <plugins>
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 (file)
index 395941a..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-
-  <appender name="console" class="org.apache.log4j.ConsoleAppender">
-    <param name="Target" value="System.out"/>
-    <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%d [%t] %-5p %-30c{1} - %m%n"/>
-    </layout>
-  </appender>
-
-  <!-- Help identify bugs during testing -->
-  <logger name="org.apache.maven">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.security">
-    <level value="info"/>
-  </logger>
-
-  <!-- squelch noisy objects (for now) -->
-  <logger name="org.codehaus.plexus.mailsender.MailSender">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.quartz">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.apache.jasper">
-    <level value="info"/>
-  </logger>
-
-  <logger name="com.opensymphony.xwork">
-    <level value="info"/>
-  </logger>
-
-  <logger name="com.opensymphony.webwork">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.PlexusContainer">
-    <level value="info"/>
-  </logger>
-
-  <logger name="JPOX">
-    <level value="warn"/>
-  </logger>
-
-  <logger name="JPOX.MetaData">
-    <level value="error"/>
-  </logger>
-
-  <logger name="JPOX.RDBMS.SQL">
-    <level value="error"/>
-  </logger>
-
-  <logger name="SQL">
-    <level value="error"/>
-  </logger>
-
-  <logger name="freemarker">
-    <level value="warn"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.component.manager.ClassicSingletonComponentManager">
-    <level value="error"/>
-  </logger>
-
-  <root>
-    <priority value ="info" />
-    <appender-ref ref="console" />
-  </root>
-
-</log4j:configuration>
index 0e8c2e01e6ad45d09c2c677df6ac3766eb93751b..ac5f13f09ddde77bd81d1effbeded32e3ffb50da 100644 (file)
       <groupId>org.codehaus.plexus.cache</groupId>
       <artifactId>plexus-cache-ehcache</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>jcl104-over-slf4j</artifactId>
+      <scope>runtime</scope>
+    </dependency>
   </dependencies>
   <build>
     <plugins>
index cca1c67503b1cfc5f6ede8170037a67a81d98691..76b688f210a4f309f6c7416f61b09e4cafcaa26e 100644 (file)
@@ -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;
         }
 
index d2b471af3bce32d67e7651ed8c901dfd70ed7410..9e20ba5242cc686518d9bae622ea3df6f82110d6 100644 (file)
@@ -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 (file)
index 9bb5e1e..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-
-  <appender name="console" class="org.apache.log4j.ConsoleAppender">
-    <param name="Target" value="System.out"/>
-    <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%5p|%t|%5r|%-30c{1} - %m%n"/>
-    </layout>
-  </appender>
-
-  <!-- Help identify bugs during testing -->
-  <logger name="org.apache.maven.archiva">
-    <level value="debug"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.security">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.PlexusContainer">
-    <level value="info"/>
-  </logger>
-
-  <logger name="JPOX">
-    <level value="warn"/>
-  </logger>
-
-  <logger name="JPOX.MetaData">
-    <level value="error"/>
-  </logger>
-
-  <logger name="JPOX.RDBMS.SQL">
-    <level value="error"/>
-  </logger>
-
-  <logger name="SQL">
-    <level value="error"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.spring">
-    <level value="warn"/>
-  </logger>
-
-  <logger name="org.springframework">
-    <level value="warn"/>
-  </logger>
-
-  <root>
-    <priority value ="info" />
-    <appender-ref ref="console" />
-  </root>
-
-</log4j:configuration>
index f4b39942a4058729c3f856bbcddcef8461269482..a5a21015ea75f80a5497342ea9bbfbec9fa59e9d 100644 (file)
       <version>${wagon.version}</version>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
   <build>
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 (file)
index 901c99f..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-
-  <appender name="console" class="org.apache.log4j.ConsoleAppender">
-    <param name="Target" value="System.out"/>
-    <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%5p|%t|%5r|%-30c{1} - %m%n"/>
-    </layout>
-  </appender>
-
-  <!-- Help identify bugs during testing -->
-  <logger name="org.apache.maven.archiva">
-    <level value="debug"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.security">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.PlexusContainer">
-    <level value="info"/>
-  </logger>
-
-  <logger name="JPOX">
-    <level value="warn"/>
-  </logger>
-
-  <logger name="JPOX.MetaData">
-    <level value="error"/>
-  </logger>
-
-  <logger name="JPOX.RDBMS.SQL">
-    <level value="error"/>
-  </logger>
-
-  <logger name="SQL">
-    <level value="error"/>
-  </logger>
-
-  <root>
-    <priority value ="info" />
-    <appender-ref ref="console" />
-  </root>
-
-</log4j:configuration>
index 67c96717384df06b2b56b1019a811aca014729d4..e8ebd8734e80367bdd25b53fb7e2d2e59acc89fa 100644 (file)
       <artifactId>plexus-spring</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
   <build>
     <plugins>
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 (file)
index 23d4d08..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-
-  <appender name="console" class="org.apache.log4j.ConsoleAppender">
-    <param name="Target" value="System.out"/>
-    <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%d [%t] %-5p %-30c{1} - %m%n"/>
-    </layout>
-  </appender>
-
-  <!-- Help identify bugs during testing -->
-  <logger name="org.apache.maven">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.security">
-    <level value="info"/>
-  </logger>
-
-  <!-- squelch noisy objects (for now) -->
-  <logger name="org.codehaus.plexus.mailsender.MailSender">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.PlexusContainer">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.component.manager.ClassicSingletonComponentManager">
-    <level value="error"/>
-  </logger>
-
-  <root>
-    <priority value ="warn" />
-    <appender-ref ref="console" />
-  </root>
-
-</log4j:configuration>
index c9655ca902c1ef4c366f007a128b3f379b64586c..7c9bae559888c11fa72601b418f54b2c0779b700 100644 (file)
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-component-api</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>jcl104-over-slf4j</artifactId>
+      <scope>runtime</scope>
+    </dependency>
   </dependencies>
 </project>
index 097c4e3c55cb780c90012ed9dd415342d6678aa9..7e5e1d23be7ed36723d0f75e55f80926f5b5050b 100755 (executable)
       <groupId>commons-io</groupId>
       <artifactId>commons-io</artifactId>
     </dependency>
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-    </dependency>
     <!--  TEST DEPS  -->
     <dependency>
       <groupId>org.codehaus.plexus.registry</groupId>
       <artifactId>derbytools</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
   <build>
     <plugins>
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 (file)
index 395941a..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-
-  <appender name="console" class="org.apache.log4j.ConsoleAppender">
-    <param name="Target" value="System.out"/>
-    <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%d [%t] %-5p %-30c{1} - %m%n"/>
-    </layout>
-  </appender>
-
-  <!-- Help identify bugs during testing -->
-  <logger name="org.apache.maven">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.security">
-    <level value="info"/>
-  </logger>
-
-  <!-- squelch noisy objects (for now) -->
-  <logger name="org.codehaus.plexus.mailsender.MailSender">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.quartz">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.apache.jasper">
-    <level value="info"/>
-  </logger>
-
-  <logger name="com.opensymphony.xwork">
-    <level value="info"/>
-  </logger>
-
-  <logger name="com.opensymphony.webwork">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.PlexusContainer">
-    <level value="info"/>
-  </logger>
-
-  <logger name="JPOX">
-    <level value="warn"/>
-  </logger>
-
-  <logger name="JPOX.MetaData">
-    <level value="error"/>
-  </logger>
-
-  <logger name="JPOX.RDBMS.SQL">
-    <level value="error"/>
-  </logger>
-
-  <logger name="SQL">
-    <level value="error"/>
-  </logger>
-
-  <logger name="freemarker">
-    <level value="warn"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.component.manager.ClassicSingletonComponentManager">
-    <level value="error"/>
-  </logger>
-
-  <root>
-    <priority value ="info" />
-    <appender-ref ref="console" />
-  </root>
-
-</log4j:configuration>
index 30969cb237ccb750b4422397c11751ee06c121bf..0d48e19a8db54d644e270bba4b22131b8fb886a0 100755 (executable)
       <artifactId>hsqldb</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 </project>
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 (file)
index 395941a..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-
-  <appender name="console" class="org.apache.log4j.ConsoleAppender">
-    <param name="Target" value="System.out"/>
-    <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%d [%t] %-5p %-30c{1} - %m%n"/>
-    </layout>
-  </appender>
-
-  <!-- Help identify bugs during testing -->
-  <logger name="org.apache.maven">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.security">
-    <level value="info"/>
-  </logger>
-
-  <!-- squelch noisy objects (for now) -->
-  <logger name="org.codehaus.plexus.mailsender.MailSender">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.quartz">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.apache.jasper">
-    <level value="info"/>
-  </logger>
-
-  <logger name="com.opensymphony.xwork">
-    <level value="info"/>
-  </logger>
-
-  <logger name="com.opensymphony.webwork">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.PlexusContainer">
-    <level value="info"/>
-  </logger>
-
-  <logger name="JPOX">
-    <level value="warn"/>
-  </logger>
-
-  <logger name="JPOX.MetaData">
-    <level value="error"/>
-  </logger>
-
-  <logger name="JPOX.RDBMS.SQL">
-    <level value="error"/>
-  </logger>
-
-  <logger name="SQL">
-    <level value="error"/>
-  </logger>
-
-  <logger name="freemarker">
-    <level value="warn"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.component.manager.ClassicSingletonComponentManager">
-    <level value="error"/>
-  </logger>
-
-  <root>
-    <priority value ="info" />
-    <appender-ref ref="console" />
-  </root>
-
-</log4j:configuration>
index cf94e84b8c28c559fb2f24b6f3df98404144642c..89d6a61f8b4b77f45056eaf7f8b46655b3523c69 100755 (executable)
       <artifactId>plexus-spring</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
   <build>
   </build>
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 (file)
index 9b2c26a..0000000
+++ /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
-
index ddaa5a251d44e7023ba2302a4d7ab8d60c0189ff..fb729fbeb37e40d51af76f64a0944aa1414e57a9 100644 (file)
       <artifactId>plexus-registry-commons</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
   <build>
     <plugins>
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 (file)
index 3c782b1..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-
-  <appender name="console" class="org.apache.log4j.ConsoleAppender">
-    <param name="Target" value="System.out"/>
-    <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%5p|%t|%5r|%-30c{1} - %m%n"/>
-    </layout>
-  </appender>
-
-  <!-- Help identify bugs during testing -->
-  <logger name="org.apache.maven.archiva">
-    <level value="debug"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.security">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.PlexusContainer">
-    <level value="info"/>
-  </logger>
-
-  <logger name="JPOX">
-    <level value="warn"/>
-  </logger>
-
-  <logger name="JPOX.MetaData">
-    <level value="error"/>
-  </logger>
-
-  <logger name="JPOX.RDBMS.SQL">
-    <level value="error"/>
-  </logger>
-
-  <logger name="SQL">
-    <level value="error"/>
-  </logger>
-
-  <root>
-    <priority value ="debug" />
-    <appender-ref ref="console" />
-  </root>
-
-</log4j:configuration>
index be70c4a21d4a103a17877087ddb5b3d06e663810..b59182f7e7186d88b344994a2cfc98445dd982c2 100644 (file)
       <artifactId>xmlunit</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 </project>
index 13cc1d8b542ff0482571fc00969f8239441adad1..e4c410a212760e5ee9bc8a067e544134dfc5f2af 100644 (file)
       <artifactId>redback-rbac-memory</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 </project>
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 (file)
index 6d10757..0000000
+++ /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
-
index 4fb54638a611d921ad90024499eb4052e10095c2..ccdbe71307da53e863c32152a57c7f21d5830bd5 100644 (file)
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-log4j12</artifactId>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>httpunit</groupId>
+      <artifactId>httpunit</artifactId>
+      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>commons-lang</groupId>
index d2692cb083af9f59053ccab6f286e2a16673f238..aebfb1527c8427b596b7f626b8b3eab8f9dab385 100644 (file)
@@ -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();
     }
index d68b6be4087d1eb870ab9990ea61f6bf446247d8..de6e508c533fc45664c4c6084095f165b0deb47a 100644 (file)
@@ -19,36 +19,28 @@ package org.apache.maven.archiva.web.action;
  * under the License.\r
  */\r
 \r
-import com.opensymphony.xwork2.ActionSupport;\r
 import java.util.Map;\r
+\r
 import org.apache.struts2.interceptor.SessionAware;\r
-import org.codehaus.plexus.logging.LogEnabled;\r
-import org.codehaus.plexus.logging.Logger;\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+\r
+import com.opensymphony.xwork2.ActionSupport;\r
 \r
 /**\r
  * LogEnabled and SessionAware ActionSupport\r
  */\r
 public abstract class PlexusActionSupport\r
     extends ActionSupport\r
-    implements LogEnabled, SessionAware\r
+    implements SessionAware\r
 {\r
     protected Map session;\r
 \r
-    private Logger logger;\r
-\r
+    protected Logger log = LoggerFactory.getLogger( getClass() );\r
+    \r
     public void setSession( Map map )\r
     {\r
         //noinspection AssignmentToCollectionOrArrayFieldFromParameter\r
         this.session = map;\r
     }\r
-\r
-    public void enableLogging( Logger logger )\r
-    {\r
-        this.logger = logger;\r
-    }\r
-\r
-    protected Logger getLogger()\r
-    {\r
-        return logger;\r
-    }\r
 }\r
index 6cbe7e4834a0d8333597438d116f4c116b701194..c5d017bf7399deecd773a03c7d5f9c74d44e3131 100644 (file)
@@ -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();
     }
index aef774310425e3f33e16bfefb05d586f25affa46..9525c7f5396869b65d9b0864cbb2939652c8f46f 100644 (file)
@@ -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();
     }
index 242436882453f6b2c864334f3dd1f795dfae3668..9cc6b5a1a5e249e59c594aca33c0f49fcd5422b4 100644 (file)
@@ -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();
     }
index a3df57d2d84599acd6bfa8add019aeea2fd2cb18..fa10c51ddf0e24a970002d2e15139fb6b1b36275 100644 (file)
@@ -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()
index 5d83d959a1ff7e4253df15798078d83494c78094..0bd57b4f0c6db33455966109488b507fba2c914e 100644 (file)
@@ -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;
         }
index 5829e61c0bc1b6a21b336d7069fa3de664e0e02e..e337a23db25ba5e6112d935fa291c01811a4370f 100644 (file)
@@ -47,7 +47,7 @@ public class DeleteLegacyArtifactPathAction
 \r
     public String delete()\r
     {\r
-        getLogger().info( "remove [" + path + "] from legacy artifact path resolution" );\r
+        log.info( "remove [" + path + "] from legacy artifact path resolution" );\r
         Configuration configuration = archivaConfiguration.getConfiguration();\r
         for ( Iterator iterator = configuration.getLegacyArtifactPaths().iterator(); iterator.hasNext(); )\r
         {\r
index 1bcba9577129e98bda0880d11d126d797fd6d3af..c0e724efd87982bafda24a41d5ceff0dc66ea2b8 100644 (file)
@@ -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 );
     }
 }
index 7efe7827b8770ac099306291bb2353e50c670c85..2ef89df702251913ae99284ac5da216103f90d26 100644 (file)
@@ -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." );
             }
         }
index becb6d3c6da644ee2077b5fea0c4e591586c0bd6..0d8086c1bc4c9e4a778c2364b593f09899d22431 100644 (file)
@@ -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 (file)
index a2e7ea2..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-
-  <appender name="console" class="org.apache.log4j.ConsoleAppender">
-    <param name="Target" value="System.out"/>
-    <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%5p|%t|%5r|%-30c{1} - %m%n"/>
-    </layout>
-  </appender>
-
-  <!-- Help identify bugs during testing -->
-  <logger name="org.apache.maven.archiva">
-    <level value="info"/>
-  </logger>
-  
-  <logger name="net.sf.ehcache">
-    <level value="warn"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.security">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.springframework">
-    <level value="error"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.spring">
-    <level value="error"/>
-  </logger>
-
-  <logger name="JPOX">
-    <level value="warn"/>
-  </logger>
-
-  <logger name="JPOX.MetaData">
-    <level value="error"/>
-  </logger>
-
-  <logger name="JPOX.RDBMS.SQL">
-    <level value="error"/>
-  </logger>
-
-  <logger name="SQL">
-    <level value="error"/>
-  </logger>
-
-  <root>
-    <priority value ="info" />
-    <appender-ref ref="console" />
-  </root>
-
-</log4j:configuration>
index 81c5b43b6008e80fe2249a536f264c1248e885cf..d51572b7fd88102ca930ab325a16b0542e1959a8 100644 (file)
 
 <plexus>
   <components>
-    <component>
-      <role>org.codehaus.plexus.logging.LoggerManager</role>
-      <implementation>org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager</implementation>
-      <lifecycle-handler>basic</lifecycle-handler>
-    </component>
     <component>
       <role>org.apache.maven.archiva.database.ArchivaDAO</role>
       <role-hint>jdo</role-hint>
index 924f07f7c40578b10b0fbe60f2adea72627a1a0f..dc32d3f3d1745b37cb9297e31f754862bb2446f8 100644 (file)
 
 <plexus>
   <components>
-    <component>
-      <role>org.codehaus.plexus.logging.LoggerManager</role>
-      <implementation>org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager</implementation>
-      <lifecycle-handler>basic</lifecycle-handler>
-    </component>
-
     <component>
       <role>org.codehaus.plexus.cache.Cache</role>
       <role-hint>url-failures-cache</role-hint>
index 924f07f7c40578b10b0fbe60f2adea72627a1a0f..dc32d3f3d1745b37cb9297e31f754862bb2446f8 100644 (file)
 
 <plexus>
   <components>
-    <component>
-      <role>org.codehaus.plexus.logging.LoggerManager</role>
-      <implementation>org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager</implementation>
-      <lifecycle-handler>basic</lifecycle-handler>
-    </component>
-
     <component>
       <role>org.codehaus.plexus.cache.Cache</role>
       <role-hint>url-failures-cache</role-hint>
index 5feec48ed7d2c6a5c0a6969c3a54bff1c5f6f827..afb64ee15a5010618355b6c09f999fe8bc2b2abb 100644 (file)
 
 <plexus>
   <components>
-    <component>
-      <role>org.codehaus.plexus.logging.LoggerManager</role>
-      <implementation>org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager</implementation>
-      <lifecycle-handler>basic</lifecycle-handler>
-    </component>
-
     <component>
       <role>com.opensymphony.xwork2.Action</role>
       <role-hint>addManagedRepositoryAction</role-hint>
index 40c33e0139094446f1c77a02180f53904376c5a1..f4d20ee6176cb4197c037552d761aacfb421bba5 100644 (file)
 
 <plexus>
   <components>  
-    <component>
-      <role>org.codehaus.plexus.logging.LoggerManager</role>
-      <implementation>org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager</implementation>
-      <lifecycle-handler>basic</lifecycle-handler>
-    </component>
     <component>
       <role>org.codehaus.plexus.redback.role.RoleManager</role>
       <role-hint>default</role-hint>
index bffa4169950ad85f1b7cfe53ebfe944080adea69..c09e524a2646d37853394752ad8d6536c09c4b6e 100644 (file)
 
 <plexus>
   <components>
-    <component>
-      <role>org.codehaus.plexus.logging.LoggerManager</role>
-      <implementation>org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager</implementation>
-      <lifecycle-handler>basic</lifecycle-handler>
-    </component>
     <component>
       <role>com.opensymphony.xwork2.Action</role>
       <role-hint>repositoriesAction</role-hint>
index 33988de514db6c6046224e6d3802ce11b37e746f..0fec42f00fc78904ee3b652f475883a414e7dc87 100644 (file)
 
 <plexus>
   <components>
-    <!--
-     | Logger manager
-     -->
     <component>
-      <role>org.codehaus.plexus.logging.LoggerManager</role>
-      <implementation>org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager</implementation>
-      <lifecycle-handler>basic</lifecycle-handler>
+      <role>org.apache.maven.archiva.database.ArtifactDAO</role>
+      <role-hint>jdo</role-hint>
+      <implementation>org.apache.maven.archiva.web.rss.ArtifactDAOStub</implementation>      
+    </component>
+    
+    <component>
+      <role>org.codehaus.plexus.redback.system.SecuritySystem</role>
+      <role-hint>default</role-hint>
+      <implementation>org.apache.maven.archiva.web.rss.SecuritySystemStub</implementation>
+    </component>
+    
+    <component>
+      <role>org.apache.maven.archiva.security.UserRepositories</role>
+      <role-hint>default</role-hint>
+      <implementation>org.apache.maven.archiva.security.UserRepositoriesStub</implementation>
     </component>
-
-       <component>
-         <role>org.apache.maven.archiva.database.ArtifactDAO</role>
-         <role-hint>jdo</role-hint>
-         <implementation>org.apache.maven.archiva.web.rss.ArtifactDAOStub</implementation>       
-       </component>
-       
-       <component>
-         <role>org.codehaus.plexus.redback.system.SecuritySystem</role>
-         <role-hint>default</role-hint>
-         <implementation>org.apache.maven.archiva.web.rss.SecuritySystemStub</implementation>
-       </component>
-       
-       <component>
-         <role>org.apache.maven.archiva.security.UserRepositories</role>
-         <role-hint>default</role-hint>
-         <implementation>org.apache.maven.archiva.security.UserRepositoriesStub</implementation>
-       </component>
   </components>
 </plexus>
index 2a825f08a08f39829761c391cc73988b18219856..c9548b53afa0ff5ff846eea7276ecea683f540df 100644 (file)
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-slf4j-logging</artifactId>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>
         </exclusion>
       </exclusions>
     </dependency>
+    <dependency>
+      <groupId>httpunit</groupId>
+      <artifactId>httpunit</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 </project>
index 8262ba553eb409baa7dd79d7e07cf16a70fa8c6d..731019cb3e29b66589cc0fd3968f70b499564665 100644 (file)
@@ -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 (file)
index a2e7ea2..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-
-  <appender name="console" class="org.apache.log4j.ConsoleAppender">
-    <param name="Target" value="System.out"/>
-    <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%5p|%t|%5r|%-30c{1} - %m%n"/>
-    </layout>
-  </appender>
-
-  <!-- Help identify bugs during testing -->
-  <logger name="org.apache.maven.archiva">
-    <level value="info"/>
-  </logger>
-  
-  <logger name="net.sf.ehcache">
-    <level value="warn"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.security">
-    <level value="info"/>
-  </logger>
-
-  <logger name="org.springframework">
-    <level value="error"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus.spring">
-    <level value="error"/>
-  </logger>
-
-  <logger name="JPOX">
-    <level value="warn"/>
-  </logger>
-
-  <logger name="JPOX.MetaData">
-    <level value="error"/>
-  </logger>
-
-  <logger name="JPOX.RDBMS.SQL">
-    <level value="error"/>
-  </logger>
-
-  <logger name="SQL">
-    <level value="error"/>
-  </logger>
-
-  <root>
-    <priority value ="info" />
-    <appender-ref ref="console" />
-  </root>
-
-</log4j:configuration>
index 7317210efa2284eccb81b7009f8a895b96f9b4a7..b55a4e1514f7102be3905ef8673f191bc0aaeafd 100644 (file)
 
 <plexus>
   <components>
-    <!--
-     | Logger manager
-     -->
-    <component>
-      <role>org.codehaus.plexus.logging.LoggerManager</role>
-      <implementation>org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager</implementation>
-      <lifecycle-handler>basic</lifecycle-handler>
-    </component>
-
     <!--
      | Configuration
      -->
       <role-hint>default</role-hint>
       <implementation>org.codehaus.plexus.redback.system.DefaultSecuritySystem</implementation>
     </component>
-       
-       <component>
+    <component>
       <role>org.apache.maven.archiva.webdav.ArchivaDavResourceFactory</role>
       <implementation>org.apache.maven.archiva.webdav.ArchivaDavResourceFactory</implementation>
       <requirements>
index 8392c87c0d2b5eec9f18b67a5f975cf87f987cc4..e73c0f41f0f7f708ee3f620e7f44c7ecc023ed1a 100644 (file)
 
 <plexus>
   <components>
-    <!--
-     | Logger manager
-     -->
-    <component>
-      <role>org.codehaus.plexus.logging.LoggerManager</role>
-      <implementation>org.codehaus.plexus.logging.slf4j.Slf4jLoggerManager</implementation>
-      <lifecycle-handler>basic</lifecycle-handler>
-    </component>
-
     <!--
      | Configuration
      -->
index 07c668a9910c95352126fd2f962b8490707a652c..2b6357ed0adadb7ec758cb25a857d5931770d1a9 100644 (file)
     <dependency>
       <groupId>com.atlassian.xmlrpc</groupId>
       <artifactId>atlassian-xmlrpc-binder</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>commons-logging</groupId>
+          <artifactId>commons-logging</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>jcl104-over-slf4j</artifactId>
+      <!-- Exec plugin doesn't use runtime scope - odd -->
+      <scope>compile</scope> 
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <!-- Exec plugin doesn't use runtime scope - odd -->
+      <scope>compile</scope> 
     </dependency>
   </dependencies>
   <build>
           </arguments>
         </configuration>
       </plugin>
-      <!-- override parent config, commons-logging cannot be excluded from atlassian-xml-rpc-binder - NoClassDef error occurs -->
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-enforcer-plugin</artifactId>
-        <version>1.0-alpha-3</version>
-        <executions>
-          <execution>
-            <goals>
-              <goal>enforce</goal>
-            </goals>
-            <configuration>
-              <rules>
-                <bannedDependencies>
-                  <excludes>
-                    <exclude>org.codehaus.plexus:plexus-container-default</exclude>                    
-                    <exclude>velocity:velocity-dep</exclude>
-                    <exclude>classworlds:classworlds</exclude>
-                    <exclude>javax.transaction:jta</exclude>
-                    <exclude>javax.sql:jdbc-stdext</exclude>
-                    <exclude>ant:ant-optional</exclude>
-                    <!-- exclude>org.apache.maven.wagon:wagon-http-lightweight</exclude -->
-                    <exclude>xom:xom</exclude>
-                  </excludes>
-                </bannedDependencies>
-              </rules>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
     </plugins>
   </build>
 </project>
index bdc0a947a892b8eb46e8a084425361e394fd5edb..e246ed386a54874727dca87b2d00dce435dfaacb 100644 (file)
       <artifactId>redback-rbac-memory</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 </project>
index 0d7e136b1d39481fe1a89dbbc77e2d4f966f047c..ddc213e5719b7c87ecc59e2005148b9a22551374 100644 (file)
       <artifactId>plexus-spring</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 </project>
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 757e9a37167d5024157986fe464bc7ce14d21cec..7f3f5e22e9e23ad99b3e010e145f5104732f1d3b 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                 <bannedDependencies>
                   <excludes>
                     <exclude>org.codehaus.plexus:plexus-container-default</exclude>
+                    <exclude>org.codehaus.plexus:plexus-log4j-logging</exclude>
                     <exclude>commons-logging:commons-logging</exclude>
                     <exclude>velocity:velocity-dep</exclude>
                     <exclude>classworlds:classworlds</exclude>
                     <exclude>javax.transaction:jta</exclude>
                     <exclude>javax.sql:jdbc-stdext</exclude>
                     <exclude>ant:ant-optional</exclude>
-                    <!-- exclude>org.apache.maven.wagon:wagon-http-lightweight</exclude -->
                     <exclude>xom:xom</exclude>
                     <exclude>org.codehaus.plexus:plexus-xwork-integration</exclude>
                   </excludes>
       <version>3.8.1</version>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>httpunit</groupId>
-      <artifactId>httpunit</artifactId>
-      <version>1.6.2</version>
-      <scope>test</scope>
-    </dependency>
     <dependency>
       <groupId>easymock</groupId>
       <artifactId>easymock</artifactId>
       <version>1.2</version>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>jcl104-over-slf4j</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-      <scope>test</scope>
-    </dependency>
   </dependencies>
   <dependencyManagement>
     <dependencies>
+      <dependency>
+        <groupId>httpunit</groupId>
+        <artifactId>httpunit</artifactId>
+        <version>1.6.2</version>
+        <scope>test</scope>
+      </dependency>
       <dependency>
         <groupId>org.apache.jackrabbit</groupId>
         <artifactId>jackrabbit-webdav</artifactId>
         <groupId>org.slf4j</groupId>
         <artifactId>jcl104-over-slf4j</artifactId>
         <version>1.5.0</version>
+        <scope>runtime</scope>
       </dependency>
       <dependency>
         <groupId>org.slf4j</groupId>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-simple</artifactId>
         <version>1.5.0</version>
+        <scope>test</scope>
       </dependency>
       <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-log4j12</artifactId>
         <version>1.5.0</version>
+        <scope>runtime</scope>
       </dependency>
       <dependency>
         <groupId>taglibs</groupId>