You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2006/08/09 03:39:59 UTC

svn commit: r429917 - /maven/components/branches/maven-2.0.x/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java

Author: brett
Date: Tue Aug  8 18:39:59 2006
New Revision: 429917

URL: http://svn.apache.org/viewvc?rev=429917&view=rev
Log:
add quiet option. Some plugins will need work.

Modified:
    maven/components/branches/maven-2.0.x/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java

Modified: maven/components/branches/maven-2.0.x/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java?rev=429917&r1=429916&r2=429917&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java (original)
+++ maven/components/branches/maven-2.0.x/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java Tue Aug  8 18:39:59 2006
@@ -194,6 +194,13 @@
             {
                 loggerManager.setThreshold( Logger.LEVEL_DEBUG );
             }
+            else if ( commandLine.hasOption( CLIManager.QUIET ) )
+            {
+                // TODO: we need to do some more work here. Some plugins use sys out or log errors at info level.
+                // Ideally, we could use Warn across the board
+                loggerManager.setThreshold( Logger.LEVEL_ERROR );
+                // TODO:Additionally, we can't change the mojo level because the component key includes the version and it isn't known ahead of time. This seems worth changing.
+            }
 
             ProfileManager profileManager = new DefaultProfileManager( embedder.getContainer() );
 
@@ -601,6 +608,8 @@
 
         public static final char REACTOR = 'r';
 
+        public static final char QUIET = 'q';
+
         public static final char DEBUG = 'X';
 
         public static final char ERRORS = 'e';
@@ -654,6 +663,9 @@
             options.addOption(
                 OptionBuilder.withLongOpt( "version" ).withDescription( "Display version information" ).create(
                     VERSION ) );
+            options.addOption(
+                OptionBuilder.withLongOpt( "quiet" ).withDescription( "Quiet output - only show warnings and errors" ).create(
+                    QUIET ) );
             options.addOption(
                 OptionBuilder.withLongOpt( "debug" ).withDescription( "Produce execution debug output" ).create(
                     DEBUG ) );



Re: svn commit: r429917 - /maven/components/branches/maven-2.0.x/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java

Posted by Brett Porter <br...@apache.org>.
good catch, will fix

On 10/08/2006 4:19 AM, Dennis Lundberg wrote:
> Description doesn't match the code, see below...
> 
> brett@apache.org wrote:
>> Author: brett
>> Date: Tue Aug  8 18:39:59 2006
>> New Revision: 429917
>>
>> URL: http://svn.apache.org/viewvc?rev=429917&view=rev
>> Log:
>> add quiet option. Some plugins will need work.
>>
>> Modified:
>>     
>> maven/components/branches/maven-2.0.x/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java 
>>
>>
>> Modified: 
>> maven/components/branches/maven-2.0.x/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java 
>>
>> URL: 
>> http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java?rev=429917&r1=429916&r2=429917&view=diff 
>>
>> ============================================================================== 
>>
>> --- 
>> maven/components/branches/maven-2.0.x/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java 
>> (original)
>> +++ 
>> maven/components/branches/maven-2.0.x/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java 
>> Tue Aug  8 18:39:59 2006
>> @@ -194,6 +194,13 @@
>>              {
>>                  loggerManager.setThreshold( Logger.LEVEL_DEBUG );
>>              }
>> +            else if ( commandLine.hasOption( CLIManager.QUIET ) )
>> +            {
>> +                // TODO: we need to do some more work here. Some 
>> plugins use sys out or log errors at info level.
>> +                // Ideally, we could use Warn across the board
>> +                loggerManager.setThreshold( Logger.LEVEL_ERROR );
> 
> Set Threshold to error
> 
>> +                // TODO:Additionally, we can't change the mojo level 
>> because the component key includes the version and it isn't known 
>> ahead of time. This seems worth changing.
>> +            }
>>  
>>              ProfileManager profileManager = new 
>> DefaultProfileManager( embedder.getContainer() );
>>  
>> @@ -601,6 +608,8 @@
>>  
>>          public static final char REACTOR = 'r';
>>  
>> +        public static final char QUIET = 'q';
>> +
>>          public static final char DEBUG = 'X';
>>  
>>          public static final char ERRORS = 'e';
>> @@ -654,6 +663,9 @@
>>              options.addOption(
>>                  OptionBuilder.withLongOpt( "version" 
>> ).withDescription( "Display version information" ).create(
>>                      VERSION ) );
>> +            options.addOption(
>> +                OptionBuilder.withLongOpt( "quiet" ).withDescription( 
>> "Quiet output - only show warnings and errors" ).create(
>> +                    QUIET ) );
> 
> Document it as warnings and errors
> 
>>              options.addOption(
>>                  OptionBuilder.withLongOpt( "debug" ).withDescription( 
>> "Produce execution debug output" ).create(
>>                      DEBUG ) );
>>
>>
> 
> 


-- 
Apache Maven - http://maven.apache.org/
Better Builds with Maven - http://library.mergere.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: svn commit: r429917 - /maven/components/branches/maven-2.0.x/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java

Posted by Dennis Lundberg <de...@apache.org>.
Description doesn't match the code, see below...

brett@apache.org wrote:
> Author: brett
> Date: Tue Aug  8 18:39:59 2006
> New Revision: 429917
> 
> URL: http://svn.apache.org/viewvc?rev=429917&view=rev
> Log:
> add quiet option. Some plugins will need work.
> 
> Modified:
>     maven/components/branches/maven-2.0.x/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java
> 
> Modified: maven/components/branches/maven-2.0.x/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java
> URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java?rev=429917&r1=429916&r2=429917&view=diff
> ==============================================================================
> --- maven/components/branches/maven-2.0.x/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java (original)
> +++ maven/components/branches/maven-2.0.x/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java Tue Aug  8 18:39:59 2006
> @@ -194,6 +194,13 @@
>              {
>                  loggerManager.setThreshold( Logger.LEVEL_DEBUG );
>              }
> +            else if ( commandLine.hasOption( CLIManager.QUIET ) )
> +            {
> +                // TODO: we need to do some more work here. Some plugins use sys out or log errors at info level.
> +                // Ideally, we could use Warn across the board
> +                loggerManager.setThreshold( Logger.LEVEL_ERROR );

Set Threshold to error

> +                // TODO:Additionally, we can't change the mojo level because the component key includes the version and it isn't known ahead of time. This seems worth changing.
> +            }
>  
>              ProfileManager profileManager = new DefaultProfileManager( embedder.getContainer() );
>  
> @@ -601,6 +608,8 @@
>  
>          public static final char REACTOR = 'r';
>  
> +        public static final char QUIET = 'q';
> +
>          public static final char DEBUG = 'X';
>  
>          public static final char ERRORS = 'e';
> @@ -654,6 +663,9 @@
>              options.addOption(
>                  OptionBuilder.withLongOpt( "version" ).withDescription( "Display version information" ).create(
>                      VERSION ) );
> +            options.addOption(
> +                OptionBuilder.withLongOpt( "quiet" ).withDescription( "Quiet output - only show warnings and errors" ).create(
> +                    QUIET ) );

Document it as warnings and errors

>              options.addOption(
>                  OptionBuilder.withLongOpt( "debug" ).withDescription( "Produce execution debug output" ).create(
>                      DEBUG ) );
> 
> 


-- 
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org