Maven FindBugs plugin

13,776

Solution 1

Looking at the repository, your version should be 1.2, not 1.2.1

Also, your configuration is wrong, you need to choose some of the options. So it should look like:

    <plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>findbugs-maven-plugin</artifactId>
  <version>1.2</version>
  <configuration>
    <threshold>High</threshold>
    <effort>Default</effort>
  </configuration>
</plugin>

Solution 2

try that:

<version>1.2</version>

http://repo2.maven.org/maven2/org/codehaus/mojo/findbugs-maven-plugin/

Seems like they did a simple copy/paste error.

Share:
13,776
Etam
Author by

Etam

Updated on June 04, 2022

Comments

  • Etam
    Etam almost 2 years

    You have usage: findbugs-maven-plugin

    <project>
      [...]
      <reporting>
        [...]
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <version>1.2.1</version>
          <configuration>
            <xmlOutput>true|false</xmlOutput>
            <xmlOutputDirectory>directory location of findbugs xdoc xml report</xmlOutputDirectory>
            <threshold>High|Normal|Low|Exp|Ignore</threshold>
            <effort>Min|Default|Max</effort>
            <excludeFilterFile>findbugs-exclude.xml</excludeFilterFile>
            <includeFilterFile>findbugs-include.xml</includeFilterFile>
            <visitors>FindDeadLocalStores,UnreadFields</visitors>
            <omitVisitors>FindDeadLocalStores,UnreadFields</omitVisitors>
            <onlyAnalyze>org.codehaus.mojo.findbugs.*</onlyAnalyze>
            <pluginList>/libs/fb-contrib/fb-contrib-2.8.0.jar</pluginList>
            <debug>true|false</debug>
            <relaxed>true|false</relaxed>
            <findbugsXmlOutput>true|false</findbugsXmlOutput>
            <findbugsXmlOutputDirectory>directory location of findbugs legact xml format report</findbugsXmlOutputDirectory>
          </configuration>
        </plugin>
        [...]
      </reporting>
      [...]
    </project>
    

    But once:

    mvn site
    

    I get:

    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] Failed to resolve artifact.
    
    GroupId: org.codehaus.mojo
    ArtifactId: findbugs-maven-plugin
    Version: 1.2.1
    
    Reason: Unable to download the artifact from any repository
    
      org.codehaus.mojo:findbugs-maven-plugin:pom:1.2.1
    
    from the specified remote repositories:
      central (http://repo1.maven.org/maven2)
    

    Do you know why? What should I do?