dev@glassfish.java.net

Re: FindBugs support

From: Bill Shannon <bill.shannon_at_sun.com>
Date: Mon, 14 Sep 2009 20:57:50 -0700

Looks to me like you ran "mvn findbugs:findbugs" instead of "mvn site".


Lloyd Chambers wrote on 9/14/09 5:39 PM:
> I'm not seeing any target/site/findbugs.html file.
>
>
> llcMule-2:amx-core llc$ fb
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'findbugs'.
> WAGON_VERSION: 1.0-beta-2
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building AMX V3 Core
> [INFO] task-segment: [findbugs:findbugs]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Preparing findbugs:findbugs
> [INFO] [enforcer:enforce {execution: enforce-versions}]
> [INFO] [osgiversion:compute-osgi-version {execution: compute-osgi-version}]
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [hk2:hk2-compile]
> [INFO] Compiling 1 source file to
> /Volumes/Scratch/work/v3/code/common/amx-core/target/classes
> [INFO] Setting property: classpath.resource.loader.class =>
> 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
> [INFO] Setting property: velocimacro.messages.on => 'false'.
> [INFO] Setting property: resource.loader => 'classpath'.
> [INFO] Setting property: resource.manager.logwhenfound => 'false'.
> [INFO] **************************************************************
> [INFO] Starting Jakarta Velocity v1.4
> [INFO] RuntimeInstance initializing.
> [INFO] Default Properties File:
> org/apache/velocity/runtime/defaults/velocity.properties
> [INFO] Default ResourceManager initializing. (class
> org.apache.velocity.runtime.resource.ResourceManagerImpl)
> [INFO] Resource Loader Instantiated:
> org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
> [INFO] ClasspathResourceLoader : initialization starting.
> [INFO] ClasspathResourceLoader : initialization complete.
> [INFO] ResourceCache : initialized. (class
> org.apache.velocity.runtime.resource.ResourceCacheImpl)
> [INFO] Default ResourceManager initialization complete.
> [INFO] Loaded System Directive:
> org.apache.velocity.runtime.directive.Literal
> [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
> [INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
> [INFO] Loaded System Directive:
> org.apache.velocity.runtime.directive.Include
> [INFO] Loaded System Directive:
> org.apache.velocity.runtime.directive.Foreach
> [INFO] Created: 20 parsers.
> [INFO] Velocimacro : initialization starting.
> [INFO] Velocimacro : adding VMs from VM library template :
> VM_global_library.vm
> [ERROR] ResourceManager : unable to find resource 'VM_global_library.vm'
> in any resource loader.
> [INFO] Velocimacro : error using VM library template
> VM_global_library.vm :
> org.apache.velocity.exception.ResourceNotFoundException: Unable to find
> resource 'VM_global_library.vm'
> [INFO] Velocimacro : VM library template macro registration complete.
> [INFO] Velocimacro : allowInline = true : VMs can be defined inline in
> templates
> [INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline
> may NOT replace previous VM definitions
> [INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will
> be global in scope if allowed.
> [INFO] Velocimacro : initialization complete.
> [INFO] Velocity successfully started.
> [INFO] [findbugs:findbugs]
> [INFO] Using source root:
> [INFO] /Volumes/Scratch/work/v3/code/common/amx-core/target/classes
> [INFO] Using test source root:
> [INFO]
> /Volumes/Scratch/work/v3/code/common/amx-core/target/test-classes
> [INFO] No effort provided, using default effort.
> [INFO] Adding Source Directory:
> /Volumes/Scratch/work/v3/code/common/amx-core/src/main/java
> [INFO] Using high threshold.
> [INFO] Using FindBugs Version: 1.3.8
> [INFO] Using high threshold.
> [INFO] Using high threshold.
> [INFO] Using high threshold.
> [INFO] Debugging is Off
> [INFO] No bug include filter.
> [INFO] No bug exclude filter.
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 17 seconds
> [INFO] Finished at: Mon Sep 14 17:39:29 PDT 2009
> [INFO] Final Memory: 52M/552M
> [INFO]
> ------------------------------------------------------------------------
> llcMule-2:amx-core llc$ ls target/site
> ls: target/site: No such file or directory
> llcMule-2:amx-core llc$
>
>
>
> On Sep 11, 2009, at 4:38 PM, Bill Shannon wrote:
>
>> I've just committed some changes to support running FindBugs for
>> GlassFish.
>> At the top level, or in any module, you can run
>>
>> mvn findbugs:findbugs
>>
>> to generate the FindBugs XML report, which is not very readable directly
>> but is used by the Hudson FindBugs plugin to generate a more readable
>> report. Hopefully Jane will be setting up Hudson to do that soon.
>>
>> You can also run
>>
>> mvn site
>>
>> to generate a more readable html report that you can browse. Open the
>> target/site/findbugs.html file to browse the report.
>>
>> I hope this will encourage everyone to run FindBugs before committing
>> changes, and to continue to clean up the existing FindBugs errors.
>>
>> The current scheme uses an exclude file per module to exclude a very
>> small
>> number of errors reported by FindBugs. Do not modify these exclude files
>> yourself. Instead, send mail to Jagadesh and me with the details of why
>> you think your FindBugs error should be excluded. Expect the answer to
>> be "no". :-)
>>
>> Thanks.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
> Lloyd Chambers
> lloyd.chambers_at_sun.com
> GlassFish Team
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>