mirror of https://github.com/apache/maven.git
[MNG-4262] Make-like reactor mode fails to find projects selected by relative paths with leading dots
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@798466 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e3f7710578
commit
0cefc46991
|
@ -437,6 +437,9 @@ public class DefaultMaven
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isMatchingProject( MavenProject project, String selector, File reactorDirectory )
|
private boolean isMatchingProject( MavenProject project, String selector, File reactorDirectory )
|
||||||
|
{
|
||||||
|
// [groupId]:artifactId
|
||||||
|
if ( selector.indexOf( ':' ) >= 0 )
|
||||||
{
|
{
|
||||||
String id = ':' + project.getArtifactId();
|
String id = ':' + project.getArtifactId();
|
||||||
|
|
||||||
|
@ -451,8 +454,12 @@ public class DefaultMaven
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
File selectedProject = new File( reactorDirectory, selector );
|
// relative path, e.g. "sub", "../sub" or "."
|
||||||
|
else
|
||||||
|
{
|
||||||
|
File selectedProject = new File( new File( reactorDirectory, selector ).toURI().normalize() );
|
||||||
|
|
||||||
if ( selectedProject.isFile() )
|
if ( selectedProject.isFile() )
|
||||||
{
|
{
|
||||||
|
@ -462,6 +469,7 @@ public class DefaultMaven
|
||||||
{
|
{
|
||||||
return selectedProject.equals( project.getBasedir() );
|
return selectedProject.equals( project.getBasedir() );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue