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 @@ else if ( commandLine.hasOption( CLIManager.CHECKSUM_WARNING_POLICY ) )
|
|||
if ( commandLine.hasOption( CLIManager.ACTIVATE_PROFILES ) )
|
||||
{
|
||||
String [] profileOptionValues = commandLine.getOptionValues( CLIManager.ACTIVATE_PROFILES );
|
||||
|
||||
if ( profileOptionValues != null )
|
||||
{
|
||||
for ( int i=0; i < profileOptionValues.length; ++i )
|
||||
|
@ -160,11 +159,19 @@ else if ( commandLine.hasOption( CLIManager.CHECKSUM_WARNING_POLICY ) )
|
|||
|
||||
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( "+" ) )
|
||||
{
|
||||
inactiveProfiles.add( profileAction.substring( 1 ) );
|
||||
activeProfiles.add( profileAction.substring( 1 ) );
|
||||
}
|
||||
else if ( profileAction.startsWith( "E:" ) )
|
||||
{
|
||||
activeProfiles.add( profileAction.substring( 2 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue