mirror of https://github.com/apache/maven.git
Allow multiple -P options, and fix explicit en/disable notations of E:/+ for enable, D:/- for disable.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@654207 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
89f6e8e60e
commit
e28b62cbe7
|
@ -147,7 +147,6 @@ public final class CLIRequestUtils
|
||||||
if ( commandLine.hasOption( CLIManager.ACTIVATE_PROFILES ) )
|
if ( commandLine.hasOption( CLIManager.ACTIVATE_PROFILES ) )
|
||||||
{
|
{
|
||||||
String [] profileOptionValues = commandLine.getOptionValues( CLIManager.ACTIVATE_PROFILES );
|
String [] profileOptionValues = commandLine.getOptionValues( CLIManager.ACTIVATE_PROFILES );
|
||||||
|
|
||||||
if ( profileOptionValues != null )
|
if ( profileOptionValues != null )
|
||||||
{
|
{
|
||||||
for ( int i=0; i < profileOptionValues.length; ++i )
|
for ( int i=0; i < profileOptionValues.length; ++i )
|
||||||
|
@ -160,11 +159,19 @@ public final class CLIRequestUtils
|
||||||
|
|
||||||
if ( profileAction.startsWith( "-" ) )
|
if ( profileAction.startsWith( "-" ) )
|
||||||
{
|
{
|
||||||
activeProfiles.add( profileAction.substring( 1 ) );
|
inactiveProfiles.add( profileAction.substring( 1 ) );
|
||||||
|
}
|
||||||
|
else if ( profileAction.startsWith( "D:" ) )
|
||||||
|
{
|
||||||
|
inactiveProfiles.add( profileAction.substring( 2 ) );
|
||||||
}
|
}
|
||||||
else if ( profileAction.startsWith( "+" ) )
|
else if ( profileAction.startsWith( "+" ) )
|
||||||
{
|
{
|
||||||
inactiveProfiles.add( profileAction.substring( 1 ) );
|
activeProfiles.add( profileAction.substring( 1 ) );
|
||||||
|
}
|
||||||
|
else if ( profileAction.startsWith( "E:" ) )
|
||||||
|
{
|
||||||
|
activeProfiles.add( profileAction.substring( 2 ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue