|
Indeed, I reported this against Maven 2.0.4; the version meant version 2.1 of the checkstyle plugin.
Do you have includeTestSourceDirectory set to true in your plugin configuration?
I didn't have includeTestSourceDirectory set before. Now I've tried setting it, and it makes no difference.
This issue still happens with Maven 2.0.5 and 2.0.6 on Windows XP, JDK5 and JDK6 both tested.
The issue is still present with following setup:
Maven version: 2.0.8, Java version: 1.5.0_14 I have committed a fix for this in r617973.
A new 2.2-SNAPSHOT has been deployed to the snapshot-repository. Please give that version a try to verify that this issue has been properly resolved. Attached are a demo project and a fix.
Using the demo project and the unpatched plugin, the following behavior occurred (with Maven 2.0.8):
I was a few minutes too late... anyway, take it as as "worked for me" feedback then. By the way, I wonder whether @requiresDependencyResolution is really required for the CheckstyleViolationCheckMojo. It does not invoke Checkstyle directly but forks the CheckstyleReport mojo which in turn gets the dependencies via its on annotation. Thanks Benjamin.
I wasn't sure myself whether the annotation was required in CheckstyleViolationCheckMojo, but I figured it can't harm to have it there. fabrice,
This issue has been verified and closed. If you think it should be reopened you need to provide us with a sample project that can be used to reproduce the problems. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Having <scope>provided</scope> is fairly common, as you know. Many Java webapps, for example, include the servlet-api, jsp-api, and related jars with provided scope on their classpath. So here's my vote for fixing it soon