You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by br...@apache.org on 2008/04/07 15:13:08 UTC

svn commit: r645493 - in /archiva/trunk/archiva-cli: ./ src/main/assembly/ src/main/java/org/apache/maven/archiva/cli/ src/main/resources/ src/main/resources/META-INF/

Author: brett
Date: Mon Apr  7 06:13:06 2008
New Revision: 645493

URL: http://svn.apache.org/viewvc?rev=645493&view=rev
Log:
refreshed the CLI

Removed:
    archiva/trunk/archiva-cli/src/main/resources/META-INF/
Modified:
    archiva/trunk/archiva-cli/pom.xml
    archiva/trunk/archiva-cli/src/main/assembly/archiva-cli-assembly.xml
    archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java
    archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArtifactCountConsumer.java
    archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ProjectReaderConsumer.java
    archiva/trunk/archiva-cli/src/main/resources/log4j.properties

Modified: archiva/trunk/archiva-cli/pom.xml
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-cli/pom.xml?rev=645493&r1=645492&r2=645493&view=diff
==============================================================================
--- archiva/trunk/archiva-cli/pom.xml (original)
+++ archiva/trunk/archiva-cli/pom.xml Mon Apr  7 06:13:06 2008
@@ -35,69 +35,69 @@
     </dependency>
     <dependency>
       <groupId>org.apache.archiva</groupId>
-      <artifactId>archiva-core-consumers</artifactId>
+      <artifactId>archiva-dependency-tree-consumer</artifactId>
+      <version>1.1-SNAPSHOT</version>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.archiva</groupId>
-      <artifactId>archiva-converter</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-digest</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-component-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-container-default</artifactId>
+      <artifactId>archiva-xml-tools</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-cli</artifactId>
+      <groupId>org.apache.archiva</groupId>
+      <artifactId>archiva-converter</artifactId>
     </dependency>
     <dependency>
-      <groupId>commons-lang</groupId>
-      <artifactId>commons-lang</artifactId>
+      <groupId>com.google.code.cli-parser</groupId>
+      <artifactId>cli</artifactId>
+      <version>7</version>
     </dependency>
     <dependency>
-      <groupId>org.codehaus.plexus.registry</groupId>
-      <artifactId>plexus-registry-commons</artifactId>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+      <version>1.5.0</version>
+      <scope>runtime</scope>
     </dependency>
   </dependencies>
   <build>
     <plugins>
       <plugin>
-        <artifactId>maven-assembly-plugin</artifactId>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <version>1.0.1</version>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+            <configuration>
+              <finalName>apache-archiva-cli-${project.version}</finalName>
+              <transformers>
+                <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer" />
+              </transformers>
+              <artifactSet>
+                <excludes>
+                  <exclude>xml-apis:xml-apis</exclude>
+                  <exclude>xalan:xalan</exclude>
+                  <exclude>commons-beanutils:commons-beanutils</exclude>
+                </excludes>
+              </artifactSet>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
         <version>2.1</version>
         <configuration>
-          <descriptor>src/main/assembly/archiva-cli-assembly.xml</descriptor>
           <archive>
             <manifest>
               <mainClass>org.apache.maven.archiva.cli.ArchivaCli</mainClass>
             </manifest>
           </archive>
         </configuration>
-      </plugin>
-       <plugin>
-        <groupId>org.codehaus.plexus</groupId>
-        <artifactId>plexus-maven-plugin</artifactId>
-        <version>1.3.5</version>
-         <executions>
-          <execution>
-            <id>merge</id>
-            <goals>
-              <goal>merge-descriptors</goal>
-            </goals>
-            <configuration>
-              <descriptors>
-                <descriptor>${basedir}/src/main/resources/META-INF/plexus/components.xml</descriptor>
-                <descriptor>${project.build.directory}/generated-resources/plexus/META-INF/plexus/components.xml</descriptor>
-              </descriptors>
-            </configuration>
-          </execution>
-        </executions>
       </plugin>
     </plugins>
   </build>

Modified: archiva/trunk/archiva-cli/src/main/assembly/archiva-cli-assembly.xml
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-cli/src/main/assembly/archiva-cli-assembly.xml?rev=645493&r1=645492&r2=645493&view=diff
==============================================================================
--- archiva/trunk/archiva-cli/src/main/assembly/archiva-cli-assembly.xml (original)
+++ archiva/trunk/archiva-cli/src/main/assembly/archiva-cli-assembly.xml Mon Apr  7 06:13:06 2008
@@ -38,6 +38,10 @@
       <outputDirectory>/</outputDirectory>
       <unpack>true</unpack>
       <scope>runtime</scope>
+      <excludes>
+        <exclude>xml-apis:xml-apis</exclude>
+        <exclude>xalan:xalan</exclude>
+      </excludes>
     </dependencySet>
   </dependencySets>
 </assembly>

Modified: archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java?rev=645493&r1=645492&r2=645493&view=diff
==============================================================================
--- archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java (original)
+++ archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java Mon Apr  7 06:13:06 2008
@@ -19,60 +19,49 @@
  * under the License.
  */
 
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.Option;
-import org.apache.commons.cli.Options;
 import org.apache.commons.lang.StringUtils;
 import org.apache.maven.archiva.configuration.ArchivaConfiguration;
 import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
 import org.apache.maven.archiva.consumers.ConsumerException;
+import org.apache.maven.archiva.consumers.InvalidRepositoryContentConsumer;
+import org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer;
 import org.apache.maven.archiva.consumers.RepositoryContentConsumer;
 import org.apache.maven.archiva.converter.RepositoryConversionException;
 import org.apache.maven.archiva.converter.legacy.LegacyRepositoryConverter;
 import org.apache.maven.archiva.repository.RepositoryException;
 import org.apache.maven.archiva.repository.scanner.RepositoryScanStatistics;
 import org.apache.maven.archiva.repository.scanner.RepositoryScanner;
-import org.codehaus.plexus.PlexusContainer;
-import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
-import org.codehaus.plexus.tools.cli.AbstractCli;
+import org.codehaus.plexus.spring.PlexusClassPathXmlApplicationContext;
+import org.codehaus.plexus.spring.PlexusToSpringUtils;
+
+import com.sampullara.cli.Args;
+import com.sampullara.cli.Argument;
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 
 /**
- * ArchivaCli 
- *
+ * ArchivaCli
+ * 
+ * @todo add back reading of archiva.xml from a given location
  * @author Jason van Zyl
  * @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
  * @version $Id$
  */
 public class ArchivaCli
-    extends AbstractCli
 {
     // ----------------------------------------------------------------------------
-    // Options
-    // ----------------------------------------------------------------------------
-
-    public static final char CONVERT = 'c';
-
-    public static final char SCAN = 's';
-
-    public static final char CONSUMERS = 'u';
-
-    public static final char LIST_CONSUMERS = 'l';
-
-    public static final char DUMP_CONFIGURATION = 'd';
-
-    // ----------------------------------------------------------------------------
     // Properties controlling Repository conversion
     // ----------------------------------------------------------------------------
 
@@ -82,111 +71,102 @@
 
     public static final String BLACKLISTED_PATTERNS = "blacklistPatterns";
 
-    /**
-     * Configuration store.
-     *
-     * @plexus.requirement
-     */
-    private ArchivaConfiguration archivaConfiguration;
-
-    public static void main( String[] args )
-        throws Exception
+    private static String getVersion()
+        throws IOException
     {
-        new ArchivaCli().execute( args );
+        Properties properties = new Properties();
+        properties.load( ArchivaCli.class.getResourceAsStream( "/META-INF/maven/org.apache.archiva/archiva-cli/pom.properties" ) );
+        return properties.getProperty( "version" );
     }
 
-    public String getPomPropertiesPath()
-    {
-        return "META-INF/maven/org.apache.maven.archiva/archiva-cli/pom.properties";
-    }
+    private PlexusClassPathXmlApplicationContext applicationContext;
 
-    private Option createOption( char shortOpt, String longOpt, int argCount, String description )
+    public ArchivaCli()
     {
-        boolean hasArg = ( argCount > 0 );
-        Option opt = new Option( String.valueOf( shortOpt ), hasArg, description );
-        opt.setLongOpt( longOpt );
-        if ( hasArg )
-        {
-            opt.setArgs( argCount );
-        }
-        return opt;
+        applicationContext =
+            new PlexusClassPathXmlApplicationContext( new String[] { "classpath*:/META-INF/spring-context.xml",
+                "classpath*:/META-INF/plexus/components.xml" } );
     }
 
-    public Options buildCliOptions( Options options )
+    public static void main( String[] args )
+        throws Exception
     {
-        Option convertOption = createOption( CONVERT, "convert", 1, "Convert a legacy Maven 1.x repository to a "
-            + "Maven 2.x repository using a properties file to describe the conversion." );
-        convertOption.setArgName( "conversion.properties" );
-        options.addOption( convertOption );
-
-        Option scanOption = createOption( SCAN, "scan", 1, "Scan the specified repository." );
-        scanOption.setArgName( "repository directory" );
-        options.addOption( scanOption );
+        Commands command = new Commands();
 
-        Option consumerOption = createOption( CONSUMERS, "consumers", 1, "The consumers to use. "
-            + "(comma delimited. default: 'count-artifacts')" );
-        consumerOption.setArgName( "consumer list" );
-        options.addOption( consumerOption );
-
-        Option listConsumersOption = createOption( LIST_CONSUMERS, "listconsumers", 0, "List available consumers." );
-        options.addOption( listConsumersOption );
-
-        Option dumpConfig = createOption( DUMP_CONFIGURATION, "dumpconfig", 0, "Dump Current Configuration." );
-        options.addOption( dumpConfig );
+        try
+        {
+            Args.parse( command, args );
+        }
+        catch ( IllegalArgumentException e )
+        {
+            System.err.println( e.getMessage() );
+            Args.usage( command );
+            return;
+        }
 
-        return options;
+        new ArchivaCli().execute( command );
     }
 
-    public void invokePlexusComponent( CommandLine cli, PlexusContainer plexus )
+    private void execute( Commands command )
         throws Exception
     {
-        if ( cli.hasOption( CONVERT ) )
+        if ( command.help )
         {
-            doConversion( cli, plexus );
+            Args.usage( command );
         }
-        else if ( cli.hasOption( SCAN ) )
+        else if ( command.version )
         {
-            doScan( cli, plexus );
+            System.out.print( "Version: " + getVersion() );
         }
-        else if ( cli.hasOption( LIST_CONSUMERS ) )
+        else if ( command.convert )
         {
-            dumpAvailableConsumers( plexus );
+            doConversion( command.properties );
         }
-        else if ( cli.hasOption( DUMP_CONFIGURATION ) )
+        else if ( command.scan )
         {
-            dumpConfiguration( plexus );
+            if ( command.repository == null )
+            {
+                System.err.println( "The repository must be specified." );
+                Args.usage( command );
+                return;
+            }
+
+            doScan( command.repository, command.consumers.split( "," ) );
+        }
+        else if ( command.listConsumers )
+        {
+            dumpAvailableConsumers();
         }
         else
         {
-            displayHelp();
+            Args.usage( command );
         }
     }
 
-    private void doScan( CommandLine cli, PlexusContainer plexus )
-        throws ConsumerException, ComponentLookupException
+    private void doScan( String path, String[] consumers )
+        throws ConsumerException
     {
-        String path = cli.getOptionValue( SCAN );
-
         ManagedRepositoryConfiguration repo = new ManagedRepositoryConfiguration();
         repo.setId( "cliRepo" );
         repo.setName( "Archiva CLI Provided Repo" );
         repo.setLocation( path );
 
-        List knownConsumerList = new ArrayList();
+        List<KnownRepositoryContentConsumer> knownConsumerList = new ArrayList<KnownRepositoryContentConsumer>();
 
-        knownConsumerList.addAll( getConsumerList( cli, plexus ) );
+        knownConsumerList.addAll( getConsumerList( consumers ) );
 
-        List invalidConsumerList = Collections.EMPTY_LIST;
+        List<InvalidRepositoryContentConsumer> invalidConsumerList = Collections.emptyList();
 
-        List ignoredContent = new ArrayList();
+        List<String> ignoredContent = new ArrayList<String>();
         ignoredContent.addAll( Arrays.asList( RepositoryScanner.IGNORABLE_CONTENT ) );
 
-        RepositoryScanner scanner = (RepositoryScanner) plexus.lookup( RepositoryScanner.class );
+        RepositoryScanner scanner = (RepositoryScanner) lookup( RepositoryScanner.class );
 
         try
         {
-            RepositoryScanStatistics stats = scanner.scan( repo, knownConsumerList, invalidConsumerList,
-                                                           ignoredContent, RepositoryScanner.FRESH_SCAN );
+            RepositoryScanStatistics stats =
+                scanner.scan( repo, knownConsumerList, invalidConsumerList, ignoredContent,
+                              RepositoryScanner.FRESH_SCAN );
 
             System.out.println( "\n" + stats.toDump( repo ) );
         }
@@ -196,29 +176,24 @@
         }
     }
 
-    private Collection getConsumerList( CommandLine cli, PlexusContainer plexus )
-        throws ComponentLookupException, ConsumerException
+    private Object lookup( Class<?> clazz )
     {
-        String specifiedConsumers = "count-artifacts";
-
-        if ( cli.hasOption( CONSUMERS ) )
-        {
-            specifiedConsumers = cli.getOptionValue( CONSUMERS );
-        }
-
-        List consumerList = new ArrayList();
+        return applicationContext.getBean( PlexusToSpringUtils.buildSpringId( clazz.getName(), null ) );
+    }
 
-        Map availableConsumers = plexus.lookupMap( RepositoryContentConsumer.class );
+    private List<KnownRepositoryContentConsumer> getConsumerList( String[] consumers )
+        throws ConsumerException
+    {
+        List<KnownRepositoryContentConsumer> consumerList = new ArrayList<KnownRepositoryContentConsumer>();
 
-        String consumerArray[] = StringUtils.split( specifiedConsumers, ',' );
+        Map<String, KnownRepositoryContentConsumer> availableConsumers = getConsumers();
 
-        for ( int i = 0; i < consumerArray.length; i++ )
+        for ( String specifiedConsumer : consumers )
         {
-            String specifiedConsumer = consumerArray[i];
             if ( !availableConsumers.containsKey( specifiedConsumer ) )
             {
                 System.err.println( "Specified consumer [" + specifiedConsumer + "] not found." );
-                dumpAvailableConsumers( plexus );
+                dumpAvailableConsumers();
                 System.exit( 1 );
             }
 
@@ -228,16 +203,14 @@
         return consumerList;
     }
 
-    private void dumpAvailableConsumers( PlexusContainer plexus )
-        throws ComponentLookupException
+    private void dumpAvailableConsumers()
     {
-        Map availableConsumers = plexus.lookupMap( RepositoryContentConsumer.class );
+        Map<String, KnownRepositoryContentConsumer> availableConsumers = getConsumers();
 
         System.out.println( ".\\ Available Consumer List \\.______________________________" );
 
-        for ( Iterator iter = availableConsumers.entrySet().iterator(); iter.hasNext(); )
+        for ( Map.Entry<String, KnownRepositoryContentConsumer> entry : availableConsumers.entrySet() )
         {
-            Map.Entry entry = (Map.Entry) iter.next();
             String consumerHint = (String) entry.getKey();
             RepositoryContentConsumer consumer = (RepositoryContentConsumer) entry.getValue();
             System.out.println( "  " + consumerHint + ": " + consumer.getDescription() + " ("
@@ -245,22 +218,21 @@
         }
     }
 
-    private void doConversion( CommandLine cli, PlexusContainer plexus )
-        throws ComponentLookupException
+    @SuppressWarnings("unchecked")
+    private Map<String, KnownRepositoryContentConsumer> getConsumers()
     {
-        LegacyRepositoryConverter legacyRepositoryConverter = (LegacyRepositoryConverter) plexus
-            .lookup( LegacyRepositoryConverter.ROLE );
+        return PlexusToSpringUtils.lookupMap( "knownRepositoryContentConsumer", applicationContext );
+    }
+
+    private void doConversion( String properties )
+        throws FileNotFoundException, IOException, RepositoryConversionException
+    {
+        LegacyRepositoryConverter legacyRepositoryConverter =
+            (LegacyRepositoryConverter) lookup( LegacyRepositoryConverter.class );
 
         Properties p = new Properties();
 
-        try
-        {
-            p.load( new FileInputStream( cli.getOptionValue( CONVERT ) ) );
-        }
-        catch ( IOException e )
-        {
-            showFatalError( "Cannot find properties file which describes the conversion.", e, true );
-        }
+        p.load( new FileInputStream( properties ) );
 
         File oldRepositoryPath = new File( p.getProperty( SOURCE_REPO_PATH ) );
 
@@ -268,7 +240,7 @@
 
         System.out.println( "Converting " + oldRepositoryPath + " to " + newRepositoryPath );
 
-        List fileExclusionPatterns = null;
+        List<String> fileExclusionPatterns = null;
 
         String s = p.getProperty( BLACKLISTED_PATTERNS );
 
@@ -277,23 +249,33 @@
             fileExclusionPatterns = Arrays.asList( StringUtils.split( s, "," ) );
         }
 
-        try
-        {
-            legacyRepositoryConverter.convertLegacyRepository( oldRepositoryPath, newRepositoryPath,
-                                                               fileExclusionPatterns );
-        }
-        catch ( RepositoryConversionException e )
-        {
-            showFatalError( "Error converting repository.", e, true );
-        }
+        legacyRepositoryConverter.convertLegacyRepository( oldRepositoryPath, newRepositoryPath, fileExclusionPatterns );
     }
 
-    private void dumpConfiguration( PlexusContainer plexus )
-        throws ComponentLookupException
+    private static class Commands
     {
-        archivaConfiguration = (ArchivaConfiguration) plexus.lookup( ArchivaConfiguration.ROLE, "cli" );
+        @Argument( description = "Display help information", value = "help", alias = "h" )
+        private boolean help;
+
+        @Argument( description = "Display version information", value = "version", alias = "v" )
+        private boolean version;
+
+        @Argument( description = "List available consumers", value = "listconsumers", alias = "l" )
+        private boolean listConsumers;
+
+        @Argument( description = "The consumers to use (comma delimited)", value = "consumers", alias = "u" )
+        private String consumers = "count-artifacts";
+
+        @Argument( description = "Scan the specified repository", value = "scan", alias = "s" )
+        private boolean scan;
+
+        @Argument( description = "Convert a legacy Maven 1.x repository to a Maven 2.x repository using a properties file to describe the conversion", value = "convert", alias = "c" )
+        private boolean convert;
+
+        @Argument( description = "The properties file for the converstion", value = "properties" )
+        private String properties = "conversion.properties";
 
-        System.out.println( "File Type Count: "
-            + archivaConfiguration.getConfiguration().getRepositoryScanning().getFileTypes().size() );
+        @Argument( description = "The repository to scan", value = "repository" )
+        private String repository;
     }
 }

Modified: archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArtifactCountConsumer.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArtifactCountConsumer.java?rev=645493&r1=645492&r2=645493&view=diff
==============================================================================
--- archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArtifactCountConsumer.java (original)
+++ archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArtifactCountConsumer.java Mon Apr  7 06:13:06 2008
@@ -19,24 +19,24 @@
  * under the License.
  */
 
-import org.apache.maven.archiva.consumers.RepositoryContentConsumer;
-
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer;
+
 /**
  * ArtifactCountConsumer 
  *
  * @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
  * @version $Id$
  * 
- * @plexus.component role="org.apache.maven.archiva.consumers.RepositoryContentConsumer"
+ * @plexus.component role="org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer"
  *                   role-hint="count-artifacts"
  *                   instantiation-strategy="per-lookup"
  */
 public class ArtifactCountConsumer
     extends AbstractProgressConsumer
-    implements RepositoryContentConsumer
+    implements KnownRepositoryContentConsumer
 {
     /**
      * @plexus.configuration default-value="count-artifacts"

Modified: archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ProjectReaderConsumer.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ProjectReaderConsumer.java?rev=645493&r1=645492&r2=645493&view=diff
==============================================================================
--- archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ProjectReaderConsumer.java (original)
+++ archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ProjectReaderConsumer.java Mon Apr  7 06:13:06 2008
@@ -19,31 +19,31 @@
  * under the License.
  */
 
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
 import org.apache.maven.archiva.consumers.ConsumerException;
-import org.apache.maven.archiva.consumers.RepositoryContentConsumer;
+import org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer;
 import org.apache.maven.archiva.model.ArchivaProjectModel;
 import org.apache.maven.archiva.repository.project.ProjectModelException;
 import org.apache.maven.archiva.repository.project.ProjectModelReader;
 import org.apache.maven.archiva.repository.project.readers.ProjectModel400Reader;
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
 /**
  * ProjectReaderConsumer 
  *
  * @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
  * @version $Id$
  * 
- * @plexus.component role="org.apache.maven.archiva.consumers.RepositoryContentConsumer"
+ * @plexus.component role="org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer"
  *                   role-hint="read-poms"
  *                   instantiation-strategy="per-lookup"
  */
 public class ProjectReaderConsumer
     extends AbstractProgressConsumer
-    implements RepositoryContentConsumer
+    implements KnownRepositoryContentConsumer
 {
     /**
      * @plexus.configuration default-value="read-poms"

Modified: archiva/trunk/archiva-cli/src/main/resources/log4j.properties
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-cli/src/main/resources/log4j.properties?rev=645493&r1=645492&r2=645493&view=diff
==============================================================================
--- archiva/trunk/archiva-cli/src/main/resources/log4j.properties (original)
+++ archiva/trunk/archiva-cli/src/main/resources/log4j.properties Mon Apr  7 06:13:06 2008
@@ -1,10 +1,10 @@
 # Set root logger level to DEBUG and its only appender to A1.
-log4j.rootLogger=INFO, A1
+log4j.rootLogger=ERROR, 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
+log4j.appender.A1.layout.ConversionPattern=[%t] %-5p %c %x - %m%n