Mojo's FindBugs Maven Plugin
  1. Mojo's FindBugs Maven Plugin
  2. MFINDBUGS-89

Dependencies no longer properly passed to findbugs for analysis

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.2
    • Labels:
      None
    • Environment:
    • Number of attachments :
      0

      Description

      I've recently moved to 2.2-SNAPSHOT to take advantage of the fix for MFINDBUGS-82 ( thanks, BTW ).

      A new problem has come up, which manifests itself in depended-on jars not being properly passed to findbugs for analysis. I get errors similar to:

      [INFO] [findbugs:findbugs {execution: default-cli}]                                                                                                                                            
           [java] The following errors occurred during analysis:                                                                                                                                     
           [java]   Cannot open codebase filesystem:/home/robert/workspace/sehj-parent/sehj-persist/"/home/robert/.m2/repository/ro/lmn/sehj/sehj-model/0.0.1-SNAPSHOT/sehj-model-0.0.1-SNAPSHOT.jar 
           [java]     java.util.zip.ZipException: Can't ready directory containing zip file: /home/robert/workspace/sehj-parent/sehj-persist/"/home/robert/.m2/repository/ro/lmn/sehj/sehj-model/0.0.1-SNAPSHOT/sehj-model-0.0.1-SNAPSHOT.jar
           [java]       At edu.umd.cs.findbugs.classfile.impl.ZipFileCodeBase.<init>(ZipFileCodeBase.java:59)
           [java]       At edu.umd.cs.findbugs.classfile.impl.ZipCodeBaseFactory.countUsingZipFile(ZipCodeBaseFactory.java:92)
           [java]       At edu.umd.cs.findbugs.classfile.impl.ZipCodeBaseFactory.makeZipCodeBase(ZipCodeBaseFactory.java:46)
           [java]       At edu.umd.cs.findbugs.classfile.impl.ClassFactory.createFilesystemCodeBase(ClassFactory.java:97)
           [java]       At edu.umd.cs.findbugs.classfile.impl.FilesystemCodeBaseLocator.openCodeBase(FilesystemCodeBaseLocator.java:75)
           [java]       At edu.umd.cs.findbugs.classfile.impl.ClassPathBuilder.processWorkList(ClassPathBuilder.java:564)
           [java]       At edu.umd.cs.findbugs.classfile.impl.ClassPathBuilder.build(ClassPathBuilder.java:195)
           [java]       At edu.umd.cs.findbugs.FindBugs2.buildClassPath(FindBugs2.java:584)
           [java]       At edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:181)
           [java]       At edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:348)
           [java]       At edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1057)
           [java]   Cannot open codebase filesystem:/home/robert/workspace/sehj-parent/sehj-persist/"
           [java]     java.util.zip.ZipException: Zip file doesn't exist: /home/robert/workspace/sehj-parent/sehj-persist/"
           [java]       At edu.umd.cs.findbugs.classfile.impl.ZipFileCodeBase.<init>(ZipFileCodeBase.java:60)
           [java]       At edu.umd.cs.findbugs.classfile.impl.ZipCodeBaseFactory.countUsingZipFile(ZipCodeBaseFactory.java:92)
           [java]       At edu.umd.cs.findbugs.classfile.impl.ZipCodeBaseFactory.makeZipCodeBase(ZipCodeBaseFactory.java:46)
           [java]       At edu.umd.cs.findbugs.classfile.impl.ClassFactory.createFilesystemCodeBase(ClassFactory.java:97)
           [java]       At edu.umd.cs.findbugs.classfile.impl.FilesystemCodeBaseLocator.openCodeBase(FilesystemCodeBaseLocator.java:75)
           [java]       At edu.umd.cs.findbugs.classfile.impl.ClassPathBuilder.processWorkList(ClassPathBuilder.java:564)
           [java]       At edu.umd.cs.findbugs.classfile.impl.ClassPathBuilder.build(ClassPathBuilder.java:195)
           [java]       At edu.umd.cs.findbugs.FindBugs2.buildClassPath(FindBugs2.java:584)
           [java]       At edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:181)
           [java]       At edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:348)
           [java]       At edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1057)
           [java] The following classes needed for analysis were missing:
           [java]   org.sehj.model.HandledException
           [java]   org.sehj.model.HandledExceptionFactory
           [java]   javax.annotation.Nonnull
           [java] Missing classes: 4
      

      The path which is an inclusion candidate is
      /home/robert/workspace/sehj-parent/sehj-persist/"/home/robert/.m2/repository/ro/lmn/sehj/sehj-model/0.0.1-SNAPSHOT/sehj-model-0.0.1-SNAPSHOT.jar
      but it should be
      /home/robert/.m2/repository/ro/lmn/sehj/sehj-model/0.0.1-SNAPSHOT/sehj-model-0.0.1-SNAPSHOT.jar

      This is a multi-module build, and it worked with 2.0.1.

        Activity

        Hide
        Garvin LeClaire added a comment -

        I was working on it when you submitted it. It should be fine now.

        Show
        Garvin LeClaire added a comment - I was working on it when you submitted it. It should be fine now.
        Hide
        Robert Munteanu added a comment -

        This still fails for me when using findbugs-maven-plugin-2.2-20090907.202106-14.jar . Is there a more recent snapshot published?

        Show
        Robert Munteanu added a comment - This still fails for me when using findbugs-maven-plugin-2.2-20090907.202106-14.jar . Is there a more recent snapshot published?
        Hide
        Ben Foster added a comment -

        Same error here using findbugs-maven-plugin-2.2-20091012.100310-16.jar.

        Show
        Ben Foster added a comment - Same error here using findbugs-maven-plugin-2.2-20091012.100310-16.jar.
        Hide
        Vincent Massol added a comment -

        Hi Garvin,

        I've just svnupped and rebuilt the findbugs plugin and I got the following error:

        [INFO] [findbugs:findbugs {execution: findbugs}]
             [java] The following errors occurred during analysis:
             [java]   Cannot open codebase filesystem:/Users/vmassol/dev/xwiki/trunks-clean2/platform/core/xwiki-rendering/xwiki-rendering-parsers/xwiki-rendering-parser-wikimodel/"/Users/vmassol/.m2/repository/org/wikimodel/org.wikimodel.wem/2.0.7-20091006-1/org.wikimodel.wem-2.0.7-20091006-1.jar
             [java]     java.util.zip.ZipException: Can't ready directory containing zip file: /Users/vmassol/dev/xwiki/trunks-clean2/platform/core/xwiki-rendering/xwiki-rendering-parsers/xwiki-rendering-parser-wikimodel/"/Users/vmassol/.m2/repository/org/wikimodel/org.wikimodel.wem/2.0.7-20091006-1/org.wikimodel.wem-2.0.7-20091006-1.jar
             [java]       At edu.umd.cs.findbugs.classfile.impl.ZipFileCodeBase.<init>(ZipFileCodeBase.java:59)
             [java]       At edu.umd.cs.findbugs.classfile.impl.ZipCodeBaseFactory.countUsingZipFile(ZipCodeBaseFactory.java:92)
             [java]       At edu.umd.cs.findbugs.classfile.impl.ZipCodeBaseFactory.makeZipCodeBase(ZipCodeBaseFactory.java:46)
             [java]       At edu.umd.cs.findbugs.classfile.impl.ClassFactory.createFilesystemCodeBase(ClassFactory.java:97)
             [java]       At edu.umd.cs.findbugs.classfile.impl.FilesystemCodeBaseLocator.openCodeBase(FilesystemCodeBaseLocator.java:75)
             [java]       At edu.umd.cs.findbugs.classfile.impl.ClassPathBuilder.processWorkList(ClassPathBuilder.java:564)
             [java]       At edu.umd.cs.findbugs.classfile.impl.ClassPathBuilder.build(ClassPathBuilder.java:195)
             [java]       At edu.umd.cs.findbugs.FindBugs2.buildClassPath(FindBugs2.java:584)
             [java]       At edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:181)
             [java]       At edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:348)
             [java]       At edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1057)
             [java]   Cannot open codebase filesystem:/Users/vmassol/dev/xwiki/trunks-clean2/platform/core/xwiki-rendering/xwiki-rendering-parsers/xwiki-rendering-parser-wikimodel/"
             [java]     java.util.zip.ZipException: Zip file doesn't exist: /Users/vmassol/dev/xwiki/trunks-clean2/platform/core/xwiki-rendering/xwiki-rendering-parsers/xwiki-rendering-parser-wikimodel/"
        

        Note the wrong quotes and wrong path.

        Thanks

        Show
        Vincent Massol added a comment - Hi Garvin, I've just svnupped and rebuilt the findbugs plugin and I got the following error: [INFO] [findbugs:findbugs {execution: findbugs}] [java] The following errors occurred during analysis: [java] Cannot open codebase filesystem:/Users/vmassol/dev/xwiki/trunks-clean2/platform/core/xwiki-rendering/xwiki-rendering-parsers/xwiki-rendering-parser-wikimodel/"/Users/vmassol/.m2/repository/org/wikimodel/org.wikimodel.wem/2.0.7-20091006-1/org.wikimodel.wem-2.0.7-20091006-1.jar [java] java.util.zip.ZipException: Can't ready directory containing zip file: /Users/vmassol/dev/xwiki/trunks-clean2/platform/core/xwiki-rendering/xwiki-rendering-parsers/xwiki-rendering-parser-wikimodel/"/Users/vmassol/.m2/repository/org/wikimodel/org.wikimodel.wem/2.0.7-20091006-1/org.wikimodel.wem-2.0.7-20091006-1.jar [java] At edu.umd.cs.findbugs.classfile.impl.ZipFileCodeBase.<init>(ZipFileCodeBase.java:59) [java] At edu.umd.cs.findbugs.classfile.impl.ZipCodeBaseFactory.countUsingZipFile(ZipCodeBaseFactory.java:92) [java] At edu.umd.cs.findbugs.classfile.impl.ZipCodeBaseFactory.makeZipCodeBase(ZipCodeBaseFactory.java:46) [java] At edu.umd.cs.findbugs.classfile.impl.ClassFactory.createFilesystemCodeBase(ClassFactory.java:97) [java] At edu.umd.cs.findbugs.classfile.impl.FilesystemCodeBaseLocator.openCodeBase(FilesystemCodeBaseLocator.java:75) [java] At edu.umd.cs.findbugs.classfile.impl.ClassPathBuilder.processWorkList(ClassPathBuilder.java:564) [java] At edu.umd.cs.findbugs.classfile.impl.ClassPathBuilder.build(ClassPathBuilder.java:195) [java] At edu.umd.cs.findbugs.FindBugs2.buildClassPath(FindBugs2.java:584) [java] At edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:181) [java] At edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:348) [java] At edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1057) [java] Cannot open codebase filesystem:/Users/vmassol/dev/xwiki/trunks-clean2/platform/core/xwiki-rendering/xwiki-rendering-parsers/xwiki-rendering-parser-wikimodel/" [java] java.util.zip.ZipException: Zip file doesn't exist: /Users/vmassol/dev/xwiki/trunks-clean2/platform/core/xwiki-rendering/xwiki-rendering-parsers/xwiki-rendering-parser-wikimodel/" Note the wrong quotes and wrong path. Thanks
        Hide
        Garvin LeClaire added a comment -

        Test with Mac, Linux and Windows and works fine now. Using it a work the past cuple of days with no problems.

        Garvin

        Show
        Garvin LeClaire added a comment - Test with Mac, Linux and Windows and works fine now. Using it a work the past cuple of days with no problems. Garvin
        Hide
        Vincent Massol added a comment -

        Thanks Garvin. It's not failing anymore but still generate the "javax.annotation.Nonnull" missing class:

        [INFO] [findbugs:findbugs {execution: default-cli}]
        [INFO]   AuxClasspath is ->/Users/vmassol/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar:/Users/vmassol/.m2/repository/org/xwiki/platform/xwiki-core-xml/2.1-SNAPSHOT/xwiki-core-xml-2.1-SNAPSHOT.jar:/Users/vmassol/.m2/repository/org/xwiki/platform/xwiki-core-component-api/2.1-SNAPSHOT/xwiki-core-component-api-2.1-SNAPSHOT.jar:/Users/vmassol/.m2/repository/net/sourceforge/htmlcleaner/htmlcleaner/2.1/htmlcleaner-2.1.jar:/Users/vmassol/.m2/repository/jdom/jdom/1.1/jdom-1.1.jar:/Users/vmassol/.m2/repository/org/xwiki/platform/xwiki-core-properties/2.1-SNAPSHOT/xwiki-core-properties-2.1-SNAPSHOT.jar:/Users/vmassol/.m2/repository/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.jar:/Users/vmassol/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar:/Users/vmassol/.m2/repository/org/hibernate/hibernate-validator/4.0.0.GA/hibernate-validator-4.0.0.GA.jar:/Users/vmassol/.m2/repository/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA.jar:/Users/vmassol/.m2/repository/org/slf4j/slf4j-api/1.5.6/slf4j-api-1.5.6.jar:/Users/vmassol/.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar:/Users/vmassol/.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar:/Users/vmassol/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar:/Users/vmassol/.m2/repository/com/sun/xml/bind/jaxb-impl/2.1.3/jaxb-impl-2.1.3.jar:/Users/vmassol/.m2/repository/org/xwiki/platform/xwiki-core-observation-local/2.1-SNAPSHOT/xwiki-core-observation-local-2.1-SNAPSHOT.jar:/Users/vmassol/.m2/repository/org/xwiki/platform/xwiki-core-configuration-api/2.1-SNAPSHOT/xwiki-core-configuration-api-2.1-SNAPSHOT.jar:/Users/vmassol/.m2/repository/org/wikimodel/org.wikimodel.wem/2.0.7-20091021/org.wikimodel.wem-2.0.7-20091021.jar:/Users/vmassol/.m2/repository/net/java/dev/javacc/javacc/4.2/javacc-4.2.jar:/Users/vmassol/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar:/Users/vmassol/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar
             [java] The following classes needed for analysis were missing:
             [java]   javax.annotation.Nonnull
             [java] Warnings generated: 5
             [java] Missing classes: 1
        
        Show
        Vincent Massol added a comment - Thanks Garvin. It's not failing anymore but still generate the "javax.annotation.Nonnull" missing class: [INFO] [findbugs:findbugs {execution: default-cli}] [INFO] AuxClasspath is ->/Users/vmassol/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar:/Users/vmassol/.m2/repository/org/xwiki/platform/xwiki-core-xml/2.1-SNAPSHOT/xwiki-core-xml-2.1-SNAPSHOT.jar:/Users/vmassol/.m2/repository/org/xwiki/platform/xwiki-core-component-api/2.1-SNAPSHOT/xwiki-core-component-api-2.1-SNAPSHOT.jar:/Users/vmassol/.m2/repository/net/sourceforge/htmlcleaner/htmlcleaner/2.1/htmlcleaner-2.1.jar:/Users/vmassol/.m2/repository/jdom/jdom/1.1/jdom-1.1.jar:/Users/vmassol/.m2/repository/org/xwiki/platform/xwiki-core-properties/2.1-SNAPSHOT/xwiki-core-properties-2.1-SNAPSHOT.jar:/Users/vmassol/.m2/repository/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.jar:/Users/vmassol/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar:/Users/vmassol/.m2/repository/org/hibernate/hibernate-validator/4.0.0.GA/hibernate-validator-4.0.0.GA.jar:/Users/vmassol/.m2/repository/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA.jar:/Users/vmassol/.m2/repository/org/slf4j/slf4j-api/1.5.6/slf4j-api-1.5.6.jar:/Users/vmassol/.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar:/Users/vmassol/.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar:/Users/vmassol/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar:/Users/vmassol/.m2/repository/com/sun/xml/bind/jaxb-impl/2.1.3/jaxb-impl-2.1.3.jar:/Users/vmassol/.m2/repository/org/xwiki/platform/xwiki-core-observation-local/2.1-SNAPSHOT/xwiki-core-observation-local-2.1-SNAPSHOT.jar:/Users/vmassol/.m2/repository/org/xwiki/platform/xwiki-core-configuration-api/2.1-SNAPSHOT/xwiki-core-configuration-api-2.1-SNAPSHOT.jar:/Users/vmassol/.m2/repository/org/wikimodel/org.wikimodel.wem/2.0.7-20091021/org.wikimodel.wem-2.0.7-20091021.jar:/Users/vmassol/.m2/repository/net/java/dev/javacc/javacc/4.2/javacc-4.2.jar:/Users/vmassol/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar:/Users/vmassol/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar [java] The following classes needed for analysis were missing: [java] javax.annotation.Nonnull [java] Warnings generated: 5 [java] Missing classes: 1

          People

          • Assignee:
            Garvin LeClaire
            Reporter:
            Robert Munteanu
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: