mirror of https://github.com/apache/maven.git
Add basedir sub-directories
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@163072 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
182d817ff1
commit
10fe573a33
|
@ -88,6 +88,28 @@ public class OgnlProjectValueExtractor
|
|||
{
|
||||
value = context.getProject().getFile().getParentFile().getAbsolutePath();
|
||||
}
|
||||
else if ( expression.startsWith( "#basedir" ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
int pathSeparator = expression.indexOf( "/" );
|
||||
|
||||
if ( pathSeparator > 0 )
|
||||
{
|
||||
value = context.getProject().getFile().getParentFile().getAbsolutePath()
|
||||
+ expression.substring( pathSeparator );
|
||||
}
|
||||
else
|
||||
{
|
||||
new Exception( "Got expression '" + expression + "' that was not recognised" ).printStackTrace();
|
||||
}
|
||||
}
|
||||
catch ( OgnlException e )
|
||||
{
|
||||
// do nothing
|
||||
e.printStackTrace(); // TODO: should log? should ignore as previously?
|
||||
}
|
||||
}
|
||||
else if ( expression.startsWith( "#" ) )
|
||||
{
|
||||
new Exception( "Got expression '" + expression + "' that was not recognised" ).printStackTrace();
|
||||
|
|
Loading…
Reference in New Issue