maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdca...@apache.org
Subject svn commit: r654207 - /maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/cli/CLIRequestUtils.java
Date Wed, 07 May 2008 18:44:18 GMT
Author: jdcasey
Date: Wed May  7 11:44:18 2008
New Revision: 654207

URL: http://svn.apache.org/viewvc?rev=654207&view=rev
Log:
Allow multiple -P options, and fix explicit en/disable notations of E:/+ for enable, D:/-
for disable.

Modified:
    maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/cli/CLIRequestUtils.java

Modified: maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/cli/CLIRequestUtils.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/cli/CLIRequestUtils.java?rev=654207&r1=654206&r2=654207&view=diff
==============================================================================
--- maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/cli/CLIRequestUtils.java
(original)
+++ maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/cli/CLIRequestUtils.java
Wed May  7 11:44:18 2008
@@ -147,7 +147,6 @@
         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 @@
 
                         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
                         {



Mime
View raw message