archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r471110 - in /maven/archiva/trunk: archiva-cli/src/main/java/org/apache/maven/archiva/cli/ archiva-core/src/main/java/org/apache/maven/archiva/ archiva-core/src/test/java/org/apache/maven/archiva/
Date Sat, 04 Nov 2006 04:05:10 GMT
Author: jvanzyl
Date: Fri Nov  3 20:05:09 2006
New Revision: 471110

URL: http://svn.apache.org/viewvc?view=rev&rev=471110
Log:
o some files idea missed, 6.0 is buuuuggy


Modified:
    maven/archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/Cli.java
    maven/archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/CliManager.java
    maven/archiva/trunk/archiva-core/src/main/java/org/apache/maven/archiva/Archiva.java
    maven/archiva/trunk/archiva-core/src/main/java/org/apache/maven/archiva/DefaultArchiva.java
    maven/archiva/trunk/archiva-core/src/test/java/org/apache/maven/archiva/ArchivaTest.java

Modified: maven/archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/Cli.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/Cli.java?view=diff&rev=471110&r1=471109&r2=471110
==============================================================================
--- maven/archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/Cli.java (original)
+++ maven/archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/Cli.java Fri
Nov  3 20:05:09 2006
@@ -25,12 +25,15 @@
 import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.DefaultPlexusContainer;
 import org.codehaus.plexus.PlexusContainerException;
+import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
 
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.File;
 import java.util.Properties;
+import java.util.List;
+import java.util.Arrays;
 
 /**
  * @author jason van zyl
@@ -160,9 +163,16 @@
 
                     System.out.println( "Converting " + oldRepositoryPath + " to " + newRepositoryPath
);
 
+                    List blacklistedPatterns = null;
+
+                    if ( cli.hasOption( CliManager.BLACKLISTED_PATTERNS ) )
+                    {
+                        blacklistedPatterns = Arrays.asList( StringUtils.split( cli.getOptionValue(
CliManager.BLACKLISTED_PATTERNS ), "," ) );
+                    }
+
                     try
                     {
-                        archiva.convertLegacyRepository( oldRepositoryPath, newRepositoryPath,
true );
+                        archiva.convertLegacyRepository( oldRepositoryPath, newRepositoryPath,
blacklistedPatterns, true );
                     }
                     catch ( RepositoryConversionException e )
                     {

Modified: maven/archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/CliManager.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/CliManager.java?view=diff&rev=471110&r1=471109&r2=471110
==============================================================================
--- maven/archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/CliManager.java
(original)
+++ maven/archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/CliManager.java
Fri Nov  3 20:05:09 2006
@@ -23,6 +23,8 @@
 
     public static final char NEW_REPOSITORY_PATH = 'n';
 
+    public static final char BLACKLISTED_PATTERNS = 'b';
+
     // ----------------------------------------------------------------------------
     // These are standard options that we would want to use for all our projects.
     // ----------------------------------------------------------------------------
@@ -53,6 +55,9 @@
 
         options.addOption( OptionBuilder.withLongOpt( "new-repo" ).hasArg().withDescription(
             "Path to newly created Maven 2.x repository." ).create( NEW_REPOSITORY_PATH )
);
+
+        options.addOption( OptionBuilder.withLongOpt( "new-repo" ).hasArg().withDescription(
+            "Path to newly created Maven 2.x repository." ).create( BLACKLISTED_PATTERNS
 ) );
     }
 
     public CommandLine parse( String[] args )

Modified: maven/archiva/trunk/archiva-core/src/main/java/org/apache/maven/archiva/Archiva.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-core/src/main/java/org/apache/maven/archiva/Archiva.java?view=diff&rev=471110&r1=471109&r2=471110
==============================================================================
--- maven/archiva/trunk/archiva-core/src/main/java/org/apache/maven/archiva/Archiva.java (original)
+++ maven/archiva/trunk/archiva-core/src/main/java/org/apache/maven/archiva/Archiva.java Fri
Nov  3 20:05:09 2006
@@ -20,6 +20,7 @@
 import org.apache.maven.archiva.discoverer.DiscovererException;
 
 import java.io.File;
+import java.util.List;
 
 /**
  * @author Jason van Zyl
@@ -39,6 +40,9 @@
      * @param repositoryDirectory
      * @throws RepositoryConversionException
      */
-    void convertLegacyRepository( File legacyRepositoryDirectory, File repositoryDirectory,
boolean includeSnapshots )
+    void convertLegacyRepository( File legacyRepositoryDirectory,
+                                  File repositoryDirectory,
+                                  List blacklistedPatterns,
+                                  boolean includeSnapshots )
         throws RepositoryConversionException, DiscovererException;
 }

Modified: maven/archiva/trunk/archiva-core/src/main/java/org/apache/maven/archiva/DefaultArchiva.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-core/src/main/java/org/apache/maven/archiva/DefaultArchiva.java?view=diff&rev=471110&r1=471109&r2=471110
==============================================================================
--- maven/archiva/trunk/archiva-core/src/main/java/org/apache/maven/archiva/DefaultArchiva.java
(original)
+++ maven/archiva/trunk/archiva-core/src/main/java/org/apache/maven/archiva/DefaultArchiva.java
Fri Nov  3 20:05:09 2006
@@ -21,6 +21,7 @@
 import org.apache.maven.archiva.discoverer.DiscovererException;
 
 import java.io.File;
+import java.util.List;
 
 /**
  * @author Jason van Zyl
@@ -37,10 +38,13 @@
 
     public void convertLegacyRepository( File legacyRepositoryDirectory,
                                          File repositoryDirectory,
+                                         List blacklistedPatterns,
                                          boolean includeSnapshots )
         throws RepositoryConversionException, DiscovererException
     {
-        legacyRepositoryConverter.convertLegacyRepository( legacyRepositoryDirectory, repositoryDirectory,
+        legacyRepositoryConverter.convertLegacyRepository( legacyRepositoryDirectory,
+                                                           repositoryDirectory,
+                                                           blacklistedPatterns,
                                                            includeSnapshots );
     }
 }

Modified: maven/archiva/trunk/archiva-core/src/test/java/org/apache/maven/archiva/ArchivaTest.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-core/src/test/java/org/apache/maven/archiva/ArchivaTest.java?view=diff&rev=471110&r1=471109&r2=471110
==============================================================================
--- maven/archiva/trunk/archiva-core/src/test/java/org/apache/maven/archiva/ArchivaTest.java
(original)
+++ maven/archiva/trunk/archiva-core/src/test/java/org/apache/maven/archiva/ArchivaTest.java
Fri Nov  3 20:05:09 2006
@@ -35,6 +35,6 @@
 
         Archiva rm = (Archiva) lookup( Archiva.ROLE );
 
-        rm.convertLegacyRepository( legacyRepositoryDirectory, repositoryDirectory, true
);
+        rm.convertLegacyRepository( legacyRepositoryDirectory, repositoryDirectory, null,
true );
     }
 }



Mime
View raw message