[
https://jira.codehaus.org/browse/MFINDBUGS-146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=288005#comment-288005
]
Marcin Kuthan commented on MFINDBUGS-146:
-----------------------------------------
Hi Garvin
It seems that version 2.3.3 is still affected by this bug:
{code}
[ERROR] Cannot create file-based resource.
C:\_data\projects\m4e\simple-war\target\export?name=acme&language=java&format=findbugs
(The filename, directory name, or volume label syntax is incorrect) -> [Help 1]
org.codehaus.plexus.resource.loader.FileResourceCreationException: Cannot
create file-based resource.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.codehaus.groovy.runtime.MetaClassHelper.doConstructorInvoke(MetaClassHelper.java:595)
at
groovy.lang.MetaClassImpl.doConstructorInvoke(MetaClassImpl.java:2381)
at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1277)
at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1207)
at
org.codehaus.groovy.runtime.InvokerHelper.invokeConstructorOf(InvokerHelper.java:781)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNewN(ScriptBytecodeAdapter.java:230)
at
org.codehaus.mojo.findbugs.FindBugsMojo.getResourceAsFile(FindBugsMojo.groovy:1204)
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.getResourceFile(FindBugsMojo.groovy:1092)
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:842)
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:840)
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:775)
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:708)
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.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)
Caused by: java.io.FileNotFoundException:
C:\_data\projects\m4e\simple-war\target\export?name=acme&language=java&format=findbugs
(The filename, directory name, or volume label syntax is incorrect)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.codehaus.groovy.runtime.MetaClassHelper.doConstructorInvoke(MetaClassHelper.java:595)
at
groovy.lang.MetaClassImpl.doConstructorInvoke(MetaClassImpl.java:2381)
at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1277)
at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1207)
at
org.codehaus.groovy.runtime.InvokerHelper.invokeConstructorOf(InvokerHelper.java:781)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNewN(ScriptBytecodeAdapter.java:230)
at
org.codehaus.mojo.findbugs.FindBugsMojo.getResourceAsFile(FindBugsMojo.groovy:1197)
... 99 more
{code}
{code}
Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
Maven home: C:\_apps\apache-maven-3.0.3
Java version: 1.6.0_17, vendor: Sun Microsystems Inc.
(...)
[DEBUG] Configuring mojo
'org.codehaus.mojo:findbugs-maven-plugin:2.3.3:findbugs' with basic
configurator -->
[DEBUG] (s) classFilesDirectory =
C:\_data\projects\m4e\simple-war\target\classes
[DEBUG] (s) compileSourceRoots =
[C:\_data\projects\m4e\simple-war\src\main\java]
[DEBUG] (s) debug = false
[DEBUG] (s) effort = Default
[DEBUG] (s) failOnError = true
[DEBUG] (s) findbugsXmlOutput = true
[DEBUG] (s) findbugsXmlOutputDirectory =
C:\_data\projects\m4e\simple-war\target
[DEBUG] (s) fork = true
[DEBUG] (s) includeFilterFile =
http://rmavm233.mad.acme.com/sonar/profiles/export?name=acme&language=java&format=findbugs
[DEBUG] (s) includeTests = false
[DEBUG] (s) localRepository = id: local
url: file:///c:/_apps/apache-maven-repo/
layout: none
[DEBUG] (s) maxHeap = 512
[DEBUG] (s) nested = false
[DEBUG] (s) outputDirectory = C:\_data\projects\m4e\simple-war\target\site
[DEBUG] (s) outputEncoding = UTF-8
[DEBUG] (s) pluginArtifacts =
[org.codehaus.mojo:findbugs-maven-plugin:maven-plugin:2.3.3:,
jaxen:jaxen:jar:1.1.1:compile, dom4j:dom4j:jar:1.6.1:compile,
jdom:jdom:jar:1.0:compile, xml-apis:xml-apis:jar:1.3.02:compile,
xerces:xercesImpl:jar:2.6.2:compile, xom:xom:jar:1.0:compile,
xerces:xmlParserAPIs:jar:2.6.2:compile, com.ibm.icu:icu4j:jar:2.6.1:compile,
org.codehaus.gmaven:gmaven-mojo:jar:1.3:compile,
org.codehaus.gmaven.runtime:gmaven-runtime-api:jar:1.3:compile,
org.codehaus.gmaven.feature:gmaven-feature-api:jar:1.3:compile,
org.codehaus.gmaven.runtime:gmaven-runtime-1.5:jar:1.3:compile,
org.codehaus.gmaven.feature:gmaven-feature-support:jar:1.3:compile,
org.codehaus.groovy:groovy-all-minimal:jar:1.5.8:compile,
org.apache.ant:ant:jar:1.7.1:compile,
org.apache.ant:ant-launcher:jar:1.7.1:compile, jline:jline:jar:0.9.94:compile,
org.codehaus.plexus:plexus-interpolation:jar:1.1:compile,
org.codehaus.gmaven:gmaven-plugin:jar:1.3:compile,
org.codehaus.gmaven.runtime:gmaven-runtime-loader:jar:1.3:compile,
org.codehaus.gmaven.runtime:gmaven-runtime-support:jar:1.3:compile,
org.sonatype.gshell:gshell-io:jar:2.0:compile,
com.thoughtworks.qdox:qdox:jar:1.10:compile,
org.apache.maven.shared:file-management:jar:1.2.1:compile,
org.apache.maven.shared:maven-shared-io:jar:1.1:compile,
commons-lang:commons-lang:jar:2.4:compile,
org.slf4j:slf4j-api:jar:1.5.10:compile,
org.sonatype.gossip:gossip:jar:1.2:compile,
org.apache.maven.reporting:maven-reporting-impl:jar:2.1:compile,
commons-validator:commons-validator:jar:1.2.0:compile,
commons-beanutils:commons-beanutils:jar:1.7.0:compile,
commons-digester:commons-digester:jar:1.6:compile,
commons-logging:commons-logging:jar:1.0.4:compile, oro:oro:jar:2.0.8:compile,
org.codehaus.groovy:groovy-all:jar:1.7.4:compile,
org.apache.maven.reporting:maven-reporting-api:jar:3.0:compile,
org.apache.maven.doxia:doxia-core:jar:1.1.3:compile,
org.apache.maven.doxia:doxia-logging-api:jar:1.1.3:compile,
commons-httpclient:commons-httpclient:jar:3.1:compile,
commons-codec:commons-codec:jar:1.2:compile,
org.apache.maven.doxia:doxia-sink-api:jar:1.1.3:compile,
org.apache.maven.doxia:doxia-decoration-model:jar:1.1.3:compile,
org.apache.maven.doxia:doxia-site-renderer:jar:1.1.3:compile,
org.apache.maven.doxia:doxia-module-xhtml:jar:1.1.3:compile,
org.apache.maven.doxia:doxia-module-fml:jar:1.1.3:compile,
org.codehaus.plexus:plexus-i18n:jar:1.0-beta-7:compile,
org.codehaus.plexus:plexus-velocity:jar:1.1.7:compile,
org.apache.velocity:velocity:jar:1.5:compile,
commons-collections:commons-collections:jar:3.2:compile,
org.apache.maven.shared:maven-doxia-tools:jar:1.2.1:compile,
commons-io:commons-io:jar:1.4:compile,
com.google.code.findbugs:findbugs-ant:jar:1.3.9:compile,
com.google.code.findbugs:findbugs:jar:1.3.9:compile,
com.google.code.findbugs:bcel:jar:1.3.9:compile,
com.google.code.findbugs:jsr305:jar:1.3.9:compile,
com.google.code.findbugs:jFormatString:jar:1.3.9:compile,
com.google.code.findbugs:annotations:jar:1.3.9:compile,
asm:asm:jar:3.1:compile, asm:asm-analysis:jar:3.1:compile,
asm:asm-commons:jar:3.1:compile, asm:asm-util:jar:3.1:compile,
asm:asm-tree:jar:3.1:compile, asm:asm-xml:jar:3.1:compile,
jgoodies:plastic:jar:1.2.0:compile,
org.codehaus.plexus:plexus-resources:jar:1.0-alpha-4:compile,
org.codehaus.plexus:plexus-utils:jar:1.5.1:compile]
[DEBUG] (s) project = MavenProject:
com.googlecode.m4enterprise:simple-war-webapp:0.0.29-SNAPSHOT @
C:\_data\projects\m4e\simple-war\pom.xml
[DEBUG] (s) relaxed = false
[DEBUG] (s) remoteArtifactRepositories = [ id: artifactory
url: http://repository.intranet.acme.com/artifactory/acme
layout: default
snapshots: [enabled => true, update => daily]
releases: [enabled => true, update => daily]
]
[DEBUG] (s) skip = false
[DEBUG] (s) sourceEncoding = UTF-8
[DEBUG] (s) testClassFilesDirectory =
C:\_data\projects\m4e\simple-war\target\test-classes
[DEBUG] (s) testSourceRoots = [C:\_data\projects\m4e\simple-war\src\test\java]
[DEBUG] (s) threshold = Default
[DEBUG] (s) timeout = 600000
[DEBUG] (s) trace = false
[DEBUG] (s) xmlEncoding = UTF-8
[DEBUG] (s) xmlOutput = true
[DEBUG] (s) xmlOutputDirectory = C:\_data\projects\m4e\simple-war\target
[DEBUG] (s) xrefLocation = C:\_data\projects\m4e\simple-war\target\site\xref
[DEBUG] (s) xrefTestLocation =
C:\_data\projects\m4e\simple-war\target\site\xref-test
[DEBUG] -- end configuration --
{code}
Could you check again that the patch has been applied to the code, please?
Thanks,
Marcin
> Report cannot correctly handle external FindBugs ruleset as exported by Sonar
> QA Dashboard
> ------------------------------------------------------------------------------------------
>
> Key: MFINDBUGS-146
> URL: https://jira.codehaus.org/browse/MFINDBUGS-146
> Project: Maven 2.x FindBugs Plugin
> Issue Type: Bug
> Affects Versions: 2.3.2
> Environment: OS: Microsoft Windows 7 Professional x86 64-bit NL
> Java: JDK 1.6.0_22 64-bit
> Maven: 3.0.3
> Maven cmd: clean deploy site:site site:deploy
> Reporter: Tjerk Stroband
> Assignee: Garvin LeClaire
> Fix For: 2.3.3
>
>
> Sonar (http://www.sonarsource.org/) offers a way to centrally manage the
> FindBugs ruleset configuration and publish the specified configuration on a
> URL.
> The url takes the following form:
> http://nemo.sonarsource.org/profiles/export?format=findbugs&language=java&name=Nemo%2520rules%2520with%2520findbugs
> Plugin config:
> {code:xml}
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>findbugs-maven-plugin</artifactId>
> <!-- version>2.3.2</version -->
> <configuration>
> <effort>Max</effort>
> <threshold>Low</threshold>
>
> <includeFilterFile>http://nemo.sonarsource.org/profiles/export?format=findbugs&language=java&name=Nemo%2520rules%2520with%2520findbugs</includeFilterFile>
> </configuration>
> </plugin>
> {code}
> When generating a FindBugs report (as part of site:site) the plugin fails (on
> specified environment) with the following error:
> {noformat}
> [INFO] Generating "FindBugs Report" report --- findbugs-maven-plugin:2.3.2
> ...<snip>...
> [DEBUG] Adding Include Filter Files
> [DEBUG] resource is
> http://nemo.sonarsource.org/profiles/export?format=findbugs&language=java&name=Nemo%2520rules%2520with%2520findbugs
> [DEBUG] location is http://nemo.sonarsource.org/profiles
> [DEBUG] artifact is
> export?format=findbugs&language=java&name=Nemo%2520rules%2520with%2520findbugs
> [DEBUG] URLResourceLoader: Found
> 'http://nemo.sonarsource.org/profiles/export?format=findbugs&language=java&name=Nemo%2520rules%2520with%2520findbugs'
> at ''
> [DEBUG] The resource
> 'http://nemo.sonarsource.org/profiles/export?format=findbugs&language=java&name=Nemo%2520rules%2520with%2520findbugs'
> found using the
> org.codehaus.plexus.resource.loader.URLResourceLoader@af094f2.
> ...<snip>...
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> ...<snip>...
> [ERROR] Cannot create file-based resource.
> <myproject-root>\target\export?format=findbugs&language=java&name=Nemo%2520rules%2520with%2520findbugs
> (De syntaxis van de bestandsnaam, mapnaam of volumenaam is onjuist) -> [Help
> 1]
> org.codehaus.plexus.resource.loader.FileResourceCreationException: Cannot
> create file-based resource.
> at
> org.codehaus.plexus.resource.DefaultResourceManager.getResourceAsFile(DefaultResourceManager.java:154)
> 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_closure12.doCall(FindBugsMojo.groovy:825)
> 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:823)
> 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.executeReport(FindBugsMojo.groovy:562)
> at
> org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:190)
> at
> org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:165)
> at
> org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:330)
> at
> org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:134)
> at
> org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:159)
> at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:122)
> 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.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)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
> 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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
> Caused by: java.io.FileNotFoundException:
> <myproject-root>\target\export?format=findbugs&language=java&name=Nemo%2520rules%2520with%2520findbugs
> (De syntaxis van de bestandsnaam, mapnaam of volumenaam is onjuist)
> at java.io.FileOutputStream.open(Native Method)
> at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
> at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
> at java.io.FileWriter.<init>(FileWriter.java:73)
> at
> org.codehaus.plexus.resource.DefaultResourceManager.getResourceAsFile(DefaultResourceManager.java:148)
> ... 114 more
> {noformat}
> The problem is that the temporary filename constructed from the URL contains
> illegal characters.
> I tracked it down to the following class/line:
> {{maven-findbugs-plugin/src/main/groovy/org/codehaus/mojo/findbugs/FindBugsMojo.java
> line 1040}}.
> The method {{File getResourceFile(String)}} is not accommodating weird
> characters in the resource name that are not allowed on the filesystem.
> {code:java}
> protected File getResourceFile(String resource) {
> assert resource
> String location = null
> String artifact = resource
> if ( resource.indexOf('/') != -1 ) {
> artifact = resource.substring(resource.lastIndexOf('/') + 1)
> }
> if ( resource.indexOf('/') != -1 ) {
> location = resource.substring(0, resource.lastIndexOf('/'))
> }
> log.debug("resource is " + resource)
> log.debug("location is " + location)
> log.debug("artifact is " + artifact)
> File resourceFile = resourceManager.getResourceAsFile(resource, artifact)
> log.debug("location of configFile file is " + resourceFile)
> return resourceFile
> }
> {code}
> Adding the following lines right before the {{log.debug}} statements should
> fix it:
> {code:java}
> // in the case that the rules are defined externally on a url
> // we need to replace some special url characters that cannot be
> // used in filenames on disk or produce ackward filenames.
> // replace all occurrences of the following characters: ? : & =
> location = location.replaceAll("[\\?\\:\\&\\=\\%]", "_");
> {code}
> This issue is similar to a problem i reported on PMD-plugin
> http://jira.codehaus.org/browse/MPMD-127
> The fix is the same...
> As I'm unfamiliar with the way the unit-test on the project are setup I'm not
> sure where to include the testcase for this. However, the test would look
> like the following code fragment:
> {code:java}
> /**
> * Verify the correct working of the getResourceFile method
> * In particular, check the resulting filename does not contain illegal
> characters
> *
> * @throws Exception
> */
> public void testGetResourceFileNameCharacters() throws Exception {
> FindBugsMojo mojo = // get it somewhere;
> assertEquals(
> "getResourceFile is not correctly encoding
> filename",
>
> "export_format_findbugs_language_java_name_some_2520name",
>
> mojo.getResourceFile("export?format=findbugs&language=java&name=some%2520name"));
> }
> {code}
> As I am not a developer on the project I cannot apply this fix. Is anyone on
> the development team willing to do this for me?
> If required I can create a patch. I assume on the latest trunk of
> 2.3.3-SNAPSHOT...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
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