maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Smyk (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MCHECKSTYLE-318) Checkstyle plugin ignores sourceDirectories configuration.
Date Tue, 24 May 2016 16:12:12 GMT

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

Anton Smyk commented on MCHECKSTYLE-318:
----------------------------------------

Note to maven-checkstyle-plugin plugin developers: the maven-checkstyle-plugin can only be
built with Maven 3.x and only with Maven 2.2.1 dependencies. Integration tests pass only with
Maven 3.3.9, MCHECKSTYLE-131 fails 2.2.1, and MCHECKSTYLE-318-override-directories (introduced
in my Git clone) fails with 3.0.5 and 2.2.1.

Although [the plugin still states it supports Maven 2.2.1|http://svn.apache.org/viewvc/maven/plugins/tags/maven-checkstyle-plugin-2.17/pom.xml?revision=1708854&view=markup#l65]
its integration tests fail with Maven 2.2.1:
{noformat}
$ mvn -V -B -Prun-its clean verify -Dinvoker.mavenHome=/opt/apache-maven-2.2.1
...
[INFO] --- maven-invoker-plugin:2.0.0:verify (integration-test) @ maven-checkstyle-plugin
---
[INFO] -------------------------------------------------
[INFO] Build Summary:
[INFO]   Passed: 28, Failed: 2, Errors: 0, Skipped: 3
[INFO] -------------------------------------------------
[ERROR] The following builds failed:
[ERROR] *  MCHECKSTYLE-131/pom.xml
[ERROR] *  MCHECKSTYLE-318-override-directories/pom.xml
[INFO] -------------------------------------------------
{noformat}


{noformat}
$ mvn -V -B -Prun-its clean verify -Dinvoker.mavenHome=/opt/apache-maven-3.0.5
...
[INFO] --- maven-invoker-plugin:2.0.0:verify (integration-test) @ maven-checkstyle-plugin
---
[INFO] -------------------------------------------------
[INFO] Build Summary:
[INFO]   Passed: 31, Failed: 1, Errors: 0, Skipped: 1
[INFO] -------------------------------------------------
[ERROR] The following builds failed:
[ERROR] *  MCHECKSTYLE-318-override-directories/pom.xml
[INFO] -------------------------------------------------
{noformat}


{noformat}
$ mvn -V -B -Prun-its clean verify -Dinvoker.mavenHome=/opt/apache-maven-3.3.9
...
[INFO] --- maven-invoker-plugin:2.0.0:verify (integration-test) @ maven-checkstyle-plugin
---
[INFO] -------------------------------------------------
[INFO] Build Summary:
[INFO]   Passed: 32, Failed: 0, Errors: 0, Skipped: 1
[INFO] -------------------------------------------------
{noformat}


Also, even though plugin can be built with Maven 3.0.4 dependencies instead of 2.2.1, a lot
of tests fail, both unit- and integration tests. I could not figure out what to fix.


> Checkstyle plugin ignores sourceDirectories configuration.
> ----------------------------------------------------------
>
>                 Key: MCHECKSTYLE-318
>                 URL: https://issues.apache.org/jira/browse/MCHECKSTYLE-318
>             Project: Maven Checkstyle Plugin
>          Issue Type: Bug
>          Components: checkstyle:check
>    Affects Versions: 2.17
>            Reporter: RafaƂ Wrzeszcz
>         Attachments: efective-pom.xml, mvn.log
>
>
> I have a project on GitHub, that builds on Travis CI. It was running more or less fine
until today. I updated configuration and now it uses different paths. I integrated Delombok
with my build and right now:
> - Delombok processes {{src/main/java}} into {{target/generated-sources/delombok}};
> - {{target/generated-sources/delombok}} is set as project source directory, so most of
the other plugins operate on it;
> - but I want *Checkstyle* to only check my source code, not the generated one so I configured
it to still process just {{src/main/java}}.
> It works locally, works on my Jenkins, but fails on Travis.
> This is the link to build that failed with debug flag turned on: https://travis-ci.org/chilloutdevelopment/pl.chilldev.commons/builds/123777140
> I attached dump of {{help:effective-pom}} and log of running {{mvn -X checkstyle:check}}
(the initial part of it, which points the problem).
> To point it more preceisly - here is the part of the configuration loading:
> {code}
> [DEBUG] -----------------------------------------------------------------------
> [DEBUG] Goal:
> org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check (default)
> [DEBUG] Style:         Regular
> [DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
> <configuration>
> ### skipped ###
>   <propertyExpansion>checkstyle.project.basedir=/home/travis/build/chilloutdevelopment/pl.chilldev.commons</propertyExpansion>
> ### skipped ###
>   <sourceDirectories default-value="${project.compileSourceRoots}">
>     <sourceDirectory>src/main/java</sourceDirectory>
>   </sourceDirectories>
> {code}
> And this is the log from plugin execution:
> {code}
> [DEBUG] Configuring mojo
> org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check from
> plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-checkstyle-plugin:2.17,
> parent: sun.misc.Launcher$AppClassLoader@5c647e05]
> [DEBUG] Configuring mojo
> 'org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check' with
> basic configurator -->
> ### skipped ###
> [DEBUG]   (f) propertyExpansion =
> checkstyle.project.basedir=/home/travis/build/chilloutdevelopment/pl.chilldev.commons
> ### skipped ###
> [DEBUG]   (f) sourceDirectories =
> [/home/travis/build/chilloutdevelopment/pl.chilldev.commons/target/generated-sources/delombok]
> {code}
> {{propertyExpansion}} and {{sourceDirectories}} - these are the two options set by my
configuration - while {{propertyExpansion}} stays correct, {{sourceDirectories}} turns back
to default value.
> Have no clue - what more can I include to help debugging this?



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

Mime
View raw message