mirror of https://github.com/apache/maven.git
o Improved robustness
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@895291 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a5b2dd1a1f
commit
9f217fd24c
|
@ -465,7 +465,15 @@ public class DefaultMaven
|
|||
|
||||
Collection<MavenProject> activeProjects = sorter.getSortedProjects();
|
||||
|
||||
File reactorDirectory = request.getPom().getAbsoluteFile().getParentFile();
|
||||
File reactorDirectory;
|
||||
if ( request.getBaseDirectory() != null )
|
||||
{
|
||||
reactorDirectory = new File( request.getBaseDirectory() );
|
||||
}
|
||||
else
|
||||
{
|
||||
reactorDirectory = null;
|
||||
}
|
||||
|
||||
if ( !request.getSelectedProjects().isEmpty() )
|
||||
{
|
||||
|
@ -596,7 +604,7 @@ public class DefaultMaven
|
|||
}
|
||||
|
||||
// relative path, e.g. "sub", "../sub" or "."
|
||||
else
|
||||
else if ( reactorDirectory != null )
|
||||
{
|
||||
File selectedProject = new File( new File( reactorDirectory, selector ).toURI().normalize() );
|
||||
|
||||
|
|
|
@ -240,9 +240,22 @@ public class DefaultMavenExecutionRequestPopulator
|
|||
}
|
||||
}
|
||||
|
||||
private void baseDirectory( MavenExecutionRequest request )
|
||||
{
|
||||
if ( request.getBaseDirectory() == null )
|
||||
{
|
||||
if ( request.getPom() != null )
|
||||
{
|
||||
request.setBaseDirectory( request.getPom().getAbsoluteFile().getParentFile() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public MavenExecutionRequest populateDefaults( MavenExecutionRequest request )
|
||||
throws MavenExecutionRequestPopulationException
|
||||
{
|
||||
baseDirectory( request );
|
||||
|
||||
localRepository( request );
|
||||
|
||||
populateDefaultPluginGroups( request );
|
||||
|
|
Loading…
Reference in New Issue