dev@glassfish.java.net

Re: findbugs-maven-plugin

From: Sahoo <Sahoo_at_Sun.COM>
Date: Tue, 03 Feb 2009 14:19:33 +0530

Yes, findbugs team should push their latest binaries to default m2
repo, which currently hosts upto version 1.3.2 only [1]. Even if it had
the latest version (1.3.7), the way this plugin is written, it would not
use it. I don't know if there is any good reason for the plugin to be
tightly bound to a particular version of findbugs. What I see a common
practice in maven world is that most plugins do not expect user to have
their own copy of software and and let user configure the plugins to use
their software installation. Instead, the plugins typically pull in the
version of software that the plugins are hardcoded to depend on at the
time of their release.

[1] http://repo1.maven.org/maven2/net/sourceforge/findbugs/findbugs/

Bill Shannon wrote:
> Thanks for the tip, I'll try that.
>
> I guess we need the FindBugs team to release FindBugs directly to a
> maven repository so that the plugin can just always get the latest
> version? Is the interface between the plugin and FindBugs itself
> changing so often that the plugin needs to be updated with every
> new version of FindBugs?
>
>
> Sahoo wrote:
>> Bill,
>>
>> I don't see any way of doing it other than upgrading the plugin
>> itself. Looking at the change log [1] of the plugin, I don't see any
>> release of the plugin that supports findbugs version > 1.2.1 yet. [2]
>> suggests findbugs-maven-plugin version 1.2.0, which is the last
>> released version of the plugin, uses findbugs version 1.2.1, which is
>> what you mentioned in your email as well. [3] suggests 2.0, which is
>> the next major release of the plugin, will use findbugs 1.3.7. There
>> is a SNAPSHOT binary available. Do you have issues in depending on
>> *2.0-SNAPSHOT* version of the plugin in the meanwhile? Since the
>> SNAPSHOT plugin is *not* available in default maven repo, you have to
>> add the codehaus SNAPSHOT repository as a plugin repository either in
>> your ~/.m2/settings.xml or in your pom.xml in addition to changing
>> the version from 1.2 to 2.0-SNAPSHOT in the <plugin> section in your
>> pom.xml. Here is how you can add the required repository in your
>> pom.xml:
>>
>> //pom.xml
>> <project ...>
>> <pluginRepositories>
>> <!-- This has been added to use the SNAPSHOT version of findbugs
>> plugin-->
>> <pluginRepository>
>> <id>codehaus-snapshot-repository</id>
>> <url>http://snapshots.repository.codehaus.org/</url>
>> <snapshots>
>> <updatePolicy>daily</updatePolicy>
>> </snapshots>
>> </pluginRepository>
>> </pluginRepositories>
>>
>> If you have multiple projects, then you can add it in
>> ~/.m2/settings.xml.
>>
>> Hope this helps,
>>
>> Thanks,
>> Sahoo
>>
>> [1] http://mojo.codehaus.org/findbugs-maven-plugin/changes-report.html
>> [2]
>> http://mojo.codehaus.org/findbugs-maven-plugin/changes-report.html#a1.2.0
>>
>> [3] http://jira.codehaus.org/browse/MFINDBUGS-66
>>
>> Bill Shannon wrote:
>>> Anyone know how to get the findbugs-maven-plugin to use the latest
>>> version of FindBugs? Mine seems to be stuck at 1.2.1.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>