[MNG-4244] Allow to select project for make-like reactor by artifact id

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@795147 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-07-17 17:11:57 +00:00
parent 72cd95fb36
commit 8efe10c89e
2 changed files with 9 additions and 2 deletions

View File

@ -492,7 +492,14 @@ public class DefaultMaven
private boolean isMatchingProject( MavenProject project, String selector, File reactorDirectory )
{
String id = project.getGroupId() + ':' + project.getArtifactId();
String id = ':' + project.getArtifactId();
if ( id.equals( selector ) )
{
return true;
}
id = project.getGroupId() + id;
if ( id.equals( selector ) )
{

View File

@ -126,7 +126,7 @@ public class CLIManager
options.addOption( OptionBuilder.withLongOpt( "fail-at-end" ).withDescription( "Only fail the build afterwards; allow all non-impacted builds to continue" ).create( FAIL_AT_END ) );
options.addOption( OptionBuilder.withLongOpt( "fail-never" ).withDescription( "NEVER fail the build, regardless of project result" ).create( FAIL_NEVER ) );
options.addOption( OptionBuilder.withLongOpt( "resume-from" ).hasArg().withDescription( "Resume reactor from specified project" ).create( RESUME_FROM ) );
options.addOption( OptionBuilder.withLongOpt( "projects" ).withDescription( "Build specified reactor projects instead of all projects" ).hasArg().create( PROJECT_LIST ) );
options.addOption( OptionBuilder.withLongOpt( "projects" ).withDescription( "Build specified reactor projects instead of all projects. A project can be specified by [groupId]:artifactId or by its relative path." ).hasArg().create( PROJECT_LIST ) );
options.addOption( OptionBuilder.withLongOpt( "also-make" ).withDescription( "If project list is specified, also build projects required by the list" ).create( ALSO_MAKE ) );
options.addOption( OptionBuilder.withLongOpt( "also-make-dependents" ).withDescription( "If project list is specified, also build projects that depend on projects on the list" ).create( ALSO_MAKE_DEPENDENTS ) );
options.addOption( OptionBuilder.withLongOpt( "log-file" ).hasArg().withDescription( "Log file to where all build output will go." ).create( LOG_FILE ) );