我是一名构建工程师,我的开发团队在Jdeveloper IDE中开发代码。有没有办法将spotbugs直接集成到Jdeveloper中并找到这些bug?
发布于 2019-07-09 15:31:26
对于JDeveloper 12c,您可以使用Maven集成spotbugs,它默认可用于集成开发环境(您也可以将其设置为11g版本,但默认情况下不会集成到集成开发环境中):
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>3.1.12</version>
<dependencies>
<!-- overwrite dependency on spotbugs if you want to specify the version of spotbugs -->
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs</artifactId>
<version>4.0.0-beta3</version>
</dependency>
</dependencies>
</plugin>对于JDeveloper 11g,您可以使用Ant将spotbugs集成到集成开发环境中,该工具在默认情况下可用:
<property name="spotbugs.home" value="/export/home/daveho/work/spotbugs" />
<target name="spotbugs" depends="jar">
<spotbugs home="${spotbugs.home}"
output="xml"
outputFile="bcel-sb.xml" >
<auxClasspath path="${basedir}/lib/Regex.jar" />
<sourcePath path="${basedir}/src/java" />
<class location="${basedir}/bin/bcel.jar" />
</spotbugs>
</target>阅读更多:https://spotbugs.github.io/
在这两种情况下,您都会在jdeveloper内部的"build“菜单中看到新创建的spotbug任务
https://stackoverflow.com/questions/56946986
复制相似问题