diff options
author | Joakim Erdfelt <joakime@apache.org> | 2008-02-21 07:31:33 +0000 |
---|---|---|
committer | Joakim Erdfelt <joakime@apache.org> | 2008-02-21 07:31:33 +0000 |
commit | 5f27f502ff339508a20b16f4f3822cbee07eb5ba (patch) | |
tree | fe2d5724bd1df2122e1114880da0df0ceb3b6ac4 /archiva-database | |
parent | 45fca34ec2639fe060df1bc459b858811b598ec5 (diff) | |
download | archiva-5f27f502ff339508a20b16f4f3822cbee07eb5ba.tar.gz archiva-5f27f502ff339508a20b16f4f3822cbee07eb5ba.zip |
MRM-708 - Migrate from Plexus Logging to Slf4J
* Finishing up AbstractLogEnabled conversions to Slf4J.
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@629704 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-database')
7 files changed, 34 insertions, 34 deletions
diff --git a/archiva-database/src/main/java/org/apache/maven/archiva/database/browsing/DefaultRepositoryBrowsing.java b/archiva-database/src/main/java/org/apache/maven/archiva/database/browsing/DefaultRepositoryBrowsing.java index 6249352a0..2e87bcf8e 100644 --- a/archiva-database/src/main/java/org/apache/maven/archiva/database/browsing/DefaultRepositoryBrowsing.java +++ b/archiva-database/src/main/java/org/apache/maven/archiva/database/browsing/DefaultRepositoryBrowsing.java @@ -19,6 +19,12 @@ package org.apache.maven.archiva.database.browsing; * under the License. */ +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.PredicateUtils; import org.apache.commons.collections.functors.NotPredicate; @@ -35,13 +41,8 @@ import org.apache.maven.archiva.database.updater.DatabaseUpdater; import org.apache.maven.archiva.model.ArchivaArtifact; import org.apache.maven.archiva.model.ArchivaProjectModel; import org.apache.maven.archiva.model.Keys; -import org.codehaus.plexus.logging.AbstractLogEnabled; - -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * DefaultRepositoryBrowsing @@ -51,9 +52,10 @@ import java.util.Map.Entry; * @plexus.component role="org.apache.maven.archiva.database.browsing.RepositoryBrowsing" */ public class DefaultRepositoryBrowsing - extends AbstractLogEnabled implements RepositoryBrowsing { + private Logger log = LoggerFactory.getLogger( DefaultRepositoryBrowsing.class ); + /** * @plexus.requirement role-hint="jdo" */ @@ -201,7 +203,7 @@ public class DefaultRepositoryBrowsing { Map<String, String> snapshots = new HashMap<String, String>(); - getLogger().info( "Processing snapshots." ); + log.info( "Processing snapshots." ); for ( String version : versions ) { @@ -253,7 +255,7 @@ public class DefaultRepositoryBrowsing { if ( VersionUtil.getBaseVersion( uniqueVersion ).equals( version ) ) { - getLogger().info( "Retrieving artifact with version " + uniqueVersion ); + log.info( "Retrieving artifact with version " + uniqueVersion ); pomArtifact = dao.getArtifactDAO().getArtifact( groupId, artifactId, uniqueVersion, null, "pom" ); return pomArtifact; diff --git a/archiva-database/src/main/java/org/apache/maven/archiva/database/jdo/JdoAccess.java b/archiva-database/src/main/java/org/apache/maven/archiva/database/jdo/JdoAccess.java index d15e5d4b8..d0512dcc4 100644 --- a/archiva-database/src/main/java/org/apache/maven/archiva/database/jdo/JdoAccess.java +++ b/archiva-database/src/main/java/org/apache/maven/archiva/database/jdo/JdoAccess.java @@ -28,7 +28,6 @@ import org.apache.maven.archiva.database.SimpleConstraint; import org.apache.maven.archiva.database.constraints.AbstractSimpleConstraint; import org.apache.maven.archiva.model.CompoundKey; import org.codehaus.plexus.jdo.JdoFactory; -import org.codehaus.plexus.logging.AbstractLogEnabled; import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; @@ -60,7 +59,6 @@ import javax.jdo.spi.PersistenceCapable; * @plexus.component role="org.apache.maven.archiva.database.jdo.JdoAccess" role-hint="archiva" */ public class JdoAccess - extends AbstractLogEnabled implements Initializable, InstanceLifecycleListener, StoreLifecycleListener { /** diff --git a/archiva-database/src/main/java/org/apache/maven/archiva/database/jdo/JdoArchivaDAO.java b/archiva-database/src/main/java/org/apache/maven/archiva/database/jdo/JdoArchivaDAO.java index 680c395d8..90b2d0870 100644 --- a/archiva-database/src/main/java/org/apache/maven/archiva/database/jdo/JdoArchivaDAO.java +++ b/archiva-database/src/main/java/org/apache/maven/archiva/database/jdo/JdoArchivaDAO.java @@ -25,7 +25,6 @@ import org.apache.maven.archiva.database.ProjectModelDAO; import org.apache.maven.archiva.database.RepositoryContentStatisticsDAO; import org.apache.maven.archiva.database.RepositoryProblemDAO; import org.apache.maven.archiva.database.SimpleConstraint; -import org.codehaus.plexus.logging.AbstractLogEnabled; import java.io.Serializable; import java.util.List; @@ -39,7 +38,6 @@ import java.util.List; * @plexus.component role-hint="jdo" */ public class JdoArchivaDAO - extends AbstractLogEnabled implements ArchivaDAO { /** diff --git a/archiva-database/src/main/java/org/apache/maven/archiva/database/jdo/JdoArtifactDAO.java b/archiva-database/src/main/java/org/apache/maven/archiva/database/jdo/JdoArtifactDAO.java index e3b067467..81a0fc7b7 100644 --- a/archiva-database/src/main/java/org/apache/maven/archiva/database/jdo/JdoArtifactDAO.java +++ b/archiva-database/src/main/java/org/apache/maven/archiva/database/jdo/JdoArtifactDAO.java @@ -26,7 +26,6 @@ import org.apache.maven.archiva.database.ObjectNotFoundException; import org.apache.maven.archiva.model.ArchivaArtifact; import org.apache.maven.archiva.model.ArchivaArtifactModel; import org.apache.maven.archiva.model.jpox.ArchivaArtifactModelKey; -import org.codehaus.plexus.logging.AbstractLogEnabled; import java.util.ArrayList; import java.util.Iterator; @@ -41,7 +40,6 @@ import java.util.List; * @plexus.component role-hint="jdo" */ public class JdoArtifactDAO - extends AbstractLogEnabled implements ArtifactDAO { /** diff --git a/archiva-database/src/main/java/org/apache/maven/archiva/database/project/ProjectModelToDatabaseListener.java b/archiva-database/src/main/java/org/apache/maven/archiva/database/project/ProjectModelToDatabaseListener.java index 3b114e02a..04f3a23c7 100644 --- a/archiva-database/src/main/java/org/apache/maven/archiva/database/project/ProjectModelToDatabaseListener.java +++ b/archiva-database/src/main/java/org/apache/maven/archiva/database/project/ProjectModelToDatabaseListener.java @@ -19,6 +19,8 @@ package org.apache.maven.archiva.database.project; * under the License. */ +import java.util.List; + import org.apache.maven.archiva.database.ArchivaDAO; import org.apache.maven.archiva.database.ArchivaDatabaseException; import org.apache.maven.archiva.database.ObjectNotFoundException; @@ -28,9 +30,8 @@ import org.apache.maven.archiva.repository.project.ProjectModelException; import org.apache.maven.archiva.repository.project.ProjectModelResolver; import org.apache.maven.archiva.repository.project.resolvers.FilesystemBasedResolver; import org.apache.maven.archiva.repository.project.resolvers.ProjectModelResolutionListener; -import org.codehaus.plexus.logging.AbstractLogEnabled; - -import java.util.List; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Just in Time save of project models to the database, implemented as a listener @@ -44,9 +45,10 @@ import java.util.List; * role-hint="model-to-db" */ public class ProjectModelToDatabaseListener - extends AbstractLogEnabled implements ProjectModelResolutionListener { + private Logger log = LoggerFactory.getLogger( ProjectModelToDatabaseListener.class ); + /** * @plexus.requirement role-hint="jdo" */ @@ -147,7 +149,7 @@ public class ProjectModelToDatabaseListener } catch ( ProjectModelException e ) { - getLogger().warn( e.getMessage(), e ); + log.warn( e.getMessage(), e ); } } } diff --git a/archiva-database/src/main/java/org/apache/maven/archiva/database/updater/JdoDatabaseUpdater.java b/archiva-database/src/main/java/org/apache/maven/archiva/database/updater/JdoDatabaseUpdater.java index 475c95628..fce87a76f 100644 --- a/archiva-database/src/main/java/org/apache/maven/archiva/database/updater/JdoDatabaseUpdater.java +++ b/archiva-database/src/main/java/org/apache/maven/archiva/database/updater/JdoDatabaseUpdater.java @@ -19,6 +19,10 @@ package org.apache.maven.archiva.database.updater; * under the License. */ +import java.util.Date; +import java.util.Iterator; +import java.util.List; + import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.IteratorUtils; import org.apache.commons.collections.Predicate; @@ -29,11 +33,8 @@ import org.apache.maven.archiva.database.ArchivaDatabaseException; import org.apache.maven.archiva.database.constraints.ArtifactsProcessedConstraint; import org.apache.maven.archiva.model.ArchivaArtifact; import org.apache.maven.archiva.model.functors.UnprocessedArtifactPredicate; -import org.codehaus.plexus.logging.AbstractLogEnabled; - -import java.util.Date; -import java.util.Iterator; -import java.util.List; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * JdoDatabaseUpdater @@ -45,9 +46,10 @@ import java.util.List; * role-hint="jdo" */ public class JdoDatabaseUpdater - extends AbstractLogEnabled implements DatabaseUpdater { + private Logger log = LoggerFactory.getLogger( JdoDatabaseUpdater.class ); + /** * @plexus.requirement role-hint="jdo" */ @@ -144,7 +146,7 @@ public class JdoDatabaseUpdater if ( CollectionUtils.isEmpty( consumers ) ) { - getLogger().warn( "There are no selected consumers for unprocessed artifacts." ); + log.warn( "There are no selected consumers for unprocessed artifacts." ); return; } @@ -162,7 +164,7 @@ public class JdoDatabaseUpdater if ( CollectionUtils.isEmpty( consumers ) ) { - getLogger().warn( "There are no selected consumers for artifact cleanup." ); + log.warn( "There are no selected consumers for artifact cleanup." ); return; } diff --git a/archiva-database/src/main/java/org/apache/maven/archiva/database/updater/ProcessArchivaArtifactClosure.java b/archiva-database/src/main/java/org/apache/maven/archiva/database/updater/ProcessArchivaArtifactClosure.java index 17c91de67..3de2bfabe 100644 --- a/archiva-database/src/main/java/org/apache/maven/archiva/database/updater/ProcessArchivaArtifactClosure.java +++ b/archiva-database/src/main/java/org/apache/maven/archiva/database/updater/ProcessArchivaArtifactClosure.java @@ -23,7 +23,8 @@ import org.apache.commons.collections.Closure; import org.apache.maven.archiva.consumers.ArchivaArtifactConsumer; import org.apache.maven.archiva.consumers.ConsumerException; import org.apache.maven.archiva.model.ArchivaArtifact; -import org.codehaus.plexus.logging.AbstractLogEnabled; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * ProcessArchivaArtifactClosure @@ -36,9 +37,10 @@ import org.codehaus.plexus.logging.AbstractLogEnabled; * instantiation-strategy="per-lookup" */ class ProcessArchivaArtifactClosure - extends AbstractLogEnabled implements Closure { + private Logger log = LoggerFactory.getLogger( ProcessArchivaArtifactClosure.class ); + private ArchivaArtifact artifact; public void execute( Object input ) @@ -53,9 +55,7 @@ class ProcessArchivaArtifactClosure } catch ( ConsumerException e ) { - getLogger().warn( - "Unable to process artifact [" + artifact + "] with consumer [" + consumer.getId() - + "]" ); + log.warn( "Unable to process artifact [" + artifact + "] with consumer [" + consumer.getId() + "]" ); } } |