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.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@555839 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2007-07-13 02:30:50 +00:00
parent 844e17d4b5
commit d78ddd4fed
2 changed files with 24 additions and 0 deletions

View File

@ -209,4 +209,19 @@ public class DefaultMavenSettingsBuilder
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" ) );
}
}

View File

@ -38,6 +38,15 @@ public interface MavenSettingsBuilder
{
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