[prev in list] [next in list] [prev in thread] [next in thread] 

List:       maven-dev
Subject:    [jira] [Commented] (MCHECKSTYLE-351) Plugin execution fails on error when using google_checks
From:       "Robert Turner (JIRA)" <jira () apache ! org>
Date:       2018-12-31 18:58:00
Message-ID: JIRA.13157059.1525415607000.28534.1546282680328 () Atlassian ! JIRA
[Download RAW message or body]


    [ https://issues.apache.org/jira/browse/MCHECKSTYLE-351?page=com.atlassian.jira.pl \
ugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16731426#comment-16731426 \
] 

Robert Turner commented on MCHECKSTYLE-351:
-------------------------------------------

Observation (_as I initially thought this might already be supportable, but..._): I \
would have thought that if you wanted to fail the build, you would use \
{{checkstyle:check}} instead, and in that case, you can configure \
{{violationSeverity}} to the level you want to trigger the failure. Alternatively, I \
suppose the plug in could add support for {{violationSeverity}}-like behaviour into \
{{checkstyle:checkstyle}} as well.

> Plugin execution fails on error when using google_checks
> --------------------------------------------------------
> 
> Key: MCHECKSTYLE-351
> URL: https://issues.apache.org/jira/browse/MCHECKSTYLE-351
> Project: Maven Checkstyle Plugin
> Issue Type: Bug
> Reporter: Martin Schneider
> Priority: Major
> 
> 
> I'm using the version 3.0.0  with Checkstyle 6.18.
> This is my initial configuration:
> {noformat}
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-checkstyle-plugin</artifactId>
> <version>${maven.checkstyle.plugin.version}</version>
> <configuration>
> <failsOnError>true</failsOnError>
> <failOnViolation>true</failOnViolation>
> </configuration>
> </plugin>{noformat}
> Running  {{mvn checkstyle:checkstyle}}  will fail the build since there are \
> checkstyle errors. This is expected.   {{[ERROR] Failed to execute goal \
> org.apache.maven.plugins:maven-checkstyle-plugin:3.0.0:check (default-cli) on \
> project demo: Failed during checkstyle execution: There are 311 errors reported by \
> Checkstyle 6.18 with sun_checks.xml ruleset. -> [Help 1]}} However, when I use  \
> {{google_checks.xml the build succeeds without any error (checkstyle-report.xml}}  \
> still shows the issues). 
> {noformat}
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-checkstyle-plugin</artifactId>
> <version>${maven.checkstyle.plugin.version}</version>
> <configuration>
> <configLocation>google_checks.xml</configLocation>
> <failsOnError>true</failsOnError>
> <failOnViolation>true</failOnViolation>
> </configuration>
> </plugin>{noformat}
> 
> My expectation would be that the build fails when I use the  {{google_checks.xml}}  \
> configuration. [https://stackoverflow.com/questions/50040980/checkstyle-maven-plugin-doesnt-fail-on-error-when-using-google-checks]
> 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic