archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r489857 - 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/main/java/org/apache/maven/archiva/conversion/ archiva-core/src/test/java/org/a...
Date Sat, 23 Dec 2006 06:09:31 GMT
Author: brett
Date: Fri Dec 22 22:09:30 2006
New Revision: 489857

URL: http://svn.apache.org/viewvc?view=rev&rev=489857
Log:
Get rid of old Archiva component

Added:
    maven/archiva/trunk/archiva-core/src/test/java/org/apache/maven/archiva/LegacyRepositoryConverterTest.java
  (contents, props changed)
      - copied, changed from r489787, maven/archiva/trunk/archiva-core/src/test/java/org/apache/maven/archiva/ArchivaTest.java
Removed:
    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/ArchivaCli.java
    maven/archiva/trunk/archiva-core/src/main/java/org/apache/maven/archiva/conversion/DefaultLegacyRepositoryConverter.java

Modified: maven/archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java?view=diff&rev=489857&r1=489856&r2=489857
==============================================================================
--- maven/archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java
(original)
+++ maven/archiva/trunk/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ArchivaCli.java
Fri Dec 22 22:09:30 2006
@@ -3,12 +3,12 @@
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.OptionBuilder;
 import org.apache.commons.cli.Options;
-import org.apache.maven.archiva.Archiva;
+import org.apache.commons.lang.StringUtils;
+import org.apache.maven.archiva.conversion.LegacyRepositoryConverter;
 import org.apache.maven.archiva.converter.RepositoryConversionException;
 import org.apache.maven.archiva.discoverer.DiscovererException;
 import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.tools.cli.AbstractCli;
-import org.apache.commons.lang.StringUtils;
 
 import java.io.File;
 import java.io.FileInputStream;
@@ -59,11 +59,11 @@
         return options;
     }
 
-    public void invokePlexusComponent( CommandLine cli,
-                                       PlexusContainer plexus )
+    public void invokePlexusComponent( CommandLine cli, PlexusContainer plexus )
         throws Exception
     {
-        Archiva archiva = (Archiva) plexus.lookup( Archiva.ROLE );
+        LegacyRepositoryConverter legacyRepositoryConverter =
+            (LegacyRepositoryConverter) plexus.lookup( LegacyRepositoryConverter.ROLE );
 
         if ( cli.hasOption( CONVERT ) )
         {
@@ -95,7 +95,8 @@
 
             try
             {
-                archiva.convertLegacyRepository( oldRepositoryPath, newRepositoryPath, blacklistedPatterns,
true );
+                legacyRepositoryConverter.convertLegacyRepository( oldRepositoryPath, newRepositoryPath,
+                                                                   blacklistedPatterns, true
);
             }
             catch ( RepositoryConversionException e )
             {

Modified: maven/archiva/trunk/archiva-core/src/main/java/org/apache/maven/archiva/conversion/DefaultLegacyRepositoryConverter.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-core/src/main/java/org/apache/maven/archiva/conversion/DefaultLegacyRepositoryConverter.java?view=diff&rev=489857&r1=489856&r2=489857
==============================================================================
--- maven/archiva/trunk/archiva-core/src/main/java/org/apache/maven/archiva/conversion/DefaultLegacyRepositoryConverter.java
(original)
+++ maven/archiva/trunk/archiva-core/src/main/java/org/apache/maven/archiva/conversion/DefaultLegacyRepositoryConverter.java
Fri Dec 22 22:09:30 2006
@@ -1,19 +1,18 @@
 package org.apache.maven.archiva.conversion;
 
-import org.apache.maven.archiva.Archiva;
-import org.apache.maven.archiva.reporting.group.ReportGroup;
-import org.apache.maven.archiva.reporting.database.ReportingDatabase;
-import org.apache.maven.archiva.reporting.store.ReportingStore;
-import org.apache.maven.archiva.reporting.store.ReportingStoreException;
-import org.apache.maven.archiva.converter.RepositoryConverter;
 import org.apache.maven.archiva.converter.RepositoryConversionException;
+import org.apache.maven.archiva.converter.RepositoryConverter;
 import org.apache.maven.archiva.discoverer.ArtifactDiscoverer;
 import org.apache.maven.archiva.discoverer.DiscovererException;
 import org.apache.maven.archiva.discoverer.filter.AcceptAllArtifactFilter;
 import org.apache.maven.archiva.discoverer.filter.SnapshotArtifactFilter;
-import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
-import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
+import org.apache.maven.archiva.reporting.database.ReportingDatabase;
+import org.apache.maven.archiva.reporting.group.ReportGroup;
+import org.apache.maven.archiva.reporting.store.ReportingStore;
+import org.apache.maven.archiva.reporting.store.ReportingStoreException;
 import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
+import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
 
 import java.io.File;
@@ -24,6 +23,7 @@
  * @author Jason van Zyl
  * @plexus.component
  * @todo turn this into a general conversion component and hide all this crap here.
+ * @todo it should be possible to move this to the converter module without causing it to
gain additional dependencies
  */
 public class DefaultLegacyRepositoryConverter
     implements LegacyRepositoryConverter
@@ -63,10 +63,8 @@
      */
     private ReportGroup reportGroup;
 
-    public void convertLegacyRepository( File legacyRepositoryDirectory,
-                                         File repositoryDirectory,
-                                         List blacklistedPatterns,
-                                         boolean includeSnapshots )
+    public void convertLegacyRepository( File legacyRepositoryDirectory, File repositoryDirectory,
+                                         List blacklistedPatterns, boolean includeSnapshots
)
         throws RepositoryConversionException, DiscovererException
     {
         ArtifactRepository legacyRepository;

Copied: maven/archiva/trunk/archiva-core/src/test/java/org/apache/maven/archiva/LegacyRepositoryConverterTest.java
(from r489787, 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/LegacyRepositoryConverterTest.java?view=diff&rev=489857&p1=maven/archiva/trunk/archiva-core/src/test/java/org/apache/maven/archiva/ArchivaTest.java&r1=489787&p2=maven/archiva/trunk/archiva-core/src/test/java/org/apache/maven/archiva/LegacyRepositoryConverterTest.java&r2=489857
==============================================================================
--- 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/LegacyRepositoryConverterTest.java
Fri Dec 22 22:09:30 2006
@@ -1,21 +1,25 @@
 package org.apache.maven.archiva;
 
 /*
- * Copyright 2005-2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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
  *
- * 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
  *
- *      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.
+ * 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.apache.maven.archiva.conversion.LegacyRepositoryConverter;
 import org.codehaus.plexus.PlexusTestCase;
 
 import java.io.File;
@@ -23,7 +27,7 @@
 /**
  * @author Jason van Zyl
  */
-public class ArchivaTest
+public class LegacyRepositoryConverterTest
     extends PlexusTestCase
 {
     public void testLegacyRepositoryConversion()
@@ -33,7 +37,7 @@
 
         File repositoryDirectory = getTestFile( "target/maven-2.x-repository" );
 
-        Archiva rm = (Archiva) lookup( Archiva.ROLE );
+        LegacyRepositoryConverter rm = (LegacyRepositoryConverter) lookup( LegacyRepositoryConverter.ROLE
);
 
         rm.convertLegacyRepository( legacyRepositoryDirectory, repositoryDirectory, null,
true );
     }

Propchange: maven/archiva/trunk/archiva-core/src/test/java/org/apache/maven/archiva/LegacyRepositoryConverterTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archiva/trunk/archiva-core/src/test/java/org/apache/maven/archiva/LegacyRepositoryConverterTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision



Mime
View raw message