我正在尝试使用如下所示的spotbugs-maven-plugin
<build>
...
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>3.1.0-RC8</version>
<configuration>
<plugins>
<plugin>
<groupId>jp.skypencil.findbugs.slf4j<groupId>
<artifactId>bug-pattern</artifactId>
<version>1.2.4</version>
</plugin>
</plugins>
<includeFilterFile>./spotbugIncludeFilter.xml</includeFilterFile>
<onlyAnalyze>com.vnera.-</onlyAnalyze>
<argLine>-Xmx1024m</argLine>
</configuration>
</plugin>
</build>
但每次失败都会出现以下错误
[INFO] Fork Value is true
[java] Out of memory
[java] Total memory: 482M
[java] free memory: 43M
Stacktrace如下所示
[java] at java.util.ArrayList.<init>(ArrayList.java:152)
[java] at edu.umd.cs.findbugs.ba.Frame.<init>(Frame.java:113)
[java] at edu.umd.cs.findbugs.ba.vna.ValueNumberFrame.<init>(ValueNumberFrame.java:90)
[java] at edu.umd.cs.findbugs.ba.vna.ValueNumberAnalysis.createFact(ValueNumberAnalysis.java:181)
[java] at edu.umd.cs.findbugs.ba.vna.ValueNumberAnalysis.createFact(ValueNumberAnalysis.java:58)
[java] at edu.umd.cs.findbugs.ba.BasicAbstractDataflowAnalysis.lookupOrCreateFact(BasicAbstractDataflowAnalysis.java:185)
[java] at edu.umd.cs.findbugs.ba.BasicAbstractDataflowAnalysis.getStartFact(BasicAbstractDataflowAnalysis.java:70)
[java] at edu.umd.cs.findbugs.ba.Dataflow.execute(Dataflow.java:234)
[java] at edu.umd.cs.findbugs.classfile.engine.bcel.ValueNumberDataflowFactory.analyze(ValueNumberDataflowFactory.java:76)
[java] at edu.umd.cs.findbugs.classfile.engine.bcel.ValueNumberDataflowFactory.analyze(ValueNumberDataflowFactory.java:46)
[java] at edu.umd.cs.findbugs.classfile.impl.AnalysisCache.analyzeMethod(AnalysisCache.java:369)
[java] at edu.umd.cs.findbugs.classfile.impl.AnalysisCache.getMethodAnalysis(AnalysisCache.java:322)
[java] at edu.umd.cs.findbugs.ba.ClassContext.getMethodAnalysis(ClassContext.java:1005)
[java] at edu.umd.cs.findbugs.ba.ClassContext.getValueNumberDataflow(ClassContext.java:336)
[java] at edu.umd.cs.findbugs.detect.FindInconsistentSync2.analyzeMethod(FindInconsistentSync2.java:638)
[java] at edu.umd.cs.findbugs.detect.FindInconsistentSync2.visitClassContext(FindInconsistentSync2.java:413)
[java] at edu.umd.cs.findbugs.DetectorToDetector2Adapter.visitClass(DetectorToDetector2Adapter.java:76)
[java] at edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java:1079)
[java] at edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:280)
[java] at edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:401)
[java] at edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1187)
我也尝试过设置<argLine>-XX:MaxPermSize=1024m</argLine>
。仍然得到同样的错误。
有人可以告诉我如何解决这个问题?