mirror of
https://github.com/apache/maven.git
synced 2025-02-24 11:29:57 +00:00
PR: MNG-432
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@191312 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3e2449750d
commit
9863732555
@ -242,7 +242,17 @@ private String stripTokens( String expr )
|
||||
|
||||
public File alignToBaseDirectory( File file )
|
||||
{
|
||||
File basedir = context.getProject().getFile().getParentFile();
|
||||
File basedir = null;
|
||||
|
||||
if ( context != null && context.getProject() != null && context.getProject().getFile() != null )
|
||||
{
|
||||
basedir = context.getProject().getFile().getParentFile();
|
||||
}
|
||||
else
|
||||
{
|
||||
basedir = new File( "." ).getAbsoluteFile().getParentFile();
|
||||
}
|
||||
|
||||
return new File( pathTranslator.alignToBaseDirectory( file.getPath(), basedir ) );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user