mirror of https://github.com/apache/maven.git
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:
parent
2327f170e6
commit
260516f8d2
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue