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
|
@ -438,29 +438,37 @@ public class DefaultMaven
|
|||
|
||||
private boolean isMatchingProject( MavenProject project, String selector, File reactorDirectory )
|
||||
{
|
||||
String id = ':' + project.getArtifactId();
|
||||
|
||||
if ( id.equals( selector ) )
|
||||
// [groupId]:artifactId
|
||||
if ( selector.indexOf( ':' ) >= 0 )
|
||||
{
|
||||
return true;
|
||||
String id = ':' + project.getArtifactId();
|
||||
|
||||
if ( id.equals( selector ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
id = project.getGroupId() + id;
|
||||
|
||||
if ( id.equals( selector ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
id = project.getGroupId() + id;
|
||||
|
||||
if ( id.equals( selector ) )
|
||||
// relative path, e.g. "sub", "../sub" or "."
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
File selectedProject = new File( new File( reactorDirectory, selector ).toURI().normalize() );
|
||||
|
||||
File selectedProject = new File( reactorDirectory, selector );
|
||||
|
||||
if ( selectedProject.isFile() )
|
||||
{
|
||||
return selectedProject.equals( project.getFile() );
|
||||
}
|
||||
else if ( selectedProject.isDirectory() )
|
||||
{
|
||||
return selectedProject.equals( project.getBasedir() );
|
||||
if ( selectedProject.isFile() )
|
||||
{
|
||||
return selectedProject.equals( project.getFile() );
|
||||
}
|
||||
else if ( selectedProject.isDirectory() )
|
||||
{
|
||||
return selectedProject.equals( project.getBasedir() );
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue