auxiliary classpath is not set up for running FindBugs
------------------------------------------------------

         Key: MOJO-355
         URL: http://jira.codehaus.org/browse/MOJO-355
     Project: Mojo
        Type: Bug

  Components: findbugs  
 Environment: WindowsXP, maven 2.0.3, JDK 1.4.2
    Reporter: Thai Ha


I'm developing a simple Web application which depends on servlet API 
        <dependencies>
                <dependency>
                        <groupId>javax.servlet</groupId>
                        <artifactId>servlet-api</artifactId>
                        <version>2.4</version>
                        <scope>provided</scope>
                </dependency>
                     ....

When I try to run "mvn findbugs:findbugs" and open the FindBugs report, I found 
some errors as below:

VR: Unresolvable reference to javax.servlet.ServletRequest by xxx (my action 
class name)

In the findbugs plugin source code, I found the following code:

---------FindBugsMojo.java------------------
        final Reporter bugReporter = initialiseReporter( sink, bundle, log );
        final Project findBugsProject = new Project();
        addJavaSourcesToFindBugsProject( pSourceFiles, findBugsProject );

        final FindBugs findBugs = new FindBugs( bugReporter, findBugsProject );

        final UserPreferences preferences = 
UserPreferences.createDefaultUserPreferences();
        preferences.enableAllDetectors( true );
        findBugs.setUserPreferences( preferences );

        return findBugs;
I guess the error happened because findBugsProject  object is not set up with 
"auxiliary classpath" which are dependencies. Can anyone fix this issue?



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to