[
https://jira.codehaus.org/browse/MCHECKSTYLE-214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Scholte updated MCHECKSTYLE-214:
---------------------------------------
Description:
Consider this snippet from a POM:
{code}
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>${basedir}</directory>
<targetPath>META-INF</targetPath>
<includes>
<include>LICENSE.txt</include>
</includes>
</resource>
</resources>
</build>
{code}
So, the plugin should check everything in {{src/main/resources}} and the
{{LICENSE.txt}}, after applying plugin's resource includes only properties
files remain. Unfortunately, all files (in this case properties) below
{{basedir}}, including those in {{target}} are checked because the plugin
ignores the includes/excludes in that {{Resource}} element.
The {{Resource}} element looks like this:
{code}
Resource {targetPath: META-INF, filtering: false, FileSet {directory:
D:\workspace-4.2\michael-o-tomcat-extras, PatternSet [includes: {LICENSE.txt},
excludes: {}]}}
{code}
This happens in {{DefaultCheckstyleExecutor}} in lines 578 to 584. The outcome
is that given properties files are checked twice and generated files are
checked to.
We need a resembling logic like in the {{maven-resources-plugin}}.
was:
Consider this snippet from a POM:
{code}
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>${basedir}</directory>
<targetPath>META-INF</targetPath>
<includes>
<include>LICENSE.txt</include>
</includes>
</resource>
</resources>
</build>
{code}
So, the plugin should check everything in {{src/main/resources}} and the
{{README.txt}}, after applying plugin's resource includes only properties files
remain. Unfortunately, all files (in this case properties) below {{basedir}},
including those in {{target}} are checked because the plugin ignores the
includes/excludes in that {{Resource}} element.
The {{Resource}} element looks like this:
{code}
Resource {targetPath: META-INF, filtering: false, FileSet {directory:
D:\workspace-4.2\michael-o-tomcat-extras, PatternSet [includes: {LICENSE.txt},
excludes: {}]}}
{code}
This happens in {{DefaultCheckstyleExecutor}} in lines 578 to 584. The outcome
is that given properties files are checked twice and generated files are
checked to.
We need a resembling logic like in the {{maven-resources-plugin}}.
> Resources retrieval ignores resources definition in <build>
> -----------------------------------------------------------
>
> Key: MCHECKSTYLE-214
> URL: https://jira.codehaus.org/browse/MCHECKSTYLE-214
> Project: Maven Checkstyle Plugin
> Issue Type: Bug
> Affects Versions: 2.11
> Reporter: Michael Osipov
> Priority: Critical
>
> Consider this snippet from a POM:
> {code}
> <build>
> <resources>
> <resource>
> <directory>src/main/resources</directory>
> </resource>
> <resource>
> <directory>${basedir}</directory>
> <targetPath>META-INF</targetPath>
> <includes>
> <include>LICENSE.txt</include>
> </includes>
> </resource>
> </resources>
> </build>
> {code}
> So, the plugin should check everything in {{src/main/resources}} and the
> {{LICENSE.txt}}, after applying plugin's resource includes only properties
> files remain. Unfortunately, all files (in this case properties) below
> {{basedir}}, including those in {{target}} are checked because the plugin
> ignores the includes/excludes in that {{Resource}} element.
> The {{Resource}} element looks like this:
> {code}
> Resource {targetPath: META-INF, filtering: false, FileSet {directory:
> D:\workspace-4.2\michael-o-tomcat-extras, PatternSet [includes:
> {LICENSE.txt}, excludes: {}]}}
> {code}
> This happens in {{DefaultCheckstyleExecutor}} in lines 578 to 584. The
> outcome is that given properties files are checked twice and generated files
> are checked to.
> We need a resembling logic like in the {{maven-resources-plugin}}.
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)