<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>
<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>
<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>
<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>
<artifactId>xmlunit</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
<plugins>
+++ /dev/null
-# 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
-
</dependency>
<!-- test dependencies -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<artifactId>hsqldb</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
<artifactId>xmlunit</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
<artifactId>bcel</artifactId>
<version>5.2</version>
</dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
<artifactId>plexus-spring</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
+++ /dev/null
-# 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
-
<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>
<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>
+++ /dev/null
-<?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>
<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>
+++ /dev/null
-<?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>
<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>
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;
* 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.
*/
if ( IGNORE.equals( policySetting ) )
{
// Ignore.
- getLogger().debug( "Error policy set to IGNORE." );
+ log.debug( "Error policy set to IGNORE." );
return false;
}
* 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.
*
* role-hint="propagate-errors-on-update"
*/
public class PropagateErrorsOnUpdateDownloadPolicy
- extends AbstractLogEnabled
implements DownloadErrorPolicy
{
/**
+++ /dev/null
-<?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>
<version>${wagon.version}</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
+++ /dev/null
-<?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>
<artifactId>plexus-spring</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
<plugins>
+++ /dev/null
-<?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>
<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>
<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>
+++ /dev/null
-<?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>
<artifactId>hsqldb</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
+++ /dev/null
-<?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>
<artifactId>plexus-spring</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
</build>
+++ /dev/null
-# 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
-
<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>
+++ /dev/null
-<?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>
<artifactId>xmlunit</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
<artifactId>redback-rbac-memory</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
+++ /dev/null
-# 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
-
<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>
}
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 );
}
}
}
}
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();
}
* 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
}
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();
}
}
catch ( ObjectNotFoundException e )
{
- getLogger().debug( e.getMessage(), e );
+ log.debug( e.getMessage(), e );
addActionError( e.getMessage() );
return ERROR;
}
}
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();
}
}
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();
}
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()
}
catch ( RegistryException e )
{
- getLogger().error( e.getMessage(), e );
+ log.error( e.getMessage(), e );
addActionError( "Error in saving configuration" );
return INPUT;
}
\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
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 );
}
}
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 );
}
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." );
}
}
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() )
{
public String removeFiletypePattern()
{
- getLogger().info( "Remove File Type Pattern [" + getFileTypeId() + ":" + getPattern() + "]" );
+ log.info( "Remove File Type Pattern [" + getFileTypeId() + ":" + getPattern() + "]" );
if ( !isValidFiletypeCommand() )
{
+++ /dev/null
-<?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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
* 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;
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
*
* @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";
private Map mimeMap = new HashMap();
+ private Logger log = LoggerFactory.getLogger( MimeTypes.class );
+
/**
* Get the Mime Type for the provided filename.
*
{
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;
}
}
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
{
}
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
{
}
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
{
+++ /dev/null
-<?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>
<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>
<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
-->
<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>
<artifactId>redback-rbac-memory</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
<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
<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>