![](/img/trans.png)
[英]Command line mvn parameter to stop spring-boot-maven-plugin from executing run
[英]Maven Findbugs plugin not executing with mvn site command
我正在嘗試讓 Findbugs 與現有/成熟的 Maven 項目一起工作。
我在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>
然后我看到 Findbugs 插件在您運行mvn site
時運行。 由於我的項目的構建調用是 aleady:
mvn clean jacoco:prepare-agent test site jxr:jxr -Dkey1=123 -Dkey2=456 -Denvironment=DEV
...我只是像往常一樣運行它。 構建成功,我在瀏覽器中轉到我的正常站點摘要:
從這里我找不到任何“Findbugs”報告或任何提到 Findbugs 的內容。 當我為 Findbugs ( grep -rl "findbugs" .
) 執行 grep 時,我確實看到我的許多./target/surefire-reports/TEST-*.xml
文件中提到了術語“ findbugs ”。
值得一提的是,在成功構建后我沒有看到target/site/findbugs.html
文件...
關於在哪里可以在我的站點摘要(或其他任何地方)下找到 HTML Findbugs 輸出的任何想法? 尋找一個很好的 HTML 報告,顯示哪些(如果有)Findbugs 檢查失敗。
您應該在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>
問題只是說明<plugins>
,不確定這是否可能是問題所在。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.