[英]Maven Findbugs plugin not executing with mvn site command
I'm trying to get Findbugs working with an existing/mature Maven project.我正在尝试让 Findbugs 与现有/成熟的 Maven 项目一起工作。
I added the following to the <plugins>
tag in my pom.xml
:我在pom.xml
的<plugins>
标签中添加了以下内容:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.5</version>
<configuration>
<effort>Max</effort>
<threshold>Low</threshold>
<xmlOutput>true</xmlOutput>
</configuration>
</plugin>
I then see that the Findbugs plugin runs when you run mvn site
.然后我看到 Findbugs 插件在您运行mvn site
时运行。 Since the build invocation for my project is aleady:由于我的项目的构建调用是 aleady:
mvn clean jacoco:prepare-agent test site jxr:jxr -Dkey1=123 -Dkey2=456 -Denvironment=DEV
...I just run it like I normally do. ...我只是像往常一样运行它。 The build succeeds and I go to my normal site summary in my browser:构建成功,我在浏览器中转到我的正常站点摘要:
No where from here can I find any "Findbugs" reports or anything that mentions Findbugs at all.从这里我找不到任何“Findbugs”报告或任何提到 Findbugs 的内容。 When I do a grep for Findbugs ( grep -rl "findbugs" .
) I do see that many of my ./target/surefire-reports/TEST-*.xml
files have the term " findbugs " mentioned in them.当我为 Findbugs ( grep -rl "findbugs" .
) 执行 grep 时,我确实看到我的许多./target/surefire-reports/TEST-*.xml
文件中提到了术语“ findbugs ”。
Worth mentioning that I do not see a target/site/findbugs.html
file after the successful build...值得一提的是,在成功构建后我没有看到target/site/findbugs.html
文件...
Any ideas as to where I can find HTML Findbugs output under my Site summary (or anywhere else)?关于在哪里可以在我的站点摘要(或其他任何地方)下找到 HTML Findbugs 输出的任何想法? Looking for a nice HTML report showing which (if any) Findbugs checks failed.寻找一个很好的 HTML 报告,显示哪些(如果有)Findbugs 检查失败。
You should add the FindBugs plugin in the <plugins>
section of the <reporting>
section of your pom.xml
:您应该在pom.xml
的<reporting>
部分的<plugins>
部分中添加 FindBugs 插件:
<project>
...
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.5</version>
</plugin>
</plugins>
</reporting>
...
</project>
The question just states <plugins>
, not sure if that could be the issue.问题只是说明<plugins>
,不确定这是否可能是问题所在。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.