maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdca...@apache.org
Subject svn commit: r555839 - in /maven/components/trunk/maven-settings/src/main/java/org/apache/maven/settings: DefaultMavenSettingsBuilder.java MavenSettingsBuilder.java
Date Fri, 13 Jul 2007 02:30:50 GMT
Author: jdcasey
Date: Thu Jul 12 19:30:50 2007
New Revision: 555839

URL: http://svn.apache.org/viewvc?view=rev&rev=555839
Log:
Restoring backward compatibility and deprecating old methods, so plugins and shared utilities
can still use them without having to release new versions or suffer incompatibilities.

Modified:
    maven/components/trunk/maven-settings/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java
    maven/components/trunk/maven-settings/src/main/java/org/apache/maven/settings/MavenSettingsBuilder.java

Modified: maven/components/trunk/maven-settings/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-settings/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java?view=diff&rev=555839&r1=555838&r2=555839
==============================================================================
--- maven/components/trunk/maven-settings/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java
(original)
+++ maven/components/trunk/maven-settings/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java
Thu Jul 12 19:30:50 2007
@@ -209,4 +209,19 @@
             throw new IOException( "Failed to validate Settings file at " + location + "\n"
+ validationResult.render( "\n" ) );
         }
     }
+
+    /**
+      * @return a <code>Settings</code> object from the user and global settings
file.
+      * @throws IOException if any
+      * @throws XmlPullParserException if any
+      * @deprecated Use {@link org.apache.maven.settings.MavenSettingsBuilder#buildSettings(java.io.File,java.io.File)}
instead.
+     */
+    public Settings buildSettings()
+        throws IOException, XmlPullParserException
+    {
+        String mavenHome = System.getProperty( "maven.home" );
+        String userHome = System.getProperty( "user.home" );
+
+        return buildSettings( new File( userHome, ".m2/settings.xml" ), new File( mavenHome,
"conf/settings.xml" ) );
+    }
 }

Modified: maven/components/trunk/maven-settings/src/main/java/org/apache/maven/settings/MavenSettingsBuilder.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-settings/src/main/java/org/apache/maven/settings/MavenSettingsBuilder.java?view=diff&rev=555839&r1=555838&r2=555839
==============================================================================
--- maven/components/trunk/maven-settings/src/main/java/org/apache/maven/settings/MavenSettingsBuilder.java
(original)
+++ maven/components/trunk/maven-settings/src/main/java/org/apache/maven/settings/MavenSettingsBuilder.java
Thu Jul 12 19:30:50 2007
@@ -39,6 +39,15 @@
     String ROLE = MavenSettingsBuilder.class.getName();
 
     /**
+    * @return a <code>Settings</code> object from the user and global settings
file.
+    * @throws IOException if any
+    * @throws XmlPullParserException if any
+    * @deprecated Use {@link org.apache.maven.settings.MavenSettingsBuilder#buildSettings(java.io.File,java.io.File)}
instead.
+    */
+   Settings buildSettings()
+       throws IOException, XmlPullParserException;
+
+    /**
      *
      * @param userSettingsFile
      * @param globalSettingsFile



Mime
View raw message