maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Lundberg (JIRA)" <j...@codehaus.org>
Subject [jira] (MCHECKSTYLE-252) Version 2.13 includes non-source files in checks
Date Sun, 18 Jan 2015 15:56:19 GMT

    [ https://jira.codehaus.org/browse/MCHECKSTYLE-252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=361341#comment-361341
] 

Dennis Lundberg commented on MCHECKSTYLE-252:
---------------------------------------------

I've had a look at the attached project and here are my findings on it.

{noformat}
COPYING
COPYING.LESSER
{noformat}

These are included by Checkstyle because they are defined as resources in the POM.
{code:xml}
    <resources>
      <resource>
        <directory>${basedir}/src/main/resources</directory>
        <filtering>false</filtering>
      </resource>
      <resource>
        <targetPath>META-INF</targetPath>
        <filtering>false</filtering>
        <directory>${basedir}</directory>
        <includes>
          <include>COPYING</include>
          <include>COPYING.LESSER</include>
        </includes>
      </resource>
    </resources>
{code}

This is because of the fix for MCHECKSTYLE-70. A work-around for your problem is available
at http://jira.codehaus.org/browse/MCHECKSTYLE-70?focusedCommentId=353837&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-353837

{noformat}
target/generated-classes/cobertura/cobertura.properties
{noformat}

This file I'm not sure why it is included, but I suspect that Cobertura has something to to
with it, beacause it alters the classpath of the project.

To summarize, Maven Checkstyle Plugin 2.13 does not include non-source files in the check,
but it does include more sources than version 2.12.

> Version 2.13 includes non-source files in checks
> ------------------------------------------------
>
>                 Key: MCHECKSTYLE-252
>                 URL: https://jira.codehaus.org/browse/MCHECKSTYLE-252
>             Project: Maven Checkstyle Plugin
>          Issue Type: Bug
>          Components: checkstyle:checkstyle
>    Affects Versions: 2.13
>            Reporter: Michael Heuer
>             Fix For: 2.14
>
>         Attachments: mcheckstyle-252.tar.gz
>
>
> Updating maven-checkstyle-plugin to version 2.13 and running
> {noformat}$ mvn site{noformat}
> now includes non-source files in its checks, e.g.
> {noformat}COPYING
> COPYING.LESSER
> target/generated-classes/cobertura/cobertura.properties{noformat}
> While it is rather amusing to have checkstyle complain that COPYING (the text of the
GNU General Public License) doesn't include a license header, it seems that the default source
root or one of the other properties new to version 2.13 does not have an appropriate default
value.  The target directory should also be excluded by default.



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Mime
View raw message