o the release plugin manages to somehow get its own instance of a Settings so the SettingsAdapter which I use everywhere else gets used except in the release plugin so I have to jack back in the hardcoded RuntimeInfo until I figure out why. not a big deal, i'll list it in the compatibility notes. on another note if you start the release process using release:prepare and it fails, you make code changes, it will happily let you continue and not check the status again.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@731273 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2009-01-04 15:32:19 +00:00
parent cc38a455f7
commit bfe3cbf4e9
3 changed files with 30 additions and 1 deletions

View File

@ -29,8 +29,19 @@ import java.io.File;
*/
public class RuntimeInfo
{
public static final String userHome = System.getProperty( "user.home" );
public static final File userMavenConfigurationHome = new File( userHome, ".m2" );
public static final File DEFAULT_USER_SETTINGS_FILE = new File( userMavenConfigurationHome, "settings.xml" );
private File settings;
public RuntimeInfo()
{
this.settings = DEFAULT_USER_SETTINGS_FILE;
}
public RuntimeInfo( File settings )
{
this.settings = settings;

View File

@ -336,6 +336,7 @@ public class PluginParameterExpressionEvaluator
else if ( "settings".equals( expression ) )
{
value = context.getSettings();
System.out.println( value );
}
else if ( expression.startsWith( "settings" ) )
{

View File

@ -393,6 +393,23 @@
return profileMap;
}
private RuntimeInfo runtimeInfo;
public void setRuntimeInfo( RuntimeInfo runtimeInfo )
{
this.runtimeInfo = runtimeInfo;
}
public RuntimeInfo getRuntimeInfo()
{
if ( runtimeInfo == null )
{
runtimeInfo = new RuntimeInfo();
}
return runtimeInfo;
}
]]>
</code>
</codeSegment>