<?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>Sonatype Blog &#187; Maven</title>
	<atom:link href="http://www.sonatype.com/people/tag/maven/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sonatype.com/people</link>
	<description>Sonatype is transforming software development with tools, information and services that enable organizations to build better software, faster, using open-source components.</description>
	<lastBuildDate>Wed, 23 May 2012 14:24:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Ken Rimple Interviews Brian Fox: Maven 3, Running Central, and Nexus</title>
		<link>http://www.sonatype.com/people/2012/03/ken-rimple-interviews-brian-fox-maven-3-running-central-and-nexus/</link>
		<comments>http://www.sonatype.com/people/2012/03/ken-rimple-interviews-brian-fox-maven-3-running-central-and-nexus/#comments</comments>
		<pubDate>Thu, 22 Mar 2012 16:44:03 +0000</pubDate>
		<dc:creator>Tim O'Brien</dc:creator>
				<category><![CDATA[Nexus]]></category>
		<category><![CDATA[Sonatype]]></category>
		<category><![CDATA[chariot solutions]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[repository management]]></category>
		<category><![CDATA[The Central Repository]]></category>

		<guid isPermaLink="false">http://www.sonatype.com/people/?p=10511</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2012/03/ken-rimple-interviews-brian-fox-maven-3-running-central-and-nexus/' addthis:title='Ken Rimple Interviews Brian Fox: Maven 3, Running Central, and Nexus '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>Brian Fox sat down with Ken Rimple of Chariot Solutions to talk about Nexus and to put repository management in the context of recent developments with Maven. Ken Rimple and Chariot have been long-term partners with Sonatype supporting our Maven training efforts, so Ken has a lot of background about Maven to ask some interesting [...]]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2012/03/ken-rimple-interviews-brian-fox-maven-3-running-central-and-nexus/' addthis:title='Ken Rimple Interviews Brian Fox: Maven 3, Running Central, and Nexus '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p><a href="http://www.sonatype.com/people/wp-content/uploads/2012/03/ps.gohengbg.170x170-75.jpg"><img class="alignright size-full wp-image-10512" title="ps.gohengbg.170x170-75" src="http://www.sonatype.com/people/wp-content/uploads/2012/03/ps.gohengbg.170x170-75.jpg" alt="" width="170" height="170" /></a></p>

<p>Brian Fox sat down with Ken Rimple of Chariot Solutions to talk about Nexus and to put repository management in the context of recent developments with Maven.   Ken Rimple and Chariot have been long-term partners with Sonatype supporting our Maven training efforts, so Ken has a lot of background about Maven to ask some interesting questions.</p>

<p><strong><a href="http://techcast.chariotsolutions.com/webpage/chariot-tech-cast-episode-71-brian-fox-of-sonatype-on-nexus-2-">Listen to Chariot TechCast, Episode #71, Brian Fox of Sonatype on Nexus 2</a> </strong></p>

<h3>The Legacy of Maven: Binary Reusability</h3>

<p>The interview leads off with a discussion about Maven, Maven&#8217;s history, and some of the recent developments surrounding the Maven ecosystem.   Brian identifies binary reusability and declarative builds as the two important legacies of Maven:</p>

<blockquote style="margin: 20px; font-size: 90%;">&#8220;One of the unique things that Maven brought to the table, and what may in fact be the legacy for Maven years down the road, is that it introduced the concept of having binary reusability and not rebuilding the world as everybody was used to doing.   The other aspect was making things more of a declarative model especially the dependencies.  That was all unique at the time.&#8221;</blockquote>

<h3>What it takes to Run Central?</h3>

<p>Ken and Brian discuss the introduction and development of Central from the beginning of the repository to the current iteration.   From the initial efforts to create a single coordinate system for artifacts in 2001 and 2002.    Brian&#8217;s very involved in the effort to maintain Central so this is your chance to hear Brian discuss some of the internals of the effort: how much bandwidth does Central consume? how much effort is involved in maintaining Central? and what are the day-to-day operations for running Central?</p>

<p><strong>Key quotes about Central: &#8220;We&#8217;re approaching half a Terabyte for artifact storage&#8221; and &#8220;We&#8217;re seeing 50 to 60 new projects added every day&#8221;.</strong></p>

<p>You will hear about how Nexus is used to enforce standards for artifacts added to Central from forges like Apache, JBoss, java.net, Codehaus, as well as the instance of Nexus that Sonatype provides for independent projects: <a href="http://oss.sonatype.org">http://oss.sonatype.org</a>.</p>

<h3>New Features in Nexus 2.0</h3>

<p>Brian then discusses the important features we&#8217;re introducing with <a href="http://www.sonatype.com/nexus">Nexus 2.0</a>.  Including support for .NET, the Repository Health Check, and our support for distributed proxies.</p>

<p>Again, if you haven&#8217;t listened to it, you should.   Go over to Chariot Solutions and listen to <a href="http://techcast.chariotsolutions.com/webpage/chariot-tech-cast-episode-71-brian-fox-of-sonatype-on-nexus-2-">Chariot Techcast Episode #71</a> &#8211; better yet, why don&#8217;t you just <a href="http://itunes.apple.com/us/podcast/chariot-tech-cast/id276488929">open up iTunes and subscribe to Chariot&#8217;s podcast? here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sonatype.com/people/2012/03/ken-rimple-interviews-brian-fox-maven-3-running-central-and-nexus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What do cartoons have to do with build systems?</title>
		<link>http://www.sonatype.com/people/2012/02/what-do-cartoons-have-to-do-with-build-systems/</link>
		<comments>http://www.sonatype.com/people/2012/02/what-do-cartoons-have-to-do-with-build-systems/#comments</comments>
		<pubDate>Thu, 23 Feb 2012 14:00:38 +0000</pubDate>
		<dc:creator>Tim O'Brien</dc:creator>
				<category><![CDATA[Maven]]></category>
		<category><![CDATA[Nexus]]></category>
		<category><![CDATA[Sonatype]]></category>
		<category><![CDATA[build]]></category>

		<guid isPermaLink="false">http://www.sonatype.com/people/?p=9972</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2012/02/what-do-cartoons-have-to-do-with-build-systems/' addthis:title='What do cartoons have to do with build systems? '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>You know who this guy is? Probably not, he&#8217;s Rube Goldberg. I&#8217;m surprised by how few engineers know his work. Rube Goldberg was a cartoonist who lived from 1883-1970, he&#8217;s famous for drawing cartoons of ridiculous and inconceivably complex machines. His work was important during a time in which the world was becoming increasingly mechanized [...]]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2012/02/what-do-cartoons-have-to-do-with-build-systems/' addthis:title='What do cartoons have to do with build systems? '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p><img src="http://www.sonatype.com/people/wp-content/uploads/2012/02/Rube_Goldberg_1928.png" alt="" title="Rube_Goldberg_1928" width="173" height="300" class="alignright size-full wp-image-9979" style="margin:5px;" /></p>

<p>You know who this guy is?  Probably not, he&#8217;s <a href="http://www.rubegoldberg.com/?page=home">Rube Goldberg</a>.</p>

<p>I&#8217;m surprised by how few engineers know his work.   <a href="http://www.rubegoldberg.com/?page=bio">Rube Goldberg was a cartoonist</a> who lived from 1883-1970, he&#8217;s famous for drawing cartoons of ridiculous and inconceivably complex machines.    His work was important during a time in which the world was becoming increasingly mechanized and automated providing a sort of cultural &#8220;steam vent&#8221; &#8211; a way for people to poke fun at machines and industry.  I&#8217;d embed his work here, but none of it is public domain, so <a href="http://www.rubegoldberg.com/?page=home">see for yourself</a> or <a href="https://www.google.com/search?q=Rube+Goldberg&#038;hl=en&#038;prmd=imvnso&#038;tbm=isch&#038;tbo=u&#038;source=univ&#038;sa=X&#038;ei=g3hBT6H1BsmCgAfo3pSzBg&#038;ved=0CGoQsAQ&#038;biw=1397&#038;bih=1058">search Google Images</a>.   (Be warned, you can spend hours looking at these cartoons.) </p>

<p>I learned about Rube Goldberg from an Engineering professor who, at the time, said, &#8220;Rube Goldberg is the most important thing you&#8217;ll learn over the next four years&#8221;.   Back then, we all thought he was joking, but it turns out that he wasn&#8217;t.  In fact, I wish more people, especially &#8220;build engineers&#8221; had some exposure to these cartoons.  If they had, they&#8217;d take a step back and realize that there has to be a better way.</p>

<p><span id="more-9972"></span></p>

<h2>&#8220;accomplishing by complex means what seemingly could be done simply&#8221;</h2>

<p>The title of this section is the Webster&#8217;s New Dictionary&#8217;s <a href="http://www.merriam-webster.com/dictionary/rube%20goldberg">definition of &#8220;Rube Goldberg&#8221;</a>.  Does this describe your internal software distribution process?  I fear it might. I&#8217;ve seen some builds and deployment procedures that convince me that people are actively trying to create new Rube Goldberg machines with SCM tools and build scripts.  Almost every month I see some new variation of what I eventually characterize as a &#8220;Crazy Rube Goldberg&#8221; approach to releasing software.  Systems that barely work, and that no one dares to change for fear of breaking some crazy contraption.</p>

<p>Goldberg&#8217;s cartoons and the build&#8217;s inspired by them share common characteristics.    The complexity of his cartoons are almost always defined by the complex ways in which some object is transported from one &#8220;stage&#8221; of the cartoon to the next and the comic &#8220;indirection&#8221; involved in every process.</p>

<p>A cartoon example, a man slips and falls, stepping on a switch which then activates a mechanical hand that throws a bag of sand on to a scale which then triggers a mechanism to fire an arrow at a balloon.   A build example, Jeff runs a build on his laptop because that&#8217;s the only place release builds work properly, he then checks the WAR into Subversion and then sends a series of emails to several other people.  A deployment engineer then takes the output of Jeff&#8217;s build and runs it through a custom, somewhat confusing Perl script to customize a series of configuration variables.</p>

<h2>Common Characteristics</h2>

<p>The common characteristics between Rube Goldberg cartoons and Rube Goldberg builds are:</p>

<ul>
   <li>
     <p><b>Unnecessary Indirection</b></p>
     <ul>
        <li><b>Cartoon:</b> Instead of just creating a machine to pop a balloon, a cartoon creates a contrived process that involves unnecessary (and often impractical) indirection involving pulleys.  Goldberg&#8217;s cartons often find inventive ways to convert potential energy to kinetic energy in some fantastic way you wouldn&#8217;t have thought of.</li>
        <li><b>Awful Build:</b> Instead of using a technology to keep track of binary artifacts, a Rube Goldberg build overloads SCM or (worse) email to send multimegabyte binaries around.  Instead of using a technology with built in support for automatic email notification, your build relies on some ad-hoc system of people remember to send just the right individuals a set of process-related emails.</li>
      </ul>
    </li>   
    <li>
      <p><b>Reliance on the Unlikely</b></p>
      <ul>
        <li><b>Cartoon:</b> A bag of sand thrown across a room lands exactly on a bulls eye of a target triggering yet another unlikely series of events, continue, repeat&#8230;</li>
        <li><b>Awful Build:</b> A complex build that takes more than an hour to complete has a random dependency on a web service that provides an series of configuration variables used to configure a binary for production.   If the web service happens to be unavailable, or if it returns invalid results, the entire build process must be started from scratch.</li>
      </ul>
    </li>
    <li>
      <p><b>Reliance on Animals (or Humans)</b></p>
      <ul>
        <li><b>Cartoon:</b> One of the comic elements almost always present in a Goldberg cartoon is the presence of an animal of some sort.  A bird who, when hit with an arrow squawks loud enough to scare a dog into running and subsequently lifting a weight via a pulley system.</li>
        <li><b>Awful Build:</b> Awful build systems frequently require direct human intervention to the point where the build doesn&#8217;t work unless the same individual is always &#8220;strapped&#8221; into the build in just the right way.   &#8220;After that compilation step completes, Jack usually logs in and modifies the build number before he runs the deployment script&#8221;.</li>
      </ul>
   </li>
   <li>
     <p><b>Comedy</b></p>
     <ul>
        <li><b>Cartoons:</b> Rube Goldberg&#8217;s cartoons are comedic because they involve the impractical or the impossible.   Readers find them amusing because they are plausible, yet inadvisable ways to implement a process.
        <li><b>Rube Goldberg-style builds</b> are comedic because they involve the impractical or the impossible.  Developers find them amusing because they are plausible, yet inadvisable ways to implement  a process.</li>
      </ul>
    </li>
 </ul>

<p></tr><br />
</table></p>

<h2>Build/Deploy systems are Comedy?</h2>

<p>If they work, they can be.    It&#8217;s quite common for the build/deploy lifecycle at a corporation to involve a series of steps that no one fully comprehends.   Maybe there&#8217;s a crazy 4000 line Ant script or maybe there&#8217;s a multi-headed Hydra of bash magic that happens to produce a working system.   In the last few months I&#8217;ve talked to people with build systems that work, but no one on staff understands how.  When you ask about these release procedures people often chuckle a bit &#8211; &#8220;Oh, right, our release process&#8230;. well let&#8217;s say it&#8217;s a little confusing&#8230;&#8221;. </p>

<p>&#8220;Why does the build do it like this?&#8221; is often met by, &#8220;I don&#8217;t know, but I&#8217;m too scared to change this thing right now, the contractor left us with this and it works&#8230; for now.&#8221;   In other words, many of these builds involve a series of unknown pulleys and unexpected indirections that resemble a cartoon.</p>

<p>In the next part of this series, we&#8217;re going to talk about how Nexus can be used to untangle a build into something more reasonable.   Something that doesn&#8217;t involve pulleys, magic, and a series of unlikely events.</p>

<p style="font-size: 85%;"><b>Note:</b> Rube Goldberg doesn&#8217;t do it for you?  Then just watch the <a href="http://www.youtube.com/watch?v=qybUFnY7Y8w">OK Go video &#8220;This Too Shall Pass&#8221;</a> to get a modern idea of what I&#8217;m talking about.   If you haven&#8217;t seen that, you should.   In fact, if you haven&#8217;t seen this video yet, stop reading our boring Nexus blog and take a break, it&#8217;s worth it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sonatype.com/people/2012/02/what-do-cartoons-have-to-do-with-build-systems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Video: Multi-master configuration for Nexus</title>
		<link>http://www.sonatype.com/people/2011/07/video-multi-master-configuration-for-nexus/</link>
		<comments>http://www.sonatype.com/people/2011/07/video-multi-master-configuration-for-nexus/#comments</comments>
		<pubDate>Tue, 05 Jul 2011 13:00:09 +0000</pubDate>
		<dc:creator>hloney</dc:creator>
				<category><![CDATA[Maven]]></category>
		<category><![CDATA[Nexus]]></category>
		<category><![CDATA[GetSatisfaction.com]]></category>
		<category><![CDATA[Nexus OSS]]></category>

		<guid isPermaLink="false">http://www.sonatype.com/people/?p=8416</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2011/07/video-multi-master-configuration-for-nexus/' addthis:title='Video: Multi-master configuration for Nexus '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>Some questions about syncing Maven repositories between two sites were recently asked on GetSatisfaction.com. &#8220;We will be moving data centers and want to setup another Maven2 repo that is managed with Nexus OSS. We want both repositories to be online and read\writeable until we migrate all our environments to the new site. I have a [...]]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2011/07/video-multi-master-configuration-for-nexus/' addthis:title='Video: Multi-master configuration for Nexus '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p>Some questions about syncing Maven repositories between two sites were recently asked on <a href="http://getsatisfaction.com/sonatype/topics/options_for_syncing_maven2_repo_between_two_sites" target="_blank">GetSatisfaction.com</a>.</p>

<blockquote><em>&#8220;We will be moving data centers and want to setup another Maven2 repo  that is managed with Nexus OSS. We want both repositories to be online  and read\writeable until we migrate all our environments to the new  site. I have a few questions:</em>
<ol>
    <li><em>What is the best method for copying the repo to the new location?</em></li>
    <li><em>What is the best method for keeping the two repos in sync? We want to minimize network bandwidth usage.&#8221;</em></li>
</ol>
</blockquote>

<p><strong>The video below answers these questions, and offers multiple solutions:</strong></p>

<p><object width="600" height="371"><param name="movie" value="http://www.youtube.com/v/T0buDLODq0g?version=3&amp;hl=en_US&amp;rel=0" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><embed type="application/x-shockwave-flash" width="600" height="371" src="http://www.youtube.com/v/T0buDLODq0g?version=3&amp;hl=en_US&amp;rel=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sonatype.com/people/2011/07/video-multi-master-configuration-for-nexus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Next Webinar: Improving Your Java development with Apache Maven 3 and Hudson</title>
		<link>http://www.sonatype.com/people/2011/06/next-webinar-improving-your-java-development-with-apache-maven-3-and-hudson/</link>
		<comments>http://www.sonatype.com/people/2011/06/next-webinar-improving-your-java-development-with-apache-maven-3-and-hudson/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 23:38:44 +0000</pubDate>
		<dc:creator>Emily Blades</dc:creator>
				<category><![CDATA[Webinar]]></category>
		<category><![CDATA[Hudson]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[Sonatype webinar]]></category>
		<category><![CDATA[webinar]]></category>

		<guid isPermaLink="false">http://www.sonatype.com/people/?p=8285</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2011/06/next-webinar-improving-your-java-development-with-apache-maven-3-and-hudson/' addthis:title='Next Webinar: Improving Your Java development with Apache Maven 3 and Hudson '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>Next week, Jason will be presenting the webinar: Improving Your Java Development with Apache Maven 3 and Hudson. All registrants will receive access to the recording after the event so if something comes up and you can’t make it, you won’t be missing out.  Be sure to register today! Improving Your Java development with Maven [...]]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2011/06/next-webinar-improving-your-java-development-with-apache-maven-3-and-hudson/' addthis:title='Next Webinar: Improving Your Java development with Apache Maven 3 and Hudson '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p>Next week, Jason will be presenting the webinar: Improving Your Java Development with Apache Maven 3 and Hudson. All registrants will receive access to the recording after the event so if something comes up and you can’t make it, you won’t be missing out.  Be sure to <a href="https://sonatype.webex.com/sonatype/onstage/g.php?t=a&amp;d=572689602"><strong>register today!</strong></a></p>

<p><strong>Improving Your Java development with Maven 3 and Hudson</strong></p>

<p>Tuesday, June 7, 2011 @ 10:30AM &#8211; 11:00AM EDT (UTC/GMT &#8211; 0400)</p>

<p>Presenter: Jason van Zyl, Sonatype CTO &amp; Founder</p>

<p>Attend this webinar to learn about the advantages of upgrading to Apache Maven 3, including improved speed, greater stability and increased compatibility. Jason will also talk about the greatly improved support for Maven 3 within Hudson that is easy to configure and supports complex build scenarios with ease. We will cover the Eclipse IDE integration for both Maven and Hudson that improves developer productivity.
<strong></strong></p>

<p><strong>
<a href="https://sonatype.webex.com/sonatype/onstage/g.php?t=a&amp;d=572689602">Register now!</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sonatype.com/people/2011/06/next-webinar-improving-your-java-development-with-apache-maven-3-and-hudson/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tycho: Building Eclipse plugins with Maven</title>
		<link>http://www.sonatype.com/people/2011/04/tycho-building-eclipse-plugins-with-maven/</link>
		<comments>http://www.sonatype.com/people/2011/04/tycho-building-eclipse-plugins-with-maven/#comments</comments>
		<pubDate>Wed, 27 Apr 2011 13:00:16 +0000</pubDate>
		<dc:creator>hloney</dc:creator>
				<category><![CDATA[Tycho]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[Maven]]></category>

		<guid isPermaLink="false">http://www.sonatype.com/people/?p=8025</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2011/04/tycho-building-eclipse-plugins-with-maven/' addthis:title='Tycho: Building Eclipse plugins with Maven '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>As part of the Eclipse Live series of webinars, Sonatype software developer Pascal Rapicault is giving a presentation on Tycho: Building Eclipse plugins with Maven. About the webinar: Tycho is a set of Maven plugins and extensions for building Eclipse plugins and OSGI bundles with Maven. Eclipse plugins and OSGI bundles have their own metadata [...]]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2011/04/tycho-building-eclipse-plugins-with-maven/' addthis:title='Tycho: Building Eclipse plugins with Maven '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p><!--dzoneZ=none-->As part of the Eclipse Live series of webinars, Sonatype software developer Pascal Rapicault is giving a presentation on <strong>Tycho: Building Eclipse plugins with Maven.</strong></p>

<p><strong>About the webinar:</strong></p>

<p>Tycho is a set of Maven plugins and  extensions for building Eclipse plugins and OSGI bundles with Maven.  Eclipse plugins and OSGI bundles have their own metadata for expressing  dependencies, source folder locations, etc. that are normally found in a  Maven POM. Tycho uses native metadata for Eclipse plugins and OSGi  bundles and uses the POM to configure and drive the build. Tycho  supports bundles, fragments, features, update site projects and RCP  applications. Tycho also knows how to run JUnit test plugins using OSGi  runtime and there is also support for sharing build results using Maven  artifact repositories.</p>

<p>Join this webinar to get an overview of the Tycho project and to learn what plans the project has for the future.</p>

<ul>
    <li><strong>Date</strong>: May 3, 2011</li>
    <li><strong>Time</strong>: 9:00 am PST / 12:00 pm EST / 4:00 pm UTC / 6:00 pm CET</li>
    <li><strong>Length</strong>: 60 minutes</li>
    <li><a href="http://live.eclipse.org/node/1003" target="_blank"><strong>Enroll here!</strong></a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.sonatype.com/people/2011/04/tycho-building-eclipse-plugins-with-maven/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>m2eclipse: The collaboration of the Maven &amp; Eclipse Platforms</title>
		<link>http://www.sonatype.com/people/2011/04/m2eclipse-the-collaboration-of-the-maven-eclipse-platforms/</link>
		<comments>http://www.sonatype.com/people/2011/04/m2eclipse-the-collaboration-of-the-maven-eclipse-platforms/#comments</comments>
		<pubDate>Fri, 15 Apr 2011 14:00:00 +0000</pubDate>
		<dc:creator>hloney</dc:creator>
				<category><![CDATA[m2eclipse]]></category>
		<category><![CDATA[Sonatype]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[EclipseCon]]></category>
		<category><![CDATA[m2e]]></category>
		<category><![CDATA[Maven]]></category>

		<guid isPermaLink="false">http://www.sonatype.com/people/?p=7759</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2011/04/m2eclipse-the-collaboration-of-the-maven-eclipse-platforms/' addthis:title='m2eclipse: The collaboration of the Maven &#38; Eclipse Platforms '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>As mentioned earlier on the Sonatype blog, we&#8217;re taking some of our most popular sessions from EclipseCon 2011, and releasing them to the wider developer community. The second installment from EclipseCon 2011 is m2eclipse: The collaboration of the Maven &#38; Eclipse Platforms. Software developer Igor Fedorenko details the new features and changes to m2eclipse 1.0, [...]]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2011/04/m2eclipse-the-collaboration-of-the-maven-eclipse-platforms/' addthis:title='m2eclipse: The collaboration of the Maven &amp; Eclipse Platforms '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p><!--dzoneZ=none-->As mentioned earlier on the Sonatype blog, we&#8217;re taking some of our most popular sessions from EclipseCon 2011, and releasing them to the wider developer community. The second installment from EclipseCon 2011 is <strong>m2eclipse: The collaboration of the Maven &amp; Eclipse Platforms.</strong></p>

<p>Software developer Igor Fedorenko details the new features and changes to m2eclipse 1.0, including pom.xml editor enhancements and reworked build lifecycle mapping.</p>

<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="500" height="405" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/-6G00KFONrw?fs=1&amp;hl=en_US&amp;rel=0" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="500" height="405" src="http://www.youtube.com/v/-6G00KFONrw?fs=1&amp;hl=en_US&amp;rel=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>

<p>For more videos from the Sonatype team, visit our <a href="http://www.sonatype.com/videos.html" target="_self">Resource Center</a>, or go to our <a href="http://www.youtube.com/user/sonatype" target="_blank">YouTube channel</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sonatype.com/people/2011/04/m2eclipse-the-collaboration-of-the-maven-eclipse-platforms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Watch the Hudson Integration Webinar Replay</title>
		<link>http://www.sonatype.com/people/2011/03/watch-the-hudson-integration-webinar-replay/</link>
		<comments>http://www.sonatype.com/people/2011/03/watch-the-hudson-integration-webinar-replay/#comments</comments>
		<pubDate>Wed, 16 Mar 2011 14:00:00 +0000</pubDate>
		<dc:creator>hloney</dc:creator>
				<category><![CDATA[Sonatype]]></category>
		<category><![CDATA[Hudson Integration]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[nexus professional]]></category>
		<category><![CDATA[Sonatype webinar]]></category>

		<guid isPermaLink="false">http://www.sonatype.com/people/?p=7653</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2011/03/watch-the-hudson-integration-webinar-replay/' addthis:title='Watch the Hudson Integration Webinar Replay '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>If you missed Sonatype&#8217;s latest webinar, the Future of Hudson Continuous Integration, you can catch the replay right on Sonatype.com. To view the replay, click here. Our next webinar &#8211; Hudson Continuous Integration with Sonatype Professional &#8211; is taking place on March 29. If your development team is looking for best practices for integrating Maven, [...]]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2011/03/watch-the-hudson-integration-webinar-replay/' addthis:title='Watch the Hudson Integration Webinar Replay '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p><!--dzoneZ=none-->If you missed Sonatype&#8217;s latest webinar, the Future of Hudson Continuous Integration, you can catch the replay right on Sonatype.com.</p>

<h4>To view the replay, <a href="http://go.sonatype.com/forms/20110315_webinardownload_hudsonfuture" target="_blank">click here</a>.</h4>

<p>Our next webinar &#8211; Hudson Continuous Integration with Sonatype Professional &#8211; is taking place on March 29. If your development team is looking for best practices for integrating Maven, Hudson and Nexus Professional this webinar is for you.</p>

<p><span id="more-7653"></span></p>

<p>Sonatype Professional is the only integrated suite created for  Maven-centric builds. The suite includes Sonatype Certified &amp;  Integrated Distributions of: Maven, Hudson, Nexus Professional, Eclipse  Integration, Developer Onboarding as well as support from the experts.  Register to learn how Sonatype  Professional empowers development teams to realize the promise of agile  through continuous integration, while reducing project risk.</p>

<ul>
    <li><strong>Date:</strong> Tuesday, March 29, 2011</li>
    <li><strong>Time:</strong> 9:00 am Eastern Daylight Time (New York, GMT-04:00)</li>
    <li><strong>Duration:</strong> 30 mins</li>
    <li><strong>Presenter:</strong> Blaine Mincey, Sonatype Senior Systems Engineer</li>
    <li><a href="https://sonatype.webex.com/cmp0306lc/webcomponents/widget/detect.do?siteurl=sonatype&amp;LID=1&amp;RID=2&amp;TID=4&amp;rnd=2503137833&amp;DT=-240&amp;DL=en-US&amp;isDetected=true&amp;backUrl=%2Fmw0306lc%2Fmywebex%2Fdefault.do%3Fnomenu%3Dtrue%26siteurl%3Dsonatype%26service%3D6%26main_url%3Dhttps%253A%252F%252Fsonatype.webex.com%252Fec0605lc%252Feventcenter%252Fevent%252FeventAction.do%253FtheAction%253Ddetail%2526confViewID%253D771772275%2526siteurl%253Dsonatype%2526%2526%2526" target="_blank"><strong>Register for this webinar</strong></a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.sonatype.com/people/2011/03/watch-the-hudson-integration-webinar-replay/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EclipseCon 2011 is one week away!</title>
		<link>http://www.sonatype.com/people/2011/03/eclipsecon-2011-is-one-week-away/</link>
		<comments>http://www.sonatype.com/people/2011/03/eclipsecon-2011-is-one-week-away/#comments</comments>
		<pubDate>Mon, 14 Mar 2011 14:00:00 +0000</pubDate>
		<dc:creator>hloney</dc:creator>
				<category><![CDATA[Sonatype]]></category>
		<category><![CDATA[EclipseCon]]></category>
		<category><![CDATA[Hudson]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[Tycho]]></category>

		<guid isPermaLink="false">http://www.sonatype.com/people/?p=7634</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2011/03/eclipsecon-2011-is-one-week-away/' addthis:title='EclipseCon 2011 is one week away! '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>Another year of great talks and Eclipse workshops are just around the corner! EclipseCon 2011 is being held in Santa Clara, California from March 21 &#8211; 24. As a Strategic Member of the Eclipse Foundation and as a proud Gold Sponsor, Sonatype is looking forward to another year of great talks, tutorials and BOF&#8217;s at [...]]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2011/03/eclipsecon-2011-is-one-week-away/' addthis:title='EclipseCon 2011 is one week away! '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p><!--dzoneZ=none--><strong>Another year of great talks and Eclipse workshops are just around the corner! </strong></p>

<p>EclipseCon 2011 is being held in Santa Clara, California from March 21 &#8211; 24.</p>

<p>As a Strategic Member of the Eclipse Foundation and as a proud Gold Sponsor, Sonatype is looking forward to another year of great talks, tutorials and BOF&#8217;s at EclipseCon 2011. Sonatype technical leaders will host a number of sponsored talks on Tuesday, March 22 in the Cypress Room. Topics we will cover include: Next Generation Development Infrastructure, Hudson Continuous Integration, Tycho Build Conversion, Discovering p2 API&#8217;s, Maven 3 and many more.</p>

<p><strong><a href="http://www.sonatype.com/eclipsecon-2011.html" target="_blank">Check out the full lineup of presentations here</a>.</strong></p>

<p>We hope to see you there! But if you can&#8217;t make it, get all of the conference updates from <a href="http://twitter.com/SonatypeCM" target="_blank">the Sonatype team on Twitter</a> by following the hashtag #EclipseCon.</p>

<h4>Event Details:</h4>

<ul>
    <li><strong>Date</strong>: March 21-24, 2011</li>
    <li><strong>Location</strong>: Hyatt Regency Santa Clara, CA</li>
    <li><strong>Event Website</strong>: <a href="http://www.eclipsecon.org/2011/" target="_blank">http://www.eclipsecon.org/2011/</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.sonatype.com/people/2011/03/eclipsecon-2011-is-one-week-away/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spend less time chasing problems with Sonatype Professional</title>
		<link>http://www.sonatype.com/people/2011/03/spend-less-time-chasing-problems-with-sonatype-professional/</link>
		<comments>http://www.sonatype.com/people/2011/03/spend-less-time-chasing-problems-with-sonatype-professional/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 15:00:08 +0000</pubDate>
		<dc:creator>hloney</dc:creator>
				<category><![CDATA[Sonatype]]></category>
		<category><![CDATA[Hudson]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[Nexus]]></category>
		<category><![CDATA[Sonatype Professional]]></category>
		<category><![CDATA[Sonatype webinar]]></category>

		<guid isPermaLink="false">http://www.sonatype.com/people/?p=7626</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2011/03/spend-less-time-chasing-problems-with-sonatype-professional/' addthis:title='Spend less time chasing problems with Sonatype Professional '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>Thank you to everyone who attended Sonatype&#8217;s recent webinar, Improving Developer Productivity with Sonatype Professional. If you were unable to attend the webinar recording is now available. In a recent survey, 80% of developers, managers and architects said lack of integration between their tools was a huge efficiency drain. As teams standardize on tools like [...]]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2011/03/spend-less-time-chasing-problems-with-sonatype-professional/' addthis:title='Spend less time chasing problems with Sonatype Professional '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p><!--dzoneZ=none-->Thank you to everyone who attended Sonatype&#8217;s recent webinar, Improving Developer Productivity with Sonatype Professional. If you were unable to attend the webinar recording is now available.</p>

<p>In a recent  survey, 80% of developers, managers and architects said lack of integration  between their tools was a huge efficiency drain. As teams standardize on  tools like Maven, Hudson, and Nexus integration headaches can be real  productivity killers.</p>

<p><a href="http://go.sonatype.com/forms/20110308_webinardownload_improvdevprod" target="_blank"><strong>View this webinar</strong></a> to  learn how Sonatype Professional can help your team spend less time chasing problems and more time delivering code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sonatype.com/people/2011/03/spend-less-time-chasing-problems-with-sonatype-professional/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring Plugin Goals in Maven 3</title>
		<link>http://www.sonatype.com/people/2011/03/configuring-plugin-goals-in-maven-3/</link>
		<comments>http://www.sonatype.com/people/2011/03/configuring-plugin-goals-in-maven-3/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 15:01:48 +0000</pubDate>
		<dc:creator>bbentmann</dc:creator>
				<category><![CDATA[Sonatype]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[Maven 3]]></category>
		<category><![CDATA[Maven Enforcer plugin]]></category>

		<guid isPermaLink="false">http://www.sonatype.com/people/?p=7525</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2011/03/configuring-plugin-goals-in-maven-3/' addthis:title='Configuring Plugin Goals in Maven 3 '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>In Maven 3.0.3, we introduced some improvements to the way plugin goals can be configured. This post summarizes these improvements and gives some examples of how Maven plugin configuration has been enhanced. We&#8217;ve focused on making improvements that will reduce the friction of plugin configuration for both plugin developers and Maven end-users. First, a general [...]]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2011/03/configuring-plugin-goals-in-maven-3/' addthis:title='Configuring Plugin Goals in Maven 3 '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div><p>In Maven 3.0.3, we introduced some improvements to the way plugin goals can be configured. This post summarizes these improvements and gives some examples of how Maven plugin configuration has been enhanced.   We&#8217;ve focused on making improvements that will reduce the friction of plugin configuration for both plugin developers and Maven end-users.</p>

<p>First, a general tip for users interested in using these enhancements in POMs: use the <a rel="nofollow" href="http://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html" target="_blank">requireMavenVersion</a> rule from the Maven Enforcer Plugin and required Maven version 3.0.3.  This will save other team members from running into strange build failures due to plugin misconfiguration if they are still using previous Maven versions.   Likewise, plugin authors that take advantage of these enhancements should properly declare the Maven prerequisite in the plugin POM.</p>

<p><span id="more-7525"></span></p>

<h2>Generic collections</h2>

<p>The plugin configurator can now employ the generic type argument of a collection parameter to determine the type of the elements. In practice this means plugins can use collections as input parameters more freely without having to worry about the user being forced to specify the proper element type in the POM.</p>

<p>For instance, the goal parameter:</p>

<pre>/** @parameter */
java.util.List&lt;java.io.File&gt; files;</pre>

<p>can be configured like this in the new Maven version:</p>

<pre>&lt;files&gt;
  &lt;!-- Maven 3.0.3 can take care of converting this to a java.io.File instance --&gt;</pre>

<pre>  &lt;file&gt;pom.xml&lt;/file&gt;</pre>

<pre>  &lt;!-- The previously required implementation attribute is now superfluous but still works --&gt;
  &lt;file implementation="java.io.File"&gt;build.xml&lt;/file&gt;
&lt;/files&gt;</pre>

<p>Instead of having to specify the type of each element, Maven 3.0.3 will now automatically convert the first element in the previous example to an object of type &#8220;java.io.File&#8221;.</p>

<p>In absence of the <tt>implementation</tt> attribute, Maven usually looks for a class named <tt><em>&lt;goalPackage&gt;</em></tt><tt>.</tt><tt><em>&lt;xmlElement&gt;</em></tt> to determine the element type. The recognition of generics now enables plugin authors to use bean classes for collection elements that reside in a different package than the plugin goals.   In summary, collections now provide the same ease of configuration as classical arrays.</p>

<h2>Automatic conversion of arrays to collections, and vice versa</h2>

<p>Continuing in the spirit of the previous improvement, the new plugin configurator will now automatically convert a collection obtained from a parameter expression to an array if that&#8217;s the type expected by the plugin parameter. Likewise, an array would be converted to a collection if needed. The bottom line is that plugin authors targeting recent Maven versions can freely decide to use an array or a collection for a plugin parameter regardless of whether its default value actually yields a collection or array:</p>

<pre>/** @parameter default-value="${project.compileSourceRoots}" */
List&lt;String&gt; sourceRootsAsCollection;

/** @parameter default-value="${project.compileSourceRoots}" */
String[] sourceRootsAsArray;</pre>

<p>Before this change was made to the configurator plugin developers and Maven users had to be very careful about passing an array to a method that expected a List or vice versa.   While this might seem like a minor change, it is one of many that will make plugin development easier.</p>

<h2>Configuration of collection/array via system property</h2>

<p>For many plugin parameters it is occasionally convenient to specify their values from the command line via system properties. In the past, this was limited to parameters of simple types like <tt>String</tt> or <tt>Boolean</tt>. The latest Maven release finally allows plugin users to configure collections or arrays from the command line via comma-separated strings. Take for example a plugin parameter like this:</p>

<pre>/** @parameter expression="${includes}" */
String[] includes;</pre>

<p>This can be configured from the command line as follows:</p>

<pre>mvn &lt;goal&gt; -Dincludes=*Foo,Bar*</pre>

<p>Plugin authors that wish to enable CLI-based configuration of arrays/collections just need to add the <tt>expression</tt> tag to their parameter annotation. Note that if compatibility with older Maven versions is to be kept, the parameter type must not be an interface but a concrete collection class or an array to avoid another shortcoming in the old configurator.</p>

<h2>Inlined collections</h2>

<p>Many users complain that Maven POMs make heavy use of container elements for collections. Instead of just listing a series of dependency elements, you have to wrap all of your dependency elements in a dependencies element. The same is true for includes and excludes and other elements throughout the POM.  This extra redundancy often adds up to some very large POMs. In Maven 3.0.3, we&#8217;ve made a change to the plugin API that will support plugin configuration without requiring container elements for collections.  Here is an example:</p>

<pre>&lt;fileset&gt;
  &lt;directory&gt;src/demo&lt;/directory&gt;
  &lt;include&gt;Foo*&lt;/include&gt;
  &lt;include&gt;Bar*&lt;/include&gt;
  &lt;exclude&gt;*Bad&lt;/exclude&gt;
&lt;/fileset&gt;</pre>

<p>Previously, Maven would only look for a field or setter when processing the <tt>&lt;include&gt;</tt> elements. Now it also looks for an adder. So to support the above configuration, a plugin author would need to implement the configured bean like this:</p>

<pre>public class Fileset
{

    private List&lt;String&gt; includes = new ArrayList&lt;String&gt;();

    public void addInclude( String include )
    {
        includes.add( include );
    }

    ...
}</pre>

<p>The adder needs to be named <tt>add</tt><tt><em>&lt;xmlElement&gt;</em></tt><tt>()</tt> and must be public, non-static and have a single argument; it may have a return value. In case where multiple such adders with the same name exists, it is undefined which one gets actually called so be sure to avoid overloading the adder.</p>

<p>Given that merging of plugin configuration during POM inheritance or profile injection is purely based on the XML structure and not guided by information about the actual data types, users that employ this compacted configuration are well-advised to not mix it with the usual collection-style configuration format for a given plugin parameter as the merged configuration likely doesn&#8217;t produce the intended result.</p>

<h2>Bean default properties</h2>

<p>We can take the idea of inlining configuration a little further. Have a look at this example configuration:</p>

<pre>&lt;resources&gt;
  &lt;resource&gt;
    &lt;directory&gt;src/foo&lt;/directory&gt;
    &lt;filtering&gt;true&lt;/filtering&gt;
  &lt;/resource&gt;
  &lt;resource&gt;src/bar&lt;/resource&gt;
&lt;/resources&gt;</pre>

<p>Looks odd at first, doesn&#8217;t it? Obviously, the <tt>&lt;resource&gt;</tt> element describes some complex structure, but the second <tt>&lt;resource&gt;</tt> element in the example consists just of a mere string. It&#8217;s not hard to guess that<tt>&lt;resource&gt;src/bar&lt;/resource&gt;</tt> could be a shorthand form of <tt>&lt;resource&gt;&lt;directory&gt;src/bar&lt;/directory&gt;&lt;/resource&gt;</tt> by assuming the <tt>&lt;directory&gt;</tt> element is the default/primary property of a <tt>&lt;resource&gt;</tt>. With the new plugin configurator, this is actually possible now.</p>

<p>To enable the feature, a plugin author would have to add a method called <tt>set()</tt> to the bean class in question:</p>

<pre>public class Resource
{

    private File directory;

    public void set( File directory )
    {
        this.directory = directory;
    }

...
}</pre>

<p>This <tt>set()</tt> method must be public, non-static and take a single argument; it may have a return value.</p>

<p>Besides saving users a few bits of XML, this feature can also be used to configure complex beans via system properties from the command line. Let&#8217;s say we have a plugin parameter like this:</p>

<pre>/** @parameter expression="${artifact}" */
Artifact artifact;</pre>

<p>Now further assuming the <tt>Artifact</tt> bean used here implements a nice <tt>set()</tt> method that is smart enough to parse a string into artifact coordinates, one could invoke the plugin directly via:</p>

<pre>mvn &lt;goal&gt; -Dartifact=org.apache.maven:maven-core:3.0</pre>

<p>Last but not least, the default property feature also enables a smooth upgrade path in case plugin parameters need to be changed from simple values to complex structures. Going back to the initial example with the <tt>&lt;resource&gt;</tt>elements, consider the plugin author originally didn&#8217;t anticipate the <tt>&lt;filtering&gt;</tt> element and designed the plugin parameter to be of type <tt>File[]</tt>.</p>

<p>With previous Maven versions, the only way to extend the plugin to support the<tt>&lt;filtering&gt;</tt> element is to deprecate the existing <tt>&lt;resources&gt;</tt> parameter and introduce a new parameter using the complex type or alternatively just break compatibility with existing POMs that use the old plugin version. Using the default property support, a plugin can change the parameter type from <tt>File[]</tt> to <tt>Resource[]</tt> without affecting existing users.</p>

<h2>Simpler configuration of properties parameter</h2>

<p>While <tt>java.util.Properties</tt> is just a concrete implementation of a <tt>Map</tt>, the configuration required for parameters of type <tt>Properties</tt> is structurally different from the configuration format for <tt>Map</tt> parameters. For the sake of consistency and conciseness, plugin parameters of type <tt>Properties</tt> can now also be configured like a <tt>Map</tt>, that is:</p>

<pre>&lt;properties&gt;
  &lt;key1&gt;value1&lt;/key1&gt;
  &lt;key2&gt;value2&lt;/key2&gt;
&lt;/properties&gt;</pre>

<h2>User-specified implementation class for map parameters</h2>

<p>Previous Maven versions always used a <tt>TreeMap</tt> to configure parameters of type <tt>Map</tt>. In other words, neither the user nor the plugin author had any control over the map implementation being used. Just like with the collections, the updated plugin configurator recognizes an optional implementation attribute:</p>

<pre>&lt;map implementation="java.util.LinkedHashMap"&gt;
  &lt;key&gt;value&lt;/key&gt;
&lt;/map&gt;</pre>

<p>In absence of both the attribute and a concrete implementation class in the parameter declaration, <tt>TreeMap</tt> continues to get used.</p>

<h2>Hexadecimal and octal numbers</h2>

<p>In some contexts, it&#8217;s more convenient to specify a number in hexadecimal or octal notation. To support this, plugin authors previously had to declare the corresponding plugin parameters as strings and do the conversion themselves. Now, it&#8217;s natively supported, using the prefix &#8220;0x&#8221; to denote hex notation and the prefix &#8220;0&#8243; to denote octal notation.</p>

<pre>&lt;rgb&gt;0xFF00C0&lt;/rgb&gt; &lt;!-- hex number --&gt;
&lt;perms&gt;0664&lt;/perms&gt; &lt;!-- octal number --&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sonatype.com/people/2011/03/configuring-plugin-goals-in-maven-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

