[ 
http://jira.codehaus.org/browse/MFINDBUGS-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=270837#comment-270837
 ] 

Nickolay Martinov edited comment on MFINDBUGS-143 at 6/19/11 10:25 PM:
-----------------------------------------------------------------------

Documentation states that "If successfully resolved, the contents of the 
configuration is copied into the ${project.build.directory} directory before 
being passed to Findbugs as a filter file" : 
http://mojo.codehaus.org/findbugs-maven-plugin/2.3.2/check-mojo.html
Current behavior is far from what is described assuming that you dont mean that 
'we'll throw exception otherwise'.

Also I do not ask about different configuration for each module. I want same 
configuration for each module - convention over configuration. For example, 
maven-resources-plugin will not fail if src/main/resources is absent. Same, for 
example, goes for maven-patch-plugin.

Will it be ok if new option is added to enable filter file to be absent? By 
default it could be set to throw exception if filter file is absent.

      was (Author: nickolay.martinov):
    Documentation states that "If successfully resolved, the contents of the 
configuration is copied into the ${project.build.directory} directory before 
being passed to Findbugs as a filter file" : 
http://mojo.codehaus.org/findbugs-maven-plugin/2.3.2/check-mojo.html
Current behavior is far from what is described assuming that you dont mean that 
'we'll throw exception otherwise'.

Also I do not ask about different configuration for each module. I want same 
configuration for each module - convention over configuration. For example, 
maven-resources-plugin will not fail if src/main/resources is absent. Same, for 
example, goes for maven-patch-plugin.

Will it be ok if new option is added to enable filter file to be absent? By 
default if could be set to throw exception if filter file is absent.
  
> excludeFilterFile is not allowed to be absent
> ---------------------------------------------
>
>                 Key: MFINDBUGS-143
>                 URL: http://jira.codehaus.org/browse/MFINDBUGS-143
>             Project: Maven 2.x FindBugs Plugin
>          Issue Type: Bug
>    Affects Versions: 2.3.2
>         Environment: Apache Maven 3.0.3 (r1075438; 2011-02-28 20:31:09+0300)
> Maven home: C:\_soft\maven\bin\..
> Java version: 1.6.0_23, vendor: Sun Microsystems Inc.
> Java home: C:\_soft\jdk\jre
> Default locale: ru_RU, platform encoding: Cp1251
> OS name: "windows vista", version: "6.0", arch: "x86", family: "windows"
>            Reporter: Nickolay Martinov
>            Assignee: Garvin LeClaire
>         Attachments: findbugs-maven-plugin.excludeFileterAbsent.patch
>
>
> Documentation states:
> "excludeFilterFile    String  1.0-beta-1      
> File name of the exclude filter. Bugs matching the filters are not reported.
> Potential values are a filesystem path, a URL, or a classpath resource.
> This parameter is resolved as resource, URL, then file. If successfully 
> resolved, the contents of the configuration is copied into the 
> ${project.build.directory} directory before being passed to Findbugs as a 
> filter file."
> But in reality if file is absent then exception is thrown and build fails.
> We have multimodule project where parent defines parameters for findbugs 
> plugin:
>                       <plugin>
>                               <groupId>org.codehaus.mojo</groupId>
>                               <artifactId>findbugs-maven-plugin</artifactId>
>                               <executions>
>                                       <execution>
>                                               <id>findbugs</id>
>                                               <goals>
>                                                       <goal>check</goal>
>                                               </goals>
>                                               <!-- Findbugs will fork compile 
> phase again so minimize what is repeated -->
>                                               <phase>process-classes</phase>
>                                               <configuration>
>                                                       
> <excludeFilterFile>${basedir}/src/main/java/findbugs-exclude.xml</excludeFilterFile>
>                                               </configuration>
>                                       </execution>
>                               </executions>
>                       </plugin>
> So if any child project we need to exclude false positive or something then 
> there is no need to reconfigure findbugs in this project. Just exclude file 
> needs to be added in this child project. Unfortunately this doesnt work as 
> findbugs fails on projects that have no exclusions.
> [INFO] >>> findbugs-maven-plugin:2.3.2:check (findbugs) @ inactivity-timer-se 
> >>>
> [INFO] 
> [INFO] --- findbugs-maven-plugin:2.3.2:findbugs (findbugs) @ 
> inactivity-timer-se ---
> [INFO] ****** FindBugsMojo execute *******
> [INFO] canGenerate is true
> [INFO] ****** FindBugsMojo executeFindbugs *******
> [INFO] Temp File is 
> C:\_work\omt\openmediation\trunk\openmediation\nom-basic-smx-components-parent\inactivity-timer-se\target\findbugsTemp.xml
> [INFO] Fork Value is true
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 12.199s
> [INFO] Finished at: Sat Jun 18 12:25:58 MSD 2011
> [INFO] Final Memory: 24M/495M
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] Could not find resource 
> 'C:\_work\omt\openmediation\trunk\openmediation\nom-basic-smx-components-parent\inactivity-timer-se/src/main/java/findbugs-exclude.xml'.
>  -> [Help 1]
> org.codehaus.plexus.resource.loader.ResourceNotFoundException: Could not find 
> resource 
> 'C:\_work\omt\openmediation\trunk\openmediation\nom-basic-smx-components-parent\inactivity-timer-se/src/main/java/findbugs-exclude.xml'.
>       at 
> org.codehaus.plexus.resource.DefaultResourceManager.getResourceAsInputStream(DefaultResourceManager.java:91)
>       at 
> org.codehaus.plexus.resource.DefaultResourceManager.getResourceAsFile(DefaultResourceManager.java:117)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:597)
>       at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
>       at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
>       at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
>       at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)
>       at 
> org.codehaus.groovy.runtime.InvokerHelper.invokePojoMethod(InvokerHelper.java:738)
>       at 
> org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:726)
>       at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
>       at 
> org.codehaus.mojo.findbugs.FindBugsMojo.getResourceFile(FindBugsMojo.groovy:1059)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:597)
>       at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
>       at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
>       at 
> org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:338)
>       at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:78)
>       at 
> org.codehaus.mojo.findbugs.FindBugsMojo$_executeFindbugs_closure4_closure13.doCall(FindBugsMojo.groovy:835)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:597)
>       at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
>       at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
>       at 
> org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:249)
>       at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)
>       at groovy.lang.Closure.call(Closure.java:292)
>       at groovy.lang.Closure.call(Closure.java:305)
>       at 
> org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1068)
>       at 
> org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1045)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:597)
>       at 
> org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke(ReflectionMetaMethod.java:51)
>       at 
> org.codehaus.groovy.runtime.metaclass.NewInstanceMetaMethod.invoke(NewInstanceMetaMethod.java:54)
>       at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
>       at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
>       at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)
>       at 
> org.codehaus.groovy.runtime.InvokerHelper.invokePojoMethod(InvokerHelper.java:738)
>       at 
> org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:726)
>       at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
>       at 
> org.codehaus.mojo.findbugs.FindBugsMojo$_executeFindbugs_closure4.doCall(FindBugsMojo.groovy:833)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:597)
>       at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
>       at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
>       at 
> org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:249)
>       at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:78)
>       at 
> org.codehaus.mojo.findbugs.FindBugsMojo$_executeFindbugs_closure4.doCall(FindBugsMojo.groovy)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:597)
>       at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
>       at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
>       at 
> org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:249)
>       at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)
>       at groovy.lang.Closure.call(Closure.java:292)
>       at groovy.lang.Closure.call(Closure.java:287)
>       at groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:143)
>       at groovy.util.AntBuilder.doInvokeMethod(AntBuilder.java:149)
>       at groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:64)
>       at 
> org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:756)
>       at 
> org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:730)
>       at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
>       at 
> org.codehaus.mojo.findbugs.FindBugsMojo.executeFindbugs(FindBugsMojo.groovy:760)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:597)
>       at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
>       at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
>       at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
>       at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:78)
>       at 
> org.codehaus.mojo.findbugs.FindBugsMojo.execute(FindBugsMojo.groovy:701)
>       at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions(MojoExecutor.java:365)
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199)
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
>       at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
>       at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
>       at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
>       at 
> org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
>       at 
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
>       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
>       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
>       at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
>       at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
>       at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>       at java.lang.reflect.Method.invoke(Method.java:597)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>       at 
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to