Dennis Lundberg wrote:
CodingPlayer wrote:
Hi all,
i currently investigate my time migrating my projects to Maven2.
But i still haven't found out how to get the findbugs plugin running.
From what i found out, after reading through several posts and google
searches, there seem to be 2 different plugIns (i tried them both):
there is one at codehaus:
http://mojo.codehaus.org/findbugs-maven-plugin/howto.html
http://mojo.codehaus.org/findbugs-maven-plugin/howto.html
<pluginRepositories>
<pluginRepository>
<id>codehaus-snapshot-plugins</id>
<name>codehaus-shapshot-plugins</name>
<url> http://snapshots.maven.codehaus.org/maven2/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
</plugin> </plugins>
</reporting>
the other one is at sourceforge:
http://maven-plugins.sourceforge.net/maven-findbugs-plugin/index.html
http://maven-plugins.sourceforge.net/maven-findbugs-plugin/index.html
<reporting>
<plugins>
<plugin>
<groupId>maven-plugins</groupId>
<artifactId>maven-findbugs-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
</plugin>
</plugins>
</reporting>
Now my questions:
- Which one of them is the correct one for Maven2? (correct groupId,
artifactId, version PLSSSSS)
The one at SF is for Maven 1 and the one at mojo is for Maven 2. You
should use this in your pom:
<project>
...
<reporting>
...
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
</plugin>
...
</reporting>
</project>
There has been no official release, not even a beta, of this plugin.
Therefor you need to add the snapshot repository at codehaus to be able
to download it. You can do this in your pom as well:
<project>
...
<repositories>
<repository>
<id>codehaus-snapshots</id>
<name>Codehaus snapshots</name>
<url>http://snapshots.maven.codehaus.org/maven2/</url>
</repository>
</repositories>
...
</project>
Sorry that should be:
<project>
...
<pluginRepositories>
<pluginRepository>
<id>codehaus-snapshots</id>
<name>Codehaus snapshots</name>
<url>http://snapshots.maven.codehaus.org/maven2/</url>
</pluginRepository>
</pluginRepositories>
...
</project>
--
Dennis Lundberg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]