Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Dashboard
Sonar
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Page Layout
No Layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard Shortcuts Help
<table class="wysiwyg-macro" data-macro-name="unmigrated-inline-wiki-markup" data-macro-parameters="atlassian-macro-output-type=BLOCK" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e3VubWlncmF0ZWQtaW5saW5lLXdpa2ktbWFya3VwOmF0bGFzc2lhbi1tYWNyby1vdXRwdXQtdHlwZT1CTE9DS30&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>{iframe:src=http://update.sonarsource.org/plugins/scmstats.html|width=700|height=250|frameborder=0} Your browser does not support iframes. {iframe}</pre></td></tr></table><h1>Upgrade from 0.1 to 0.2</h1><p>If you upgrade from 0,1 to 0.2 you'll need to run a new analysis to see the widgets of authors activity and commits per author.</p><h1>Description / Features</h1><p>The plugin computes and feeds Sonar with four (4) new metrics : Commits / Author, Commits / Clock Hour, Commits / Week Day and Commits / Month.<br />Five(5) project widgets ( under the SCM category ) display these metrics using graphical representations.</p><table class="wysiwyg-macro" data-macro-name="info" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2luZm99&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="RICH_TEXT"><tr><td class="wysiwyg-macro-body"><p>The "commits per author widget" displays only the top 10 authors ( list and pie chart )</p></td></tr></table><p> </p><p><img class="confluence-embedded-image" src="/download/attachments/230400668/scm-stats-commits-per-user.png?version=1&modificationDate=1368916072621" data-image-src="/download/attachments/230400668/scm-stats-commits-per-user.png?version=1&modificationDate=1368916072621" data-linked-resource-id="230564998" data-linked-resource-type="attachment" data-linked-resource-default-alias="scm-stats-commits-per-user.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="230400668" title="null > scm-stats-commits-per-user.png"></p><p>The "Author activity" widget (available since version 0.2) displays a stacked 3D bar chart about top 10 authors activities types : New files(green), modifications(blue) , deletions(red)</p><p><img class="confluence-embedded-image confluence-external-resource" src="https://dl.dropbox.com/u/16516393/authors_activity.png" data-image-src="https://dl.dropbox.com/u/16516393/authors_activity.png"> </p><p>The other three widgets display in a bar chart the number of commits / clock hour, week day or month.</p><p><img class="confluence-embedded-image" src="/download/attachments/230400668/scm-stats-commits-clockhour.png?version=1&modificationDate=1368916072631" data-image-src="/download/attachments/230400668/scm-stats-commits-clockhour.png?version=1&modificationDate=1368916072631" data-linked-resource-id="230564999" data-linked-resource-type="attachment" data-linked-resource-default-alias="scm-stats-commits-clockhour.png" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="230400668" title="null > scm-stats-commits-clockhour.png"></p><table class="wysiwyg-macro" data-macro-name="tip" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e3RpcH0&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="RICH_TEXT"><tr><td class="wysiwyg-macro-body"><p>The plugin also adds a project dashboard under the name SCM Stats that contains all four widgets.</p></td></tr></table><h1>Usage, Installation and Configuration</h1><ol><li>Install the SCM Stats plugin through the <a href="http://docs.codehaus.org/display/SONAR/Update+Center">Update Center</a> or download it into the SONAR_HOME/extensions/plugins directory</li><li>If you plan to use this plugin with non-maven projects, or SCM access is available only with username/password or no SCM information is included in project's pom.xml you have to also install the <a class="confluence-link" href="/display/SONAR/SCM+Activity+Plugin" data-linked-resource-id="137199861" data-linked-resource-type="page" data-linked-resource-default-alias="SCM Activity Plugin" data-base-url="http://docs.codehaus.org">SCM Activity plugin</a> </li><li>Restart the Sonar server</li><li><p>Set the SCM URL of your project (see <a class="external-link" href="http://maven.apache.org/scm/scm-url-format.html" rel="nofollow">SCM URL Format</a>) by setting the sonar.scm.url property of <a class="confluence-link" href="/display/SONAR/SCM+Activity+Plugin" data-linked-resource-id="137199861" data-linked-resource-type="page" data-linked-resource-default-alias="SCM Activity Plugin" data-base-url="http://docs.codehaus.org">SCM Activity plugin</a>. For Maven projects this is automatically discovered if it's already set in pom.xml</p></li><li>Set the SCM user / password (if needed) by setting the sonarc.scm.user.secured and sonar.scm.password.secured properties of <a class="confluence-link" href="/display/SONAR/SCM+Activity+Plugin" data-linked-resource-id="137199861" data-linked-resource-type="page" data-linked-resource-default-alias="SCM Activity Plugin" data-base-url="http://docs.codehaus.org">SCM Activity plugin</a></li><li><p>Launch a new quality analysis and the metrics will be fed</p><table class="wysiwyg-macro" data-macro-name="warning" data-macro-parameters="title=Important notice" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e3dhcm5pbmc6dGl0bGU9SW1wb3J0YW50IG5vdGljZX0&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="RICH_TEXT"><tr><td class="wysiwyg-macro-body"><div>The <strong>sonar.scm.user.secured</strong> and <strong>sonar.scm.password.secured</strong> properties end with <em>secured </em>which means that we need to authenticate the analyzer to use them. So you have two possible solutions.</div><div>A: If you've set these properties at project or global settings then use/set the <strong>sonar.login</strong> and <strong>sonar.password</strong> properties in your analyzer to authenticate it.</div><div>B: You can set <span><strong>sonar.scm.user.secured</strong> and <strong>sonar.scm.password.secured</strong> properties directly in your analyzer wihtout specifying the </span><span> </span><span>sonar.login and sonar.password properties.</span></div><div><span><br /></span></div><div><span>For example if you use maven then in case A (scm properties set in project/global settings) the maven cmd could be like this </span></div><div><table class="wysiwyg-macro" data-macro-name="noformat" data-macro-parameters="nopanel=true" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e25vZm9ybWF0Om5vcGFuZWw9dHJ1ZX0&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>mvn sonar:sonar -Dsonar.login=admin -Dsonar.password=admin </pre></td></tr></table><p><span style="font-size: 10.0pt;line-height: 13.0pt;">and in case B (scm properties set directly to analyzer) like this </span></p></div><div><table class="wysiwyg-macro" data-macro-name="noformat" data-macro-parameters="nopanel=true" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e25vZm9ybWF0Om5vcGFuZWw9dHJ1ZX0&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre>mvn sonar:sonar -Dsonar.scm.user.secured=<SCM_USER> -Dsonar.scm.passoword.secured=<SCM_PWD></pre></td></tr></table></div></td></tr></table></li></ol><h3>Grabbing stats for multiple periods</h3><p><span style="color: rgb(0,0,0);">Since 0.2 the plugin allows the collection of SCM stats for multiple (1-3) periods. By default the plugin collects stats for the whole history ( <em>sonar.scm-stats.period1</em> = 0 days ).</span><br /><span style="font-size: 10.0pt;line-height: 13.0pt;color: rgb(0,0,0);">You can have different periods on a global or project level by setting the number of days prior to the current date that the plugin will collect scm stats.</span></p><p><span style="font-size: 10.0pt;line-height: 13.0pt;color: rgb(0,0,0);">For example to collect scm stats for the last month, enter a value of 30, for the last week a value of 7 etc.</span></p><p><span style="font-size: 10.0pt;line-height: 13.0pt;color: rgb(0,0,0);">The properties for period 2 ( <em>sonar.scm-stats.period2 </em>) and period 3 ( <em>sonar.scm-stats.period3 </em>) can have the value of zero(0) but the plugin will ignore it. In other words, whole history stats, will be collected only if <em>sonar.scm-stats.period1 </em>property is set to zero(0). Negative values are ignored for all periods.</span></p><p><span style="font-size: 10.0pt;line-height: 13.0pt;color: rgb(0,0,0);">You can edit widget properties by setting the period number (acceptable value are 1-3). By default each widget shows stats for period 1</span></p><p><span style="font-size: 10.0pt;line-height: 13.0pt;color: rgb(0,0,0);"><img class="confluence-embedded-image confluence-external-resource" src="https://dl.dropbox.com/u/16516393/widget_set_period.png" data-image-src="https://dl.dropbox.com/u/16516393/widget_set_period.png"><br /></span></p><h1>Compatibility Matrix</h1><table class="confluenceTable"><tbody><tr><th class="confluenceTh"><p>Plugin version</p></th><th colspan="1" class="confluenceTh">0.1</th><th colspan="1" class="confluenceTh"><span style="color: rgb(0,0,0);">0.2</span></th></tr><tr><td colspan="1" class="confluenceTd"><strong><span style="color: rgb(0,51,102);">Source Control</span></strong></td><td colspan="1" class="confluenceTd"> </td><td colspan="1" class="confluenceTd"> </td></tr><tr><td class="confluenceTd"><p><strong><a href="http://subversion.tigris.org/">Subversion</a></strong></p></td><td colspan="1" class="confluenceTd"><p><img class="emoticon emoticon-tick" data-emoticon-name="tick" border="0" src="/s/en_GB/3278/15/_/images/icons/emoticons/check.png" alt="(tick)" title="(tick)" /></p></td><td colspan="1" class="confluenceTd"><img class="emoticon emoticon-tick" data-emoticon-name="tick" border="0" src="/s/en_GB/3278/15/_/images/icons/emoticons/check.png" alt="(tick)" title="(tick)" /></td></tr><tr><td colspan="1" class="confluenceTd"><strong><a href="http://git-scm.com/">Git</a></strong></td><td colspan="1" class="confluenceTd"><img class="emoticon emoticon-tick" data-emoticon-name="tick" border="0" src="/s/en_GB/3278/15/_/images/icons/emoticons/check.png" alt="(tick)" title="(tick)" /></td><td colspan="1" class="confluenceTd"><img class="emoticon emoticon-tick" data-emoticon-name="tick" border="0" src="/s/en_GB/3278/15/_/images/icons/emoticons/check.png" alt="(tick)" title="(tick)" /></td></tr><tr><td colspan="1" class="confluenceTd"><strong><a href="http://mercurial.selenic.com/">Mercurial</a></strong></td><td colspan="1" class="confluenceTd"><img class="emoticon emoticon-cross" data-emoticon-name="cross" border="0" src="/s/en_GB/3278/15/_/images/icons/emoticons/error.png" alt="(error)" title="(error)" /></td><td colspan="1" class="confluenceTd"><img class="emoticon emoticon-tick" data-emoticon-name="tick" border="0" src="/s/en_GB/3278/15/_/images/icons/emoticons/check.png" alt="(tick)" title="(tick)" /></td></tr><tr><td colspan="1" class="confluenceTd"><strong><a href="http://cvs.nongnu.org/">CVS</a></strong></td><td colspan="1" class="confluenceTd"><img class="emoticon emoticon-cross" data-emoticon-name="cross" border="0" src="/s/en_GB/3278/15/_/images/icons/emoticons/error.png" alt="(error)" title="(error)" /></td><td colspan="1" class="confluenceTd"><img class="emoticon emoticon-tick" data-emoticon-name="tick" border="0" src="/s/en_GB/3278/15/_/images/icons/emoticons/check.png" alt="(tick)" title="(tick)" /></td></tr></tbody></table><h1>Metrics Definitions</h1><table class="confluenceTable"><tbody><tr><th class="confluenceTh"><p>Name</p></th><th class="confluenceTh"><p>Key</p></th><th colspan="1" class="confluenceTh"><span style="color: rgb(0,51,102);">Qualitative</span></th><th class="confluenceTh"><p>Description</p></th></tr><tr><td class="confluenceTd"><p><strong>Commits Per Author</strong></p></td><td class="confluenceTd"><p>scm-commits-per-user</p></td><td colspan="1" class="confluenceTd">no</td><td class="confluenceTd"><p>Reports on the number of commits per author.</p></td></tr><tr><td class="confluenceTd"><p><strong>Commits Per Clock Hour</strong></p></td><td class="confluenceTd"><p>scm-commits-per-clockhour</p></td><td colspan="1" class="confluenceTd">no</td><td class="confluenceTd"><p>Reports on the number of commits per clock hour.</p></td></tr><tr><td colspan="1" class="confluenceTd"><strong>Commits Per Week Day</strong></td><td colspan="1" class="confluenceTd"><span>scm-commits-per-weekday</span></td><td colspan="1" class="confluenceTd">no</td><td colspan="1" class="confluenceTd"><span>Reports on the number of commits per week day.</span></td></tr><tr><td colspan="1" class="confluenceTd"><strong>Commits Per Month</strong></td><td colspan="1" class="confluenceTd"><span>scm-commits-per-month</span></td><td colspan="1" class="confluenceTd">no</td><td colspan="1" class="confluenceTd"><span>Reports on the number of commits per month.</span></td></tr></tbody></table><h1>Future Work (Open Issues)</h1><p>Plenty !!! Waiting for your ideas as well!<br /><img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e2ppcmFpc3N1ZXM6YW5vbnltb3VzPXRydWV8dGl0bGU9T3BlbiBJc3N1ZXN8cmVuZGVyTW9kZT1zdGF0aWN8d2lkdGg9OTAwfGNvbHVtbnM9dHlwZTtrZXk7c3VtbWFyeTtwcmlvcml0eXx1cmw9aHR0cDovL2ppcmEuY29kZWhhdXMub3JnL3NyL2ppcmEuaXNzdWV2aWV3czpzZWFyY2hyZXF1ZXN0LXhtbC90ZW1wL1NlYXJjaFJlcXVlc3QueG1sP2pxbFF1ZXJ5PXByb2plY3QrJTNEK1NPTkFSUExVR0lOUytBTkQrY29tcG9uZW50KyUzRCsiU0NNK1N0YXRzIitBTkQrc3RhdHVzKyUzRCtPcGVuK09SREVSK0JZK3ByaW9yaXR5K0RFU0MmdGVtcE1heD0xMDAwfQ&locale=en_GB&version=2" data-macro-name="jiraissues" data-macro-parameters="anonymous=true|columns=type;key;summary;priority|renderMode=static|title=Open Issues|url=http://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery\=project+%3D+SONARPLUGINS+AND+component+%3D+"SCM+Stats"+AND+status+%3D+Open+ORDER+BY+priority+DESC&tempMax\=1000|width=900"> </p><h1>Change Log</h1><p><img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e2ppcmFpc3N1ZXM6YW5vbnltb3VzPXRydWV8dGl0bGU9UmVsZWFzZSAwLjJ8cmVuZGVyTW9kZT1zdGF0aWN8d2lkdGg9OTAwfGNvbHVtbnM9dHlwZTtrZXk7c3VtbWFyeTtwcmlvcml0eXx1cmw9aHR0cDovL2ppcmEuY29kZWhhdXMub3JnL3NyL2ppcmEuaXNzdWV2aWV3czpzZWFyY2hyZXF1ZXN0LXhtbC90ZW1wL1NlYXJjaFJlcXVlc3QueG1sP2ZpeGZvcj0xODg0NyZwaWQ9MTE5MTEmc29ydGVyL2ZpZWxkPXByaW9yaXR5JnNvcnRlci9vcmRlcj1ERVNDJnRlbXBNYXg9MTAwMH0&locale=en_GB&version=2" data-macro-name="jiraissues" data-macro-parameters="anonymous=true|columns=type;key;summary;priority|renderMode=static|title=Release 0.2|url=http://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor\=18847&pid\=11911&sorter/field\=priority&sorter/order\=DESC&tempMax\=1000|width=900"></p><p><img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e2ppcmFpc3N1ZXM6YW5vbnltb3VzPXRydWV8dGl0bGU9UmVsZWFzZSAwLjF8cmVuZGVyTW9kZT1zdGF0aWN8d2lkdGg9OTAwfGNvbHVtbnM9dHlwZTtrZXk7c3VtbWFyeTtwcmlvcml0eXx1cmw9aHR0cDovL2ppcmEuY29kZWhhdXMub3JnL3NyL2ppcmEuaXNzdWV2aWV3czpzZWFyY2hyZXF1ZXN0LXhtbC90ZW1wL1NlYXJjaFJlcXVlc3QueG1sP2ZpeGZvcj0xODc3NCZwaWQ9MTE5MTEmc29ydGVyL2ZpZWxkPXByaW9yaXR5JnNvcnRlci9vcmRlcj1ERVNDJnRlbXBNYXg9MTAwMH0&locale=en_GB&version=2" data-macro-name="jiraissues" data-macro-parameters="anonymous=true|columns=type;key;summary;priority|renderMode=static|title=Release 0.1|url=http://jira.codehaus.org/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?fixfor\=18774&pid\=11911&sorter/field\=priority&sorter/order\=DESC&tempMax\=1000|width=900"></p>
Please type the word appearing in the picture.
Attachments
Labels
Location
Watch this page
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced