You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2023/01/26 16:55:00 UTC

[jira] [Commented] (MCHECKSTYLE-415) Fatal Errors in Logs after Upgrade from com.puppycrawl.tools:checkstyle:10.1 to 10.2

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

Michael Osipov commented on MCHECKSTYLE-415:
--------------------------------------------

Is this solved by a new version of checkstyle?

> Fatal Errors in Logs after Upgrade from com.puppycrawl.tools:checkstyle:10.1 to 10.2
> ------------------------------------------------------------------------------------
>
>                 Key: MCHECKSTYLE-415
>                 URL: https://issues.apache.org/jira/browse/MCHECKSTYLE-415
>             Project: Maven Checkstyle Plugin
>          Issue Type: Bug
>          Components: checkstyle:check
>    Affects Versions: 3.1.2
>         Environment: Ubuntu 20.04, Jenkins, Docker
>            Reporter: Minh Do
>            Priority: Minor
>              Labels: 10.1, 10.2, fatal, logs
>
> I reported this originally in the [checkstyle issue tracker|https://github.com/checkstyle/checkstyle/issues/11755] and Roman Ivanov redirected me here.
> My maven profile is declared like
> {code:xml}
> <profile>
>     <id>checkstyle</id>
>     <build>
>         <pluginManagement>
>             <plugins>
>                 <plugin>
>                     <groupId>org.apache.maven.plugins</groupId>
>                     <artifactId>maven-checkstyle-plugin</artifactId>
>                     <version>3.1.2</version>
>                     <configuration>
>                         <configLocation>.checkstyle/config.xml</configLocation>
>                         <includeTestSourceDirectory>true</includeTestSourceDirectory>
>                     </configuration>
>                     <dependencies>
>                         <dependency>
>                             <groupId>com.puppycrawl.tools</groupId>
>                             <artifactId>checkstyle</artifactId>
>                             <version>10.1</version>
>                         </dependency>
>                     </dependencies>
>                 </plugin>
>             </plugins>
>         </pluginManagement>
>     </build>
> </profile>
> {code}
> and outputted normal logs like
> {noformat}
> [INFO] --- maven-checkstyle-plugin:3.1.2:check (default-cli) @ my.project ---
> [INFO] You have 0 Checkstyle violations.
> {noformat}
> When upgrading my maven profile checkstyle-dependeny from 10.1 to 10.2
> {code:xml}
> <profile>
>     <id>checkstyle</id>
>     <build>
>         <pluginManagement>
>             <plugins>
>                 <plugin>
>                     <groupId>org.apache.maven.plugins</groupId>
>                     <artifactId>maven-checkstyle-plugin</artifactId>
>                     <version>3.1.2</version>
>                     <configuration>
>                         <configLocation>.checkstyle/config.xml</configLocation>
>                         <includeTestSourceDirectory>true</includeTestSourceDirectory>
>                     </configuration>
>                     <dependencies>
>                         <dependency>
>                             <groupId>com.puppycrawl.tools</groupId>
>                             <artifactId>checkstyle</artifactId>
>                             <version>10.2</version>
>                         </dependency>
>                     </dependencies>
>                 </plugin>
>             </plugins>
>         </pluginManagement>
>     </build>
> </profile>
> {code}
> new confusing fatal messages are printed in the logs:
> {noformat}
> [INFO] --- maven-checkstyle-plugin:3.1.2:check (default-cli) @ my.project ---
> [Fatal Error] control.xml:1:1: Content is not allowed in prolog.
> [Fatal Error] control.xml:1:1: Content is not allowed in prolog.
> [Fatal Error] control.xml:1:1: Content is not allowed in prolog.
> [Fatal Error] control.xml:1:1: Content is not allowed in prolog.
> [INFO] You have 0 Checkstyle violations.
> {noformat}
> It does not affect the build result but confuses developers if something went wrong.
> Roman Ivanov guessed, that the commit https://github.com/checkstyle/checkstyle/issues/11507 could lead to this problem.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)