Menu

#52 [findbugs] runs JUnit tests

release
closed-fixed
nobody
findbugs (17)
5
2005-06-20
2005-06-11
Jeff Jensen
No

The Maven findbugs plugin runs the JUnit tests. The
standalone findbugs program (not the plugin) does not
run JUnit tests.

The plugin docs don't mention this and I don't see any
property to turn it off.

We have a large codebase and this is a very undesired
action.

Tests do not run unless a plugin says to run them.

For example, running "maven site:deploy" with these
reports:
<report>maven-javadoc-plugin</report>
<report>maven-jxr-plugin</report>
<report>maven-tasklist-plugin</report>
<report>maven-faq-plugin</report>
<report>maven-checkstyle-plugin</report>
<report>maven-findbugs-plugin</report>
<report>maven-pmd-plugin</report>
<report>maven-simian-plugin</report>
<report>maven-junit-report-plugin</report>
<report>maven-cobertura-plugin</report>
<report>maven-jdepend-plugin</report>

should result in the JUnit tests only running during
these two:
<report>maven-junit-report-plugin</report>
<report>maven-cobertura-plugin</report>

But findbugs is running the test goal for some reason
too. In the log, findbugs also starts running the
tests. I think it should not do so, or at least have a
property to turn that off.

Also, can't use "maven.test.skip=true" because that
causes the tests not to run for junit and cobertura too.

Discussion

  • Eric Pugh

    Eric Pugh - 2005-06-14

    Logged In: YES
    user_id=140549

    Could you attach a copy of your log? And, if you remove junit and
    cobertura, do the tests still run?

     
  • Jeff Jensen

    Jeff Jensen - 2005-06-14

    Logged In: YES
    user_id=498804

    Yes, even if I narrow all reports to just the findbugs one,
    they run. I will attach a log of just that - only findbugs
    running, on a relatively new small project (one test). You
    will see it runs too.

     
  • Jeff Jensen

    Jeff Jensen - 2005-06-14

    Log of only running findbugs report on small project with one JUnit test file, showing the run of JUnit test

     
  • Jeff Jensen

    Jeff Jensen - 2005-06-20

    Logged In: YES
    user_id=498804

    findbugs plugin 0.8.4 and 0.9.1 do not have this problem.

    I was using 1.0-SNAPSHOT from ibiblio, believing it was the
    latest and greatest. It is not.

     
  • Jeff Jensen

    Jeff Jensen - 2005-06-20
    • status: open --> closed
     
  • Jeff Jensen

    Jeff Jensen - 2005-06-20
    • labels: --> findbugs
    • milestone: --> release
    • status: closed --> closed-fixed
     
  • Eric Pugh

    Eric Pugh - 2005-06-20

    Logged In: YES
    user_id=140549

    I have deleted the bogus 1.0-SNAPSHOT from the maven-plugins.sf.net
    repository to prevent this in the future.

     
  • Eric Pugh

    Eric Pugh - 2005-06-23

    Logged In: YES
    user_id=140549

    unfortunantly I don't have much control over ibiblio... I will post a request
    to MAVEN UPLOADS to have that dealt with.. Properly do the other one
    as well...

     

Log in to post a comment.