ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <sflo...@nc.rr.com>
Subject Re: Way to simplify this task?
Date Sat, 21 Feb 2009 00:13:48 GMT
Yeah...been a while since I did this...

I think, it is literally assuming a file entitled *.jar below :(

What does your taskdef look like for Find Bugs?  I use something like this:

    <taskdef  name = "analyze"  classname = "edu.umd.cs.findbugs.anttask.FindBugsTask"
 uri = "http://findbugs.sourceforge.net"  description = "Needed to use FindBugs.">
        <classpath>
            <fileset  dir = "${keros.find-bugs.HOME}"  includes = "*.jar"/>
        </classpath>
    </taskdef>

Not sure this will help, but maybe you want to use a similar construct, but for fileset do
something like:

<fileset  dir = "web/WEB-INF/lib"  includes = "*.jar"/>

Of course, adjust taskdef based on what you are currently doing ;)

---- dave.alvarado@remanresource.com wrote: 
> Hi,
> 
> Perhaps this is more appropriate for the FindBugs forum, but I've found good answers
here.  I'm using Ant 1.6 with FindBugs 1.3.7.  I want to tell FindBugs to include all the
JARS within a certain directory for its classpath, but this isn't working ...
> 
> <target name="findBugs" >
>         <FindBugs home="${findBugsHome}" output="html" outputFile="${findBugsOutputFile}"
jvmargs="${jvmargs}" projectName="regui" >
>             <class location="${build}/${war-file-name}" />
>                 <auxClasspath path="web/WEB-INF/lib/*.jar" />
>                 <sourcePath path="${srcDir}/com" />
>         </FindBugs>
> </target>
> 
> I get the error
> 
> [FindBugs] The following errors occurred during analysis:
>  [FindBugs]   Cannot open codebase filesystem:C:\Temp\Routing_Engine\ui\web\WEB-INF\lib\*.jar
>  [FindBugs]     java.util.zip.ZipException: Error opening C:\Temp\Routing_Engine\ui\web\WEB-INF\lib\*.jar
>  [FindBugs]       At edu.umd.cs.findbugs.classfile.impl.ZipFileCodeBase.<init>(ZipFileCodeBase.java:56)
>  [FindBugs]       At edu.umd.cs.findbugs.classfile.impl.ZipCodeBaseFactory.makeZipCodeBase(ZipCodeBaseFactory.java:40)
>  [FindBugs]       At edu.umd.cs.findbugs.classfile.impl.ClassFactory.createFilesystemCodeBase(ClassFactory.java:96)
>  [FindBugs]       At edu.umd.cs.findbugs.classfile.impl.FilesystemCodeBaseLocator.openCodeBase(FilesystemCodeBaseLocator.java:75)
>  [FindBugs]       At edu.umd.cs.findbugs.classfile.impl.ClassPathBuilder.processWorkList(ClassPathBuilder.java:560)
>  [FindBugs]       At edu.umd.cs.findbugs.classfile.impl.ClassPathBuilder.build(ClassPathBuilder.java:195)
>  [FindBugs]       At edu.umd.cs.findbugs.FindBugs2.buildClassPath(FindBugs2.java:626)
>  [FindBugs]       At edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:184)
>  [FindBugs]       At edu.umd.cs.findbugs.FindBugs.runMain(FindBugs.java:323)
>  [FindBugs]       At edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java:1069)
> 
> Any ideas what I'm doing wrong?  Do I have to list each JAR file? - Dave
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message