<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Michenux &#187; J2EE</title>
	<atom:link href="http://www.michenux.net/category/j2ee/feed" rel="self" type="application/rss+xml" />
	<link>http://www.michenux.net</link>
	<description></description>
	<lastBuildDate>Fri, 15 Apr 2011 12:02:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Maven Blame Plugin &#8211; Add developper info in checkstyle/pmd/findbugs reports</title>
		<link>http://www.michenux.net/maven-blame-plugin-add-developper-info-in-checkstyle-pmd-findbugs-reports-57.html</link>
		<comments>http://www.michenux.net/maven-blame-plugin-add-developper-info-in-checkstyle-pmd-findbugs-reports-57.html#comments</comments>
		<pubDate>Mon, 05 Jan 2009 14:31:42 +0000</pubDate>
		<dc:creator>Michenux</dc:creator>
				<category><![CDATA[J2EE]]></category>

		<guid isPermaLink="false">http://www.michenux.net/?p=57</guid>
		<description><![CDATA[Checkstyle/Pmd/Findbugs are good tools to test quality of your java code but you don&#8217;t know in your team who respects code standing rules and who does not. Maven Blame Plugin allows you to have that kind of informations. For each code rule violation, it queries your subversion repository to have the last commiter of the [...]]]></description>
			<content:encoded><![CDATA[<p>Checkstyle/Pmd/Findbugs are good tools to test quality of your java code but you don&#8217;t know in your team who respects code standing rules and who does not. Maven Blame Plugin allows you to have that kind of informations. For each code rule violation, it queries your subversion repository to have the last commiter of the corresponding line code.<br />
Maven Blame Plugin does 2 things :</p>
<ul>
<li>It updates the checkstyle/pmd/findbugs xml reports : it adds an attribute @author on each code vilolations. External tools can use this new attribute to improve their reports.</li>
<li>It generates a blame report with some global statistics about developpers.</li>
</ul>
<p>To use the maven blame plugin, you have to change the pom.xml of your project.<br />
First, declare the codehaus snapshot repository :</p>
<p><code>&lt;pluginRepositories&gt;<br />
&lt;pluginRepository&gt;<br />
&lt;id&gt;codehaus-snapshot&lt;/id&gt;<br />
&lt;name&gt;Snapshot codehaus repository&lt;/name&gt;<br />
&lt;url&gt;http://snapshots.repository.codehaus.org&lt;/url&gt;<br />
&lt;releases&gt;<br />
&lt;enabled&gt;false&lt;/enabled&gt;<br />
&lt;/releases&gt;<br />
&lt;snapshots&gt;<br />
&lt;enabled&gt;true&lt;/enabled&gt;<br />
&lt;/snapshots&gt;<br />
&lt;/pluginRepository&gt;<br />
&lt;/pluginRepositories&gt;</code></p>
<p>Then, add the different reports(checkstyle,pmd,findbugs) with at the end, the blame one :</p>
<p><code>&lt;reporting&gt;<br />
&lt;plugins&gt;<br />
&lt;plugin&gt;<br />
&lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;<br />
&lt;artifactId&gt;maven-checkstyle-plugin&lt;/artifactId&gt;<br />
&lt;/plugin&gt;<br />
&lt;plugin&gt;<br />
&lt;groupId&gt;org.codehaus.maven-blame-plugin&lt;/groupId&gt;<br />
&lt;artifactId&gt;maven-blame-plugin&lt;/artifactId&gt;<br />
&lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;<br />
&lt;configuration&gt;<br />
&lt;enableCheckstyle&gt;true&lt;/enableCheckstyle&gt;<br />
&lt;enablePmd&gt;false&lt;/enablePmd&gt;<br />
&lt;enableFindBugs&gt;false&lt;/enableFindBugs&gt;<br />
&lt;fullBlame&gt;true&lt;/fullBlame&gt;<br />
&lt;/configuration&gt;<br />
&lt;/plugin&gt;<br />
&lt;/plugins&gt;<br />
&lt;/reporting&gt;</code></p>
<p>Endly, launch the site generation :<br />
<code>mvn site</code></p>
<p>Maven Blame connects to your svn repository and it may need to authenticate. Authentication information can be indicated via maven properties : <strong>maven.scm.username</strong> and <strong>maven.scm.password</strong>.</p>
<p>For more informations :</p>
<p><a href="http://maven-blame-plugin.codehaus.org">Maven Blame Plugin Web Site</a><br />
<a href="http://maven-blame-plugin.codehaus.org/examples/blame-report.html">Example of blame report</a><br />
<a href="http://maven-blame-plugin.codehaus.org/examples/checkstyle-result.xml">Example of checkstyle report xml file</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.michenux.net/maven-blame-plugin-add-developper-info-in-checkstyle-pmd-findbugs-reports-57.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

