You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Andrew Pikler (JIRA)" <ji...@apache.org> on 2016/08/25 16:08:20 UTC

[jira] [Comment Edited] (MSHADE-235) Logging - Maven Quiet Mode Ignored

    [ https://issues.apache.org/jira/browse/MSHADE-235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15437140#comment-15437140 ] 

Andrew Pikler edited comment on MSHADE-235 at 8/25/16 4:07 PM:
---------------------------------------------------------------

Hi [~gboue], thanks for the quick response. I attached a simple test project, and the build output.

My apologies for jumping to the conclusion this is an issue related to logger caching; it is indeed unrelated. It's related to which maven version one uses - the output is quiet in Maven 3.0.5, but not quiet in 3.3.9.

In maven 3.3.9, the logger is being set to a logger with info level here, even with quiet mode:
https://github.com/apache/maven/blob/master/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java#L573

I have not yet looked into why.


was (Author: andrew.pikler):
Hi [~gboue], thanks for the quick response. I attached a simple test project, and the build output.

My apologies for jumping to the conclusion this is an issue related to logger caching; it is indeed unrelated. It's related to which maven version one uses - the output is quiet in Maven 3.0.5, but not quiet in 3.3.9.

In maven 3.3.9, the logger is being set to a logger with info level here:
https://github.com/apache/maven/blob/master/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java#L573

I have not yet looked into why.

> Logging - Maven Quiet Mode Ignored
> ----------------------------------
>
>                 Key: MSHADE-235
>                 URL: https://issues.apache.org/jira/browse/MSHADE-235
>             Project: Maven Shade Plugin
>          Issue Type: Bug
>    Affects Versions: 2.4.3
>         Environment: $ mvn --version
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T18:41:47+02:00)
> Maven home: /home/andrewp/apache-maven-3.3.9
> Java version: 1.8.0_102, vendor: Oracle Corporation
> Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "3.16.0-4-amd64", arch: "amd64", family: "unix"
>            Reporter: Andrew Pikler
>            Priority: Minor
>         Attachments: testproject.tar.xz, testprojectbuildoutput.txt
>
>
> When a project is built with mvn -q, there should only be error output. However, maven shade plugins print out lines like the following:
> [INFO] javax.foo.bar not removed because it was specifically included
> This is because MinijarFilter caches the AbstractMojo logger in the constructor. The AbstractMojo documentation states specifically not to do this - http://maven.apache.org/components/ref/3.2.1/maven-plugin-api/apidocs/org/apache/maven/plugin/AbstractMojo.html#getLog()
> Perhaps removing the logger from the class and adding it as a parameter to each of the 4 methods that use it be an acceptable solution? I can write the patch myself if desired. Thanks!



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)