Hi, I wanted to post a follow-up on what I changed based off everyone's 
feedback.  Still haven't got it to find the JARs.  Any additional 
troubleshooting tips are appreciated.  

        <path id="findbug.class.path">                  
                        <pathelement location="C:\Program 
Files\findbugs-1.3.7\lib\findbugs-ant.jar"/>
                        <fileset 
dir="C:\Temp\Routing_Engine\ui\web\WEB-INF\lib">
                                <include name="**/*.jar"/>
                        </fileset>
        </path>

        <taskdef name="FindBugs" 
classname="edu.umd.cs.findbugs.anttask.FindBugsTask" 
classpathref="findbug.class.path" />

        <target name="findBugs" >
                <FindBugs home="${findBugsHome}" output="html" 
outputFile="${findBugsOutputFile}" jvmargs="${jvmargs}" projectName="regui" >
                        <class location="${build}/${war-file-name}" /> 
                        <sourcePath path="${srcDir}/com" />
                </FindBugs>
        </target>

The output is ...

[FindBugs] Running FindBugs...
 [FindBugs] The following classes needed for analysis were missing:
 [FindBugs]   javax.xml.rpc.Service
 [FindBugs]   weblogic.wsee.jaxrpc.StubImpl
 [FindBugs]   weblogic.wsee.jaxrpc.ServiceImpl
 [FindBugs]   javax.servlet.http.HttpServlet
 [FindBugs]   org.apache.struts.action.Action
 [FindBugs]   org.apache.struts.action.ActionForm
 [FindBugs]   javax.xml.rpc.Stub
 [FindBugs]   weblogic.wsee.wsdl.WsdlPort
 [FindBugs]   weblogic.wsee.tools.clientgen.stubgen.StubSerialWrapper
 [FindBugs]   javax.xml.rpc.ServiceException
 [FindBugs]   org.apache.struts.action.ActionForward
 [FindBugs]   weblogic.wsee.connection.transport.TransportInfo
 [FindBugs]   org.apache.struts.action.ActionMessage
 [FindBugs]   org.apache.log4j.PropertyConfigurator
 [FindBugs]   javax.servlet.ServletException
 [FindBugs]   org.apache.struts.action.ActionMapping
 [FindBugs]   javax.xml.rpc.soap.SOAPFaultException
 [FindBugs]   javax.servlet.http.HttpServletRequest
 [FindBugs]   com.bea.xbean.util.XsTypeConverter
 [FindBugs]   org.apache.log4j.Logger
 [FindBugs]   javax.xml.rpc.JAXRPCException
 [FindBugs]   weblogic.wsee.connection.transport.http.HttpTransportInfo
 [FindBugs]   javax.servlet.http.HttpServletResponse
 [FindBugs]   org.apache.struts.action.ActionErrors
 [FindBugs]   weblogic.wsee.context.ContextNotFoundException
 [FindBugs]   weblogic.wsee.async.AsyncPreCallContext
 [FindBugs] Warnings generated: 20
 [FindBugs] Missing classes: 26
 [FindBugs] Classes needed for analysis were missing



>  -------Original Message-------
>  From: sflo...@nc.rr.com
>  Subject: Re: Way to simplify this task?
>  Sent: Feb 21 '09 00:13
>  
>  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.alvar...@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-unsubscr...@ant.apache.org
>  > For additional commands, e-mail: user-h...@ant.apache.org
>  >
>  
>  

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

Reply via email to