PR: MNG-567

fix off by one error

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@220058 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-07-21 13:05:26 +00:00
parent 5d00be82d0
commit 53fd3dd6fb
1 changed files with 7 additions and 7 deletions

View File

@ -85,19 +85,19 @@ public class PluginParameterExpressionEvaluator
return expression; return expression;
} }
if ( expression.equals( "localRepository" ) ) if ( "localRepository".equals( expression ) )
{ {
value = context.getLocalRepository(); value = context.getLocalRepository();
} }
else if ( expression.equals( "session" ) ) else if ( "session".equals( expression ) )
{ {
value = context; value = context;
} }
else if ( expression.equals( "project" ) ) else if ( "project".equals( expression ) )
{ {
value = project; value = project;
} }
else if ( expression.equals( "executedProject" ) ) else if ( "executedProject".equals( expression ) )
{ {
value = project.getExecutionProject(); value = project.getExecutionProject();
} }
@ -109,7 +109,7 @@ public class PluginParameterExpressionEvaluator
if ( pathSeparator > 0 ) if ( pathSeparator > 0 )
{ {
String pathExpression = expression.substring( 1, pathSeparator ); String pathExpression = expression.substring( 0, pathSeparator );
value = ReflectionValueExtractor.evaluate( pathExpression, project ); value = ReflectionValueExtractor.evaluate( pathExpression, project );
value = value + expression.substring( pathSeparator ); value = value + expression.substring( pathSeparator );
} }
@ -177,7 +177,7 @@ public class PluginParameterExpressionEvaluator
e ); e );
} }
} }
else if ( expression.equals( "basedir" ) ) else if ( "basedir".equals( expression ) )
{ {
value = project.getBasedir().getAbsolutePath(); value = project.getBasedir().getAbsolutePath();
} }
@ -250,7 +250,7 @@ public class PluginParameterExpressionEvaluator
public File alignToBaseDirectory( File file ) public File alignToBaseDirectory( File file )
{ {
File basedir = null; File basedir;
if ( project != null && project.getFile() != null ) if ( project != null && project.getFile() != null )
{ {