mbosch | 11 Jan 18:05 2010
Picon

Re: Findbugs 1.3.8 throws "The following classes needed for analysis were missing" exception


Hi Freddy,
thank you for you response and for documentation upgrade.
Now I've another question about this topic

We already use "<outputDirectory>[YOUR CLASSES/BIN
DIRECTORY]</outputDirectory>" tag in our poms, but we usually have a lot of
dependencies to manage in our projects (up to several dozens of jars) and
it'll be too expensive to add them manually in pom files for each project
(for each version, for each execution....)
In fact, we already use a dependency management tool (Ivy) and we'd like to
avoid to replicate these dependencies in pom files too!

Is there a way to set as aux classpath a directory instead of a list of
single jars?

Thanks a lot
Bye
Marco

Freddy Mallet wrote:
> 
> Hi Marco,
> 
> I've updated the user documentation page[1], with the following
> information
> :
> 
> *Findbugs and Sonar light mode*
> 
> Findbugs rules can be activated in Sonar light mode but as Findbugs needs
> compiled classes to find violations, you need to specify where are stored
> those classes. By default Findbugs tries to find classes in
> "target/classes"
> directory (default Maven directory).If your Ant build generates classes
> for
> instance in "build" directory you need to update your pom.xml file by
> adding
> "<outputDirectory>[YOUR CLASSES/BIN DIRECTORY]</outputDirectory>" below
> "<sourceDirectory>" node.
> Additionally you need to define the aux classpath for findbugs in the
> "<dependencies>" node for instance as system dependency via
> 
> <dependency>
>     <groupId>deps</groupId>
>     <artifactId>dep1</artifactId>
>     <version>0.1</version>
>     <scope>system</scope>
>     <systemPath>${basedir}/web_app/WEB-INF/lib/struts.jar</systemPath>
> </dependency>
> 
> If you forget a jar, you'll certainly get a warning message like this one
> :
> 
> The following classes needed for analysis were missing:
>  org.springframework.jdbc.object.StoredProcedure
>  org.displaytag.decorator.TableDecorator
> 
> 
> Hope it helps,
> Freddy
> 
> [1] - http://docs.codehaus.org/display/SONAR/Analyzing+Java+Projects
> 
> 
> 
> On Fri, Jan 8, 2010 at 12:49 PM, mbosch <marco.boschetti@...> wrote:
> 
>>
>> Hi all,
>> we're using Sonar 1.12 for non-maven projects (ant build) and we're
>> experiencing the following problem during Findbugs (version 1.3.8) check
>> execution
>>
>> [INFO] Velocity successfully started.
>> [INFO] [findbugs:findbugs {execution: default-cli}]
>> [INFO]   Using source root:
>> [INFO]     /home/boschetti/svnworkdir/gericabo/trunk/build/classes
>> [INFO]   Using test source root:
>> [INFO]     /home/boschetti/svnworkdir/gericabo/trunk/target/test-classes
>> [INFO]   Using normal effort.
>> [INFO]   Adding Source Directory:
>> /home/boschetti/svnworkdir/gericabo/trunk/src/java
>> [INFO]   Using low threshold.
>> [INFO]   Using FindBugs Version: 1.3.8
>> [INFO]   Using low threshold.
>> [INFO]   Using low threshold.
>> [INFO]   Using the xdoc format
>> [INFO]   Using normal effort.
>> [INFO]   Using low threshold.
>> [INFO]   Using low threshold.
>> [INFO]   Debugging is Off
>> [INFO]   Using bug include filter
>> /home/boschetti/svnworkdir/gericabo/trunk/target/sonar/findbugs-include.xml
>> [INFO]   Using bug exclude filter
>> /home/boschetti/svnworkdir/gericabo/trunk/target/sonar/findbugs-exclude.xml
>> The following classes needed for analysis were missing:
>>  org.springframework.jdbc.object.StoredProcedure
>>  org.displaytag.decorator.TableDecorator
>>  org.displaytag.decorator.TableDecorator
>>  com.opensymphony.xwork2.validator.validators.FieldValidatorSupport
>>  org.displaytag.decorator.TableDecorator
>>  org.displaytag.decorator.TableDecorator
>>  org.displaytag.decorator.TableDecorator
>>  org.displaytag.decorator.TableDecorator
>>  org.springframework.jdbc.object.StoredProcedure
>>  org.displaytag.decorator.TableDecorator
>>  org.displaytag.decorator.TableDecorator
>>  org.displaytag.decorator.TableDecorator
>>  org.springframework.jdbc.object.StoredProcedure
>>  org.displaytag.decorator.TableDecorator
>>  org.displaytag.decorator.TableDecorator
>>  org.displaytag.decorator.TableDecorator
>>  org.displaytag.decorator.TableDecorator
>>  org.apache.commons.logging.impl.Log4JLogger
>>  org.displaytag.decorator.TableDecorator
>>  org.apache.struts2.util.StrutsTypeConverter
>>  org.displaytag.decorator.TableDecorator
>>  org.springframework.jdbc.object.StoredProcedure
>>  org.displaytag.decorator.TableDecorator
>>  org.displaytag.decorator.TableDecorator
>>  org.displaytag.decorator.TableDecorator
>>  org.displaytag.decorator.TableDecorator
>>  org.displaytag.decorator.TableDecorator
>>  org.springframework.jdbc.object.StoredProcedure
>>  org.displaytag.decorator.TableDecorator
>>  org.displaytag.decorator.TableDecorator
>>  org.displaytag.decorator.TableDecorator
>>  org.displaytag.decorator.TableDecorator
>>  org.displaytag.decorator.TableDecorator
>>  org.displaytag.decorator.TableDecorator
>>  com.opensymphony.xwork2.ActionSupport
>>  org.displaytag.decorator.TableDecorator
>>  org.displaytag.decorator.TableDecorator
>>  com.opensymphony.xwork2.ActionSupport
>>  org.displaytag.decorator.TableDecorator
>>  junit.framework.TestCase
>>  junit.textui.TestRunner
>>  com.opensymphony.xwork2.ActionSupport
>>  org.displaytag.decorator.TableDecorator
>>  org.displaytag.decorator.TableDecorator
>> [INFO] Printing Errors
>> [INFO] Printing Missing classes
>> [INFO] Printing Source Roots
>> The following classes needed for analysis were missing:
>>  org.springframework.jdbc.object.StoredProcedure
>>  org.displaytag.decorator.TableDecorator
>>  com.opensymphony.xwork2.validator.validators.FieldValidatorSupport
>>  org.apache.commons.logging.impl.Log4JLogger
>>  org.apache.struts2.util.StrutsTypeConverter
>>  com.opensymphony.xwork2.ActionSupport
>>  junit.framework.TestCase
>>  junit.textui.TestRunner
>>
>> Does anybody know how to solve this problem?
>>
>> Thanks, Regards
>> Marco
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Findbugs-1.3.8-throws-%22The-following-classes-needed-for-analysis-were-missing%22-exception-tp27074770p27074770.html
>> Sent from the Sonar user mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
> 
> 

--

-- 
View this message in context: http://old.nabble.com/Re%3A-Findbugs-1.3.8-throws-%22The-following-classes-needed--for-analysis-were-missing%22-exception-tp27078727p27113840.html
Sent from the Sonar user mailing list archive at Nabble.com.


Gmane