[ https://issues.apache.org/jira/browse/MCHECKSTYLE-260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15843738#comment-15843738 ]
Hudson commented on MCHECKSTYLE-260: ------------------------------------ SUCCESS: Integrated in Jenkins build maven-plugins #8700 (See [https://builds.apache.org/job/maven-plugins/8700/]) [MCHECKSTYLE-260] sourceDirectories property is ignored in multi-modules Because of a bug in Sisu, plugin parameters of type Collection or array are always using their default value if it is specified (MNG-5440). This was fixed in 3.3.9, but to be able to have compatibility for all Maven 3.x versions, we have to handle the default value manually, instead of relying on @Parameter's defaultValue mechanism. Updating the MavenProject stub tests so that they return meaningful values for compileSourceRoot and testCompileSourceRoot (thus getting rid of the specific code inside the actual Mojo checking for null when that cannot happen on a real project). (gboue: [http://svn.apache.org/viewvc/?view=rev&rev=1780622]) * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-sourceDirectories * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-sourceDirectories/child-a * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-sourceDirectories/child-a/pom.xml * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-sourceDirectories/child-a/src * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-sourceDirectories/child-a/src/generated * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-sourceDirectories/child-a/src/generated/java * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-sourceDirectories/child-a/src/generated/java/org * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-sourceDirectories/child-a/src/generated/java/org/MyClass.java * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-sourceDirectories/child-b * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-sourceDirectories/child-b/pom.xml * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-sourceDirectories/child-b/src * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-sourceDirectories/child-b/src/generated * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-sourceDirectories/child-b/src/generated/java * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-sourceDirectories/child-b/src/generated/java/org * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-sourceDirectories/child-b/src/generated/java/org/MyClass.java * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-sourceDirectories/invoker.properties * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-sourceDirectories/pom.xml * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-sourceDirectories/verify.groovy * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-testSourceDirectories * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-testSourceDirectories/child-a * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-testSourceDirectories/child-a/pom.xml * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-testSourceDirectories/child-a/src * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-testSourceDirectories/child-a/src/generated * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-testSourceDirectories/child-a/src/generated/java * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-testSourceDirectories/child-a/src/generated/java/org * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-testSourceDirectories/child-a/src/generated/java/org/MyClass.java * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-testSourceDirectories/child-b * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-testSourceDirectories/child-b/pom.xml * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-testSourceDirectories/child-b/src * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-testSourceDirectories/child-b/src/generated * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-testSourceDirectories/child-b/src/generated/java * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-testSourceDirectories/child-b/src/generated/java/org * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-testSourceDirectories/child-b/src/generated/java/org/MyClass.java * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-testSourceDirectories/invoker.properties * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-testSourceDirectories/pom.xml * (add) maven-checkstyle-plugin/src/it/MCHECKSTYLE-260-testSourceDirectories/verify.groovy * (edit) maven-checkstyle-plugin/src/main/java/org/apache/maven/plugins/checkstyle/AbstractCheckstyleReport.java * (edit) maven-checkstyle-plugin/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java * (edit) maven-checkstyle-plugin/src/test/java/org/apache/maven/plugins/checkstyle/stubs/MinMavenProjectStub.java * (edit) maven-checkstyle-plugin/src/test/java/org/apache/maven/plugins/checkstyle/stubs/ModuleMavenProjectStub.java * (edit) maven-checkstyle-plugin/src/test/java/org/apache/maven/plugins/checkstyle/stubs/MultiMavenProjectStub.java > sourceDirectories property is ignored in multi-modules > ------------------------------------------------------ > > Key: MCHECKSTYLE-260 > URL: https://issues.apache.org/jira/browse/MCHECKSTYLE-260 > Project: Maven Checkstyle Plugin > Issue Type: Bug > Components: checkstyle:check > Affects Versions: 2.13 > Reporter: Andreas Dangel > Attachments: multi-sourcefolder-multi-modules-aggregate.zip > > > I have a multi-module build which uses a plugin that generates code (xjc). > The directory is added to the compile source directories. > With 2.13, this directory is by default scanned by checkstyle - but I want to > exclude this. > It seems, that setting {{sourceDirectories}} doesn't have any effect for the > child modules. > Is this even the right approach to exclude a source root? > Attached is an integration test. It just uses build-helper-maven-plugin to > add an additional source folder. > The parent pom configures {{sourceDirectories}} to be just > {{$\{project.build.sourceDirectory\}}}. I would have expected, that > checkstyle doesn't find any violations, as {{src/generated/java}} shouldn't > be checked. > I think, it's related with the change MCHECKSTYLE-70. > It works with 2.12 -- This message was sent by Atlassian JIRA (v6.3.4#6332)