]> source.dussan.org Git - archiva.git/commitdiff
o allow for blacklisted patterns
authorJason van Zyl <jvanzyl@apache.org>
Sat, 4 Nov 2006 04:00:46 +0000 (04:00 +0000)
committerJason van Zyl <jvanzyl@apache.org>
Sat, 4 Nov 2006 04:00:46 +0000 (04:00 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@471109 13f79535-47bb-0310-9956-ffa450edef68

archiva-core/src/main/java/org/apache/maven/archiva/conversion/DefaultLegacyRepositoryConverter.java
archiva-core/src/main/java/org/apache/maven/archiva/conversion/LegacyRepositoryConverter.java
archiva-core/src/test/java/org/apache/maven/archiva/ArchivaTest.java [new file with mode: 0644]
archiva-core/src/test/java/org/apache/maven/archiva/RepositoryManagerTest.java [deleted file]
maven-meeper/src/bin/m1-m2-conversion/archiva-cli-1.0-SNAPSHOT-cli.jar [new file with mode: 0644]
pom.xml

index 6673f19ecded266a5e9486efad85e406051d51e9..9720bdb53775b9f826006415edebeed2e06ea486 100644 (file)
@@ -63,7 +63,9 @@ public class DefaultLegacyRepositoryConverter
      */
     private ReportGroup reportGroup;
 
-    public void convertLegacyRepository( File legacyRepositoryDirectory, File repositoryDirectory,
+    public void convertLegacyRepository( File legacyRepositoryDirectory,
+                                         File repositoryDirectory,
+                                         List blacklistedPatterns,
                                          boolean includeSnapshots )
         throws RepositoryConversionException, DiscovererException
     {
@@ -88,7 +90,7 @@ public class DefaultLegacyRepositoryConverter
 
         ArtifactFilter filter =
             includeSnapshots ? new AcceptAllArtifactFilter() : (ArtifactFilter) new SnapshotArtifactFilter();
-        List legacyArtifacts = artifactDiscoverer.discoverArtifacts( legacyRepository, null, filter );
+        List legacyArtifacts = artifactDiscoverer.discoverArtifacts( legacyRepository, blacklistedPatterns, filter );
 
         ReportingDatabase reporter;
         try
index 17f6864a67c49fb433b004bd2612819404e654f2..e6e7a90e1874537d4b93f16e229d12048ee33ae7 100644 (file)
@@ -4,6 +4,7 @@ import org.apache.maven.archiva.converter.RepositoryConversionException;
 import org.apache.maven.archiva.discoverer.DiscovererException;
 
 import java.io.File;
+import java.util.List;
 
 /**
  * @author Jason van Zyl
@@ -19,7 +20,11 @@ public interface LegacyRepositoryConverter
      * @param legacyRepositoryDirectory
      * @param repositoryDirectory
      * @throws org.apache.maven.archiva.converter.RepositoryConversionException
+     *
      */
-    void convertLegacyRepository( File legacyRepositoryDirectory, File repositoryDirectory, boolean includeSnapshots )
+    void convertLegacyRepository( File legacyRepositoryDirectory,
+                                  File repositoryDirectory,
+                                  List blacklistedPatterns,
+                                  boolean includeSnapshots )
         throws RepositoryConversionException, DiscovererException;
 }
diff --git a/archiva-core/src/test/java/org/apache/maven/archiva/ArchivaTest.java b/archiva-core/src/test/java/org/apache/maven/archiva/ArchivaTest.java
new file mode 100644 (file)
index 0000000..9e916df
--- /dev/null
@@ -0,0 +1,40 @@
+package org.apache.maven.archiva;
+
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.codehaus.plexus.PlexusTestCase;
+
+import java.io.File;
+
+/**
+ * @author Jason van Zyl
+ */
+public class ArchivaTest
+    extends PlexusTestCase
+{
+    public void testLegacyRepositoryConversion()
+        throws Exception
+    {
+        File legacyRepositoryDirectory = getTestFile( "src/test/maven-1.x-repository" );
+
+        File repositoryDirectory = getTestFile( "target/maven-2.x-repository" );
+
+        Archiva rm = (Archiva) lookup( Archiva.ROLE );
+
+        rm.convertLegacyRepository( legacyRepositoryDirectory, repositoryDirectory, true );
+    }
+}
diff --git a/archiva-core/src/test/java/org/apache/maven/archiva/RepositoryManagerTest.java b/archiva-core/src/test/java/org/apache/maven/archiva/RepositoryManagerTest.java
deleted file mode 100644 (file)
index 6c2fa03..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-package org.apache.maven.archiva;
-
-/*
- * Copyright 2005-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import org.codehaus.plexus.PlexusTestCase;
-
-import java.io.File;
-
-/**
- * @author Jason van Zyl
- */
-public class RepositoryManagerTest
-    extends PlexusTestCase
-{
-    public void testLegacyRepositoryConversion()
-        throws Exception
-    {
-        File legacyRepositoryDirectory = getTestFile( "src/test/maven-1.x-repository" );
-
-        File repositoryDirectory = getTestFile( "target/maven-2.x-repository" );
-
-        Archiva rm = (Archiva) lookup( Archiva.ROLE );
-
-        rm.convertLegacyRepository( legacyRepositoryDirectory, repositoryDirectory, true );
-    }
-}
diff --git a/maven-meeper/src/bin/m1-m2-conversion/archiva-cli-1.0-SNAPSHOT-cli.jar b/maven-meeper/src/bin/m1-m2-conversion/archiva-cli-1.0-SNAPSHOT-cli.jar
new file mode 100644 (file)
index 0000000..c7598b8
Binary files /dev/null and b/maven-meeper/src/bin/m1-m2-conversion/archiva-cli-1.0-SNAPSHOT-cli.jar differ
diff --git a/pom.xml b/pom.xml
index eed4a0b81805858411181c0d058533f260715a92..f78633bfba8f3b8f52f6771c71373f83cf2e7f42 100644 (file)
--- a/pom.xml
+++ b/pom.xml
     <module>archiva-plexus-application</module>
     <module>archiva-plexus-runtime</module>
     <module>archiva-security</module>
+    <module>archiva-cli</module>
   </modules>
   <dependencies>
     <dependency>