Re-added 2 dropped methods that were never deprecated: buildSettings() and buildSettings( file ). maven-plugin-testing-tools uses the maven 2.0.x api's, but fails with NoSuchMethodError in 2.1-snapshot

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@489693 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Kenney Westerhof 2006-12-22 17:07:40 +00:00
parent 2327f170e6
commit 260516f8d2
2 changed files with 38 additions and 2 deletions

View File

@ -19,7 +19,6 @@ package org.apache.maven.settings;
import org.apache.maven.settings.io.xpp3.SettingsXpp3Reader;
import org.codehaus.plexus.logging.AbstractLogEnabled;
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.interpolation.EnvarBasedValueSource;
import org.codehaus.plexus.util.interpolation.RegexBasedInterpolator;
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
@ -44,6 +43,9 @@ public class DefaultMavenSettingsBuilder
// MavenProfilesBuilder Implementation
// ----------------------------------------------------------------------
/**
* @since 2.1
*/
public Settings buildSettings( File userSettingsFile, File globalSettingsFile )
throws IOException, XmlPullParserException
{
@ -70,6 +72,25 @@ public class DefaultMavenSettingsBuilder
return userSettings;
}
/**
* @deprecated
*/
public Settings buildSettings()
throws IOException, XmlPullParserException
{
return buildSettings( new File( new File( System.getProperty( "user.home" ) ), ".m2/settings.xml" ) );
}
/**
* @deprecated
*/
public Settings buildSettings( File userSettingsFile )
throws IOException, XmlPullParserException
{
return buildSettings( userSettingsFile, null );
}
private Settings readSettings( File settingsFile )
throws IOException, XmlPullParserException
{

View File

@ -29,6 +29,21 @@ public interface MavenSettingsBuilder
{
String ROLE = MavenSettingsBuilder.class.getName();
/**
* @deprecated
*/
Settings buildSettings()
throws IOException, XmlPullParserException;
/**
* @deprecated
*/
Settings buildSettings( File userSettingsFile )
throws IOException, XmlPullParserException;
/**
* @since 2.1
*/
Settings buildSettings( File userSettingsFile, File globalSettingsFile )
throws IOException, XmlPullParserException;
}