]> source.dussan.org Git - archiva.git/commitdiff
rename configuration file
authorBrett Porter <brett@apache.org>
Sat, 26 Aug 2006 07:30:41 +0000 (07:30 +0000)
committerBrett Porter <brett@apache.org>
Sat, 26 Aug 2006 07:30:41 +0000 (07:30 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@437111 13f79535-47bb-0310-9956-ffa450edef68

archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultConfigurationStore.java

index 0279c685c0c7a78e9a39d9a7e8558c9fe96944fd..7a31d64d83c1c80e9c71672caa45cf725712f71f 100644 (file)
@@ -69,7 +69,18 @@ public class DefaultConfigurationStore
 
             if ( file == null )
             {
-                file = new File( System.getProperty( "user.home" ), "/.m2/archiva-manager.xml" );
+                file = new File( System.getProperty( "user.home" ), "/.m2/archiva.xml" );
+
+                // migration for those with the old file
+                if ( !file.exists() )
+                {
+                    File file = new File( System.getProperty( "user.home" ), "/.m2/repository-manager.xml" );
+                    if ( file.exists() )
+                    {
+                        getLogger().info( "Migrating " + file + " to " + this.file );
+                        file.renameTo( this.file );
+                    }
+                }
             }
 
             FileReader fileReader;