aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-cli/src
diff options
context:
space:
mode:
authorJason van Zyl <jvanzyl@apache.org>2006-11-04 04:05:09 +0000
committerJason van Zyl <jvanzyl@apache.org>2006-11-04 04:05:09 +0000
commit765e78ef3b81ac77f1cb8c5d1adbe10d074afdb5 (patch)
tree5fc4ab3b43ab9923035e7cdaaf0b04e6d32c0313 /archiva-cli/src
parentc5c102746cd47f8cfbb67c62be4a06302f07647e (diff)
downloadarchiva-765e78ef3b81ac77f1cb8c5d1adbe10d074afdb5.tar.gz
archiva-765e78ef3b81ac77f1cb8c5d1adbe10d074afdb5.zip
o some files idea missed, 6.0 is buuuuggy
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@471110 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-cli/src')
-rw-r--r--archiva-cli/src/main/java/org/apache/maven/archiva/cli/Cli.java12
-rw-r--r--archiva-cli/src/main/java/org/apache/maven/archiva/cli/CliManager.java5
2 files changed, 16 insertions, 1 deletions
diff --git a/archiva-cli/src/main/java/org/apache/maven/archiva/cli/Cli.java b/archiva-cli/src/main/java/org/apache/maven/archiva/cli/Cli.java
index 81f50c46a..57788c4b4 100644
--- a/archiva-cli/src/main/java/org/apache/maven/archiva/cli/Cli.java
+++ b/archiva-cli/src/main/java/org/apache/maven/archiva/cli/Cli.java
@@ -25,12 +25,15 @@ import org.codehaus.classworlds.ClassWorld;
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 @@ public class Cli
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 )
{
diff --git a/archiva-cli/src/main/java/org/apache/maven/archiva/cli/CliManager.java b/archiva-cli/src/main/java/org/apache/maven/archiva/cli/CliManager.java
index 06120de66..5b4d2b83f 100644
--- a/archiva-cli/src/main/java/org/apache/maven/archiva/cli/CliManager.java
+++ b/archiva-cli/src/main/java/org/apache/maven/archiva/cli/CliManager.java
@@ -23,6 +23,8 @@ public class CliManager
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 @@ public class CliManager
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 )