问题描述
今天用MyEclipse8.0做Antfindbugs运行现在报错啊findbugs:[echo]==========begintoscanwithFindbugs!==========[findbugs]Executingfindbugsfromanttask[findbugs]RunningFindBugs...[findbugs]Ignoring.javafile"E:workspaceSVNtrunkproject1sourcecncomcmbctestUtil.java;E:workspaceSVNtrunkproject1unSourcecncomcmbctestBinarySearchTestTheories.java"specifiedinclasspathorauxclasspath[findbugs]Exceptioninthread"main"java.io.FileNotFoundException:E:workspaceSVNtrunkproject1build-outputFile(ϵͳ�Ҳ���ָ�����ļ���)[findbugs]atjava.util.zip.ZipFile.open(NativeMethod)[findbugs]atjava.util.zip.ZipFile.<init>(ZipFile.java:114)[findbugs]atjava.util.zip.ZipFile.<init>(ZipFile.java:131)[findbugs]atedu.umd.cs.findbugs.classfile.impl.ZipFileCodeBase.<init>(ZipFileCodeBase.java:53)[findbugs]atedu.umd.cs.findbugs.classfile.impl.ZipCodeBaseFactory.countUsingZipFile(ZipCodeBaseFactory.java:92)[findbugs]atedu.umd.cs.findbugs.classfile.impl.ZipCodeBaseFactory.makeZipCodeBase(ZipCodeBaseFactory.java:46)[findbugs]atedu.umd.cs.findbugs.classfile.impl.ClassFactory.createFilesystemCodeBase(ClassFactory.java:97)[findbugs]atedu.umd.cs.findbugs.classfile.impl.FilesystemCodeBaseLocator.openCodeBase(FilesystemCodeBaseLocator.java:75)[findbugs]atedu.umd.cs.findbugs.classfile.impl.ClassPathBuilder.processWorkList(ClassPathBuilder.java:564)[findbugs]atedu.umd.cs.findbugs.classfile.impl.ClassPathBuilder.build(ClassPathBuilder.java:195)[findbugs]atedu.umd.cs.findbugs.FindBugs2.buildClassPath(FindBugs2.java:584)[findbugs]atedu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:181)[findbugs]atedu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:348)[findbugs]atedu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1057)[findbugs]JavaResult:1[findbugs]Outputsavedtoe:findbugs-report.html[echo]==========scanwithFindbugsover!==========
解决方案
解决方案二:
只是运行的程序<!--=================================FINDBUGS=================================--><pathid="findbugs.path"><filesetdir="..buildlibfindbugs-1.3.9lib"><includename="findbugs-ant.jar"/></fileset></path><taskdefname="findbugs"classname="edu.umd.cs.findbugs.anttask.FindBugsTask"classpathref="findbugs.path"/><targetname="findbugs"depends="compile"><echomessage="==========begintoscan${project.name}withFindbugs!=========="/><findbugshome="${findbugs.home}"output="html"outputFile="e:findbugs-report.html"timeout="${findbugs.timeout}"jvmargs="${findbugs.jvmargs}"failonerror="true"><!--=================================INSERTYOURCODEHERE=================================--><!--thefollowingelemnetsareobliged--><classlocation="..buildlib*.jar"/><auxClasspath><filesetdir="lib"><includename="..buildlib*.jar"/></fileset></auxClasspath><sourcePathpath="..sourcecncomcmbctestUtil.java"/><sourcePathpath="..unSourcecncomcmbctestBinarySearchTestTheories.java"/><sourcePathpath="..unSourcecncomcmbctestBinarySearchTestTheories.java"/></findbugs><echomessage="==========scan${project.name}withFindbugsover!=========="/></target>
解决方案三:
java.io.FileNotFoundException:E:workspaceSVNtrunkproject1build-outputFile檢查一下這個路徑和檔案。
解决方案四:
引用2楼kebin0001的回复:
java.io.FileNotFoundException:E:workspaceSVNtrunkproject1build-outputFile檢查一下這個路徑和檔案。
build路径下没有outputFile这文件