<?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>sonar | www.valeriofinazzo.it</title>
	<atom:link href="http://www.valeriofinazzo.it/wordpress/tag/sonar/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.valeriofinazzo.it/wordpress</link>
	<description>Il sito dell&#039;ingegnere Valerio Finazzo</description>
	<lastBuildDate>Tue, 17 Jun 2014 21:56:07 +0000</lastBuildDate>
	<language>it-IT</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.0.3</generator>
	<item>
		<title>MAVEN TUTORIAL &#8211; 8 &#8211; INTEGRARE SONAR</title>
		<link>http://www.valeriofinazzo.it/wordpress/2014/06/maven-tutorial-8-integrare-sonar/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 17 Jun 2014 21:41:23 +0000</pubDate>
				<category><![CDATA[MAVEN]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[sonar]]></category>
		<guid isPermaLink="false">http://www.valeriofinazzo.it/wordpress/?p=68</guid>

					<description><![CDATA[<p>Nell&#8217;articolo di oggi vedremo come integrare Sonar all&#8217;interno di Maven. Sonar è una piattaforma open per la gestione della qualità del codice. Esso analizza il codice del progetto ed estrae tutte le statistiche utili per migliorare il progetto. E&#8217; possibile installare sonar come server indipendente o come web application su un container Tomcat. Si appoggia ad &#8230; <a href="http://www.valeriofinazzo.it/wordpress/2014/06/maven-tutorial-8-integrare-sonar/" class="more-link">Continua la lettura di <span class="screen-reader-text">MAVEN TUTORIAL &#8211; 8 &#8211; INTEGRARE SONAR</span> <span class="meta-nav">&#8594;</span></a></p>
The post <a href="http://www.valeriofinazzo.it/wordpress/2014/06/maven-tutorial-8-integrare-sonar/">MAVEN TUTORIAL – 8 – INTEGRARE SONAR</a> first appeared on <a href="http://www.valeriofinazzo.it/wordpress">www.valeriofinazzo.it</a>.]]></description>
										<content:encoded><![CDATA[<p style="color: rgb(13, 41, 63); text-align: justify;">Nell&#8217;articolo di oggi vedremo come integrare Sonar all&#8217;interno di Maven. Sonar è una piattaforma open per la gestione della qualità del codice. Esso analizza il codice del progetto ed estrae tutte le statistiche utili per migliorare il progetto.</p>
<p style="color: rgb(13, 41, 63); text-align: justify;">E&#8217; possibile installare sonar come server indipendente o come web application su un container Tomcat. Si appoggia ad un database per le statistiche estratte. Presenta un database embedded Apache Derby, ma Sonar consiglia di appoggiarsi ad un database più robusto. Sonar supporta i seguenti database:</p>
<ul style="color: rgb(20, 60, 93); text-align: justify;">
<li><span style="color: #0d293f;">MySQL 5.1.x</span></li>
<li><span style="color: #0d293f;">Oracle 10g XE</span></li>
<li><span style="color: #0d293f;">PostgreSQL</span></li>
<li><span style="color: #0d293f;">MS SqlServer 2005</span></li>
</ul>
<p style="color: rgb(13, 41, 63); text-align: justify;">Per configurare un database diverso da Apache Derby occorre agire sul file di configurazione e agire sui parametri:</p>
<ul style="color: rgb(20, 60, 93); text-align: justify;">
<li>sonar.jdbc.url : URL del database</li>
<li>sonar.jdbc.driver : driver</li>
<li>sonar.jdbc.user : username (default &#8216;sonar&#8217;)</li>
<li>sonar.jdbc.password : password (default &#8216;sonar&#8217;)</li>
</ul>
<p style="color: rgb(13, 41, 63); text-align: justify;">Nel nostro caso installeremo sonar come web application su un tomcat. Scaricate la distribuzione zip, scompattatela e lanciate il bat presente nella directory war.</p>
<p style="color: rgb(13, 41, 63); text-align: justify;">Una volta creato il file .war fate il deploy sul vostro tomcat e accertatevi che il context sia attivo. Il war si preoccuperà di generare in automatico tutte le tabelle utili sul vostro database.</p>
<p style="color: rgb(13, 41, 63); text-align: justify;">A questo punto non resta che integrare il plugin nel nostro progetto maven. L&#8217;integrazione avviene in 3 step:</p>
<ul style="color: rgb(20, 60, 93); text-align: justify;">
<li><span style="color: #0d293f;">Inserire il puntamento al server nel file settings.xml di maven. Il file si trova sotto la conf di maven.</span></li>
</ul>
<p></p><pre class="crayon-plain-tag">&lt;profile&gt;
&lt;id&gt;sonar&lt;/id&gt;
&lt;activation&gt;
&lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
&lt;/activation&gt; 
&lt;properties&gt; 
&lt;sonar.host.url&gt;http://localhost:9000/sonar&lt;/sonar.host.url&gt; &lt;/properties&gt; 
&lt;/profile&gt;</pre><p></p>
<ul>
<li> Inserire il plugin nel pom file</li>
</ul>
<p></p><pre class="crayon-plain-tag">&lt;plugin&gt;
&lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
&lt;artifactId&gt;sonar-maven-plugin&lt;/artifactId&gt;
&lt;version&gt;1.0-beta-2&lt;/version&gt; &lt;-- da usare con maven 2.x
&lt;/plugin&gt;</pre><p></p>
<ul>
<li> infine lanciare la seguente direttiva</li>
</ul>
<p style="color: rgb(13, 41, 63); text-align: justify;">mvn sonar:sonar</p>
<p style="color: rgb(13, 41, 63); text-align: justify;">Dopo l&#8217;elaborazione della direttiva possiamo accedere alla dashboard di sonar e vedere i risultati</p>
<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fwww.valeriofinazzo.it%2Fwordpress%2F2014%2F06%2Fmaven-tutorial-8-integrare-sonar%2F&amp;linkname=MAVEN%20TUTORIAL%20%E2%80%93%208%20%E2%80%93%20INTEGRARE%20SONAR" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fwww.valeriofinazzo.it%2Fwordpress%2F2014%2F06%2Fmaven-tutorial-8-integrare-sonar%2F&amp;linkname=MAVEN%20TUTORIAL%20%E2%80%93%208%20%E2%80%93%20INTEGRARE%20SONAR" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fwww.valeriofinazzo.it%2Fwordpress%2F2014%2F06%2Fmaven-tutorial-8-integrare-sonar%2F&amp;linkname=MAVEN%20TUTORIAL%20%E2%80%93%208%20%E2%80%93%20INTEGRARE%20SONAR" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=http%3A%2F%2Fwww.valeriofinazzo.it%2Fwordpress%2F2014%2F06%2Fmaven-tutorial-8-integrare-sonar%2F&amp;linkname=MAVEN%20TUTORIAL%20%E2%80%93%208%20%E2%80%93%20INTEGRARE%20SONAR" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_google_gmail" href="https://www.addtoany.com/add_to/google_gmail?linkurl=http%3A%2F%2Fwww.valeriofinazzo.it%2Fwordpress%2F2014%2F06%2Fmaven-tutorial-8-integrare-sonar%2F&amp;linkname=MAVEN%20TUTORIAL%20%E2%80%93%208%20%E2%80%93%20INTEGRARE%20SONAR" title="Gmail" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=http%3A%2F%2Fwww.valeriofinazzo.it%2Fwordpress%2F2014%2F06%2Fmaven-tutorial-8-integrare-sonar%2F&#038;title=MAVEN%20TUTORIAL%20%E2%80%93%208%20%E2%80%93%20INTEGRARE%20SONAR" data-a2a-url="http://www.valeriofinazzo.it/wordpress/2014/06/maven-tutorial-8-integrare-sonar/" data-a2a-title="MAVEN TUTORIAL – 8 – INTEGRARE SONAR"></a></p>The post <a href="http://www.valeriofinazzo.it/wordpress/2014/06/maven-tutorial-8-integrare-sonar/">MAVEN TUTORIAL – 8 – INTEGRARE SONAR</a> first appeared on <a href="http://www.valeriofinazzo.it/wordpress">www.valeriofinazzo.it</a>.]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
