[
http://jira.codehaus.org/browse/MFINDBUGS-102?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=200433#action_200433
]
Grzegorz Slowikowski commented on MFINDBUGS-102:
------------------------------------------------
I've had problems finding the right reason of this problem because sometimes
I've had "target/test-classes" folder present while generating findbugs repost
and sometimes not despite "includeTests" always set to "true".
I issued "mvn clean site". When having only findbugs report in the "reporting"
section tests haven't been compiled. When having findbugs + cobertura reports -
tests have been compiled because cobertura forced it in its forked life cycle,
and then findbugs report behaved differently.
Some more thoughts:
1. Add debug comment when "includeTests" is set, but there is no "test-classes"
directory.
2. Change "@execute phase" from "compile" to "test-compile". Test classes will
be always compiled. It will not be depended on other plugins.
> When including tests Findbugs needs test classpath not compile classpath
> ------------------------------------------------------------------------
>
> Key: MFINDBUGS-102
> URL: http://jira.codehaus.org/browse/MFINDBUGS-102
> Project: Maven 2.x FindBugs Plugin
> Issue Type: Bug
> Affects Versions: 2.2
> Environment: Windows XP SP2, Maven 2.2.1
> Reporter: Grzegorz Slowikowski
> Assignee: Garvin LeClaire
> Priority: Minor
> Attachments: MFINDBUGS-xxx.diff
>
>
> When including tests:
> <configuration>
> <includeTests>true</includeTests>
> </configuration>
> auxClasspathElements must equal to testClassPath, not compileClassPath.
> Now clompileClassPath is used always. In my project I have:
> [java] The following classes needed for analysis were missing:
> [java] org.junit.Before
> [java] org.junit.Assert
> [java] org.junit.Test
> [java] org.junit.After
> [java] Warnings generated: 3
> [java] Missing classes: 4
> JUnit is my test dependency.
> Fixing this is very simple.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email