我使用聲納生成Findbugs,Checkstyle和PMD報告,然後將這些報告提供給jenkins生成基於xml文件的圖形,但我在jenkins上得到以下錯誤。jenkins不能識別由聲納生成的checkstyle和pmd報告
[CHECKSTYLE] Parsing of file /home/bldarea/.../checkstyle.xml failed due to an exception:
org.xml.sax.SAXException: Input stream is not a Checkstyle file.
at hudson.plugins.checkstyle.parser.CheckStyleParser.parse(CheckStyleParser.java:69)
at hudson.plugins.analysis.core.AbstractAnnotationParser.parse(AbstractAnnotationParser.java:53)
at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:306)
at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:264)
at hudson.plugins.analysis.core.FilesParser.parserCollectionOfFiles(FilesParser.java:215)
at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:184)
at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2246)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
同樣地,對於PMD文件
[PMD] Parsing of file /home/bldarea/.../pmd.xml failed due to an exception:
org.xml.sax.SAXException: Input stream is not a PMD file.
at hudson.plugins.pmd.parser.PmdParser.parse(PmdParser.java:72)
at hudson.plugins.analysis.core.AbstractAnnotationParser.parse(AbstractAnnotationParser.java:53)
at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:306)
at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:264)
at hudson.plugins.analysis.core.FilesParser.parserCollectionOfFiles(FilesParser.java:215)
at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:184)
at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2246)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
好吧....其實我已經展現FindBugs的,的CheckStyle和PMD的圖形視圖報告,請你能指導我如何去實現它的聲納。我可以成功生成報告,但可以創建圖形視圖。請你能幫我這麼做。 – user1891622 2013-04-30 11:32:56
那麼,有一個圖表顯示違規規則引擎是沒用的:有什麼意義?違規是違規行爲,可能是由Findbugs或PMD產生的!如果你想擁有圖表,你可以添加你可以在http://nemo.sonarsource.org上看到的小部件。 – 2013-04-30 13:12:20