<?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; development</title>
	<atom:link href="http://www.sonatype.com/people/tag/development/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>From Plexus to Guice (#1): Why Guice?</title>
		<link>http://www.sonatype.com/people/2010/01/from-plexus-to-guice-1-why-guice/</link>
		<comments>http://www.sonatype.com/people/2010/01/from-plexus-to-guice-1-why-guice/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 19:00:55 +0000</pubDate>
		<dc:creator>Jason van Zyl</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Sonatype]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[guice]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[Nexus]]></category>
		<category><![CDATA[peaberry]]></category>

		<guid isPermaLink="false">http://www.sonatype.com/people/?p=3970</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2010/01/from-plexus-to-guice-1-why-guice/' addthis:title='From Plexus to Guice (#1): Why Guice? '  ><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>When we started the Maven project, dependency injection was still developing. Spring was just starting out and the Avalon project at Apache was really the only IoC framework around. While the concept seems second-nature by 2010, in 2002, it wasn&#8217;t a primary focus of the initial efforts of the Maven community but it was something [...]]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2010/01/from-plexus-to-guice-1-why-guice/' addthis:title='From Plexus to Guice (#1): Why Guice? '  ><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/2010/01/from-plexus-to-guice1.png"><img class="alignright size-full wp-image-4024" title="from-plexus-to-guice" src="http://www.sonatype.com/people/wp-content/uploads/2010/01/from-plexus-to-guice1.png" alt="" width="250" height="62" /></a>When we started the Maven project, dependency injection was still developing. Spring was just starting out and the Avalon project at Apache was really the only IoC framework around. While the concept seems second-nature by 2010, in 2002, it wasn&#8217;t a primary focus of the initial efforts of the Maven community but it was something I felt had to be in place for the development of Maven 2. We knew we needed some sort of component framework, some standard mechanism to instantiate plugins and configure them based on a set of configuration points, and, at the time, Plexus filled the gap. Plexus was exactly what we needed because it evolved with the requirements of Maven, and I think that Plexus served us well for the past few years but it&#8217;s time to let go. I never felt compelled to switch until <a href="http://code.google.com/p/google-guice/wiki/Guice20">Guice 2.0</a>.   Guice has the capabilities and adaptability we require in Maven.</p>

<p>For all new development, we&#8217;ve decided to focus on <a href="http://code.google.com/p/google-guice/">Guice</a> and build a compatibility layer for existing components. In this post, I&#8217;m going to discuss the various factors that went into the decision to move to Guice. All of Sonatype&#8217;s product are currently developed using Guice and the Guice/Plexus integration libraries that Stuart will describe in the articles that will follow over the next few weeks, and future work on Maven 3 will be based on Guice.<span id="more-3970"></span></p>

<h3>Why Guice?</h3>

<p>We ultimately went with Guice because it provided a system that could be configured and customized at runtime. It was very close to the model that Plexus was using, and we felt that it would be easy for us to build a compatibility layer between the two. The primary motiviation in this decision was our ability to write that compatibility layer atop whatever framework we selected that would allow for backward-compatibility. You see, it isn&#8217;t good enough in a community this large to just move to a new framework and expect everyone to just scramble to rewrite Maven plugins. We had to find a way to support existing plugins, and existing extensions. We had to find a way to work with all of the existing code that was coded to Plexus and adapt that to a new engine.</p>

<p>Guice is highly adaptable. With Guice we don&#8217;t need to configure all of our components ahead of time, we can instantiate them as needed and modify the &#8220;context&#8221; with a Guice/Plexus integration layer which Stuart will describe in the following articles. The answer to &#8220;why Guice?&#8221; is explained in the code that was required to write this compatibility layer. The only way we found to make this work was by using Guice.     Other reasons included <a href="http://java.dzone.com/news/dependency-injection-and-type-">type safety</a>, <a href="http://code.google.com/p/garbagecollected/wiki/SpringAndGuiceErrors">easy-to-read error messages</a>, and <a href="http://code.google.com/p/peaberry/">OSGi support using peaberry</a>.    All of our development uses the <a href="http://code.google.com/p/atinject/">JSR330 standard @Inject anotations</a>.   We&#8217;re using JSR330 instead of Guice-specific annotations to make sure that our work is more standard and portable going forward.</p>

<h3>Focusing the Community</h3>

<p>Aside from the technical reasons to move to Guice, there are reasons that involve the community. If our audacious goal is to provide world-class build and development infrastructure support, we need to remove unnecessary distractions from our environment. We just were not focused on Plexus, and issues would come up in Plexus that needed to be supported which distracted from the core effort. We&#8217;re not just <em>using</em> Guice. Because we are starting to rely on it, we appreciate the need to work closely with a project like Guice and contribute back to that community.  Stuart is a committer, and we wanted to collaborate with others and use a framework used widely by others.</p>

<p>Maven&#8217;s goal was never to create a dependency injection framework, it was always focused on builds and the infrastructure that supports development. Not long ago, we were contemplating what it would take to improve Plexus, we looked at the effort required to document and support Plexus going forward, and it just didn&#8217;t make any sense for us to continue to apply precious time and effort to a problem that had already been solved by several others. It makes sense to focus the community, and moving to Guice will allow us to devote more of our own resources to supporting the central projects and products.</p>

<h3>Making it Easier to Extend</h3>

<p>When your project or production uses a standard tool, you increase the audience that can customize it. If the goal of Maven is to create a solid foundation of infrastructure for others to build upon, it only makes sense to adopt something more standard. Maven and products like Nexus should be judged by the number and variety of plugins that have been developed for them, and this is something that attract most new users to Maven (the abundance and variety of Maven plugins). Anything we can do to make it easier to extend these systems is the right thing to do for the &#8220;ecosystem&#8221; I described last week.</p>

<p>If you wanted to write a plugin for the initial version of Nexus two years ago, you would have had to know a lot about Plexus. There was nothing particularly wrong with Plexus, it had a well-defined interface and it served its purpose, but there wasn&#8217;t very much documentation, and requiring some knowledge of Plexus for plugin developers was reducing the size of potential developers. In the past year, we&#8217;ve made a course correction, and you can write a Nexus plugin without having to learn any dependency injection framework. What has made this transition possible is the flexibility of Guice.</p>

<h3>Summary</h3>

<p>Stuart&#8217;s going to dive into the technical details in the next five parts of this series. If you are a developer interested in the implementation of Plexus and Guice, you&#8217;ll find these posts to be a good starting point for learning about we&#8217;ve implemented this compatibility layer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sonatype.com/people/2010/01/from-plexus-to-guice-1-why-guice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing a Nexus Plugin Using m2eclipse</title>
		<link>http://www.sonatype.com/people/2010/01/writing-a-nexus-plugin-using-m2eclipse/</link>
		<comments>http://www.sonatype.com/people/2010/01/writing-a-nexus-plugin-using-m2eclipse/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 15:44:36 +0000</pubDate>
		<dc:creator>Damian Bradicich</dc:creator>
				<category><![CDATA[m2eclipse]]></category>
		<category><![CDATA[Nexus]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://www.sonatype.com/people/?p=3745</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2010/01/writing-a-nexus-plugin-using-m2eclipse/' addthis:title='Writing a Nexus Plugin Using m2eclipse '  ><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 this post, I&#8217;m going to walk you through the process of creating a new Nexus plugin using the m2eclipse plugin for eclipse from start to finish including all steps in the process.  After reading this post you will know about the easiest way to get started working on your own Nexus plugin. Some things [...]]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2010/01/writing-a-nexus-plugin-using-m2eclipse/' addthis:title='Writing a Nexus Plugin Using m2eclipse '  ><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/2010/01/nexus-small.png" alt="nexus-small" title="nexus-small" width="250" height="62" class="alignright size-full wp-image-3683" /></p>

<p>In this post, I&#8217;m going to walk you through the process of creating a new <a href="http://nexus.sonatype.org">Nexus plugin</a> using the <a href="http://m2eclipse.sonatype.org">m2eclipse plugin</a> for eclipse from start to finish including all steps in the process.  After reading this post you will know about the easiest way to get started working on your own Nexus plugin.</p>

<p>Some things to note are that I am using the latest m2e 0.9.9 dev build available from the http://m2eclipse.sonatype.org/update-dev update site.  I am also using eclipse 3.5.1.  All maven builds have been done using local build of latest maven 3.0-SNAPSHOT, however, that is not a requirement for the plugins to work, just a recommendation as maven 3 (in my opinion) is much better than maven 2 <img src='http://www.sonatype.com/people/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

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

<h3>Configuring Your Environment for the Nexus Plugin Project</h3>

<p>To successfully create a Nexus Plugin using the Nexus Plugin archetype, you will need to configure your Maven Settings to include both the Sonatype Forge repository and the Central Maven repository.   If you are already using Nexus and you have configured your settings.xml to use a single, consolidated repository group, all you need to do is add a proxy repository for the Sonatype Forge repository to your repository group.   If you are not using Nexus, you will need to use a settings.xml that resembles the following sample:</p>


<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;settings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;profiles<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;profile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>sonatype-forge<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;repositories<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;repository<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>sonatype-forge<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;url<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>http://repository.sonatype.org/content/groups/forge/<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/url<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;releases<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/releases<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;snapshots<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/snapshots<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/repository<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/repositories<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pluginRepositories<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pluginRepository<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>sonatype-forge<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;url<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>http://repository.sonatype.org/content/groups/forge/<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/url<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;releases<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/releases<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;snapshots<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/enabled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/snapshots<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/pluginRepository<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/pluginRepositories<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/profile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/profiles<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;activeProfiles<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;activeProfile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>sonatype-forge<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/activeProfile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/activeProfiles<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/settings<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>


<h3>Creating a New Project with the Nexus Plugin Archetype</h3>

<p>Let&#8217;s start by creating a &#8216;New Maven Project&#8217; in m2eclipse.</p>

<p><img src="http://www.sonatype.com/people/wp-content/uploads/2010/01/new-project.png" alt="new-project" title="new-project" width="523" height="498" class="aligncenter size-full wp-image-3747" /></p>

<p>Select Maven > Maven Project, and click on Next until you reach the archetype selection.  On this screen you can search for and select the archetype which will create your new project. Note that you must use the 1.2 version of the nexus-plugin-archetype.</p>

<p><img src="http://www.sonatype.com/people/wp-content/uploads/2010/01/archetype-selection.png" alt="archetype-selection" title="archetype-selection" width="615" class="aligncenter size-full wp-image-3748" /></p>

<p>Enter the GAV (groupId, artifactId, version) params that will uniquely define the plugin, and click on Next.</p>

<h3>Targeting the Proper Nexus Version</h3>

<p>After supplying the project identifiers, you will see a panel that display the archetype property ${nexusVersion}.  This is the version of Nexus that your plugin will target and it will associate your project with the proper set of dependencies for a specific version of Nexus.</p>

<p><img src="http://www.sonatype.com/people/wp-content/uploads/2010/01/gav-params.png" alt="gav-params" title="gav-params" width="671" height="541" class="aligncenter size-full wp-image-3749" /></p>

<p>By default the nexus-plugin-archetype will target Nexus version 1.4.1.   If you are targeting 1.4.1, it is important that you add the following to your project&#8217;s dependency management because of a problem w/ the parent POM of Nexus 1.4.1.   <b>If you are not tied to using Nexus 1.4.1 we strongly recommend that you update the Nexus version you are targeting 1.4.2-SNAPSHOT and disregard this change.</b>   The 1.4.2-SNAPSHOT POMs have been updated properly and they do not require the following dependency management workaround.</p>


<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependencyManagement<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependencies<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;">&lt;!- Workaround for swizzle-jira:1.3.3-SONATYPE-2, as it has an incorrect parent -<span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.codehaus.swizzle<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>swizzle-jira<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1.3.3-SONATYPE-221<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependencies<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependencyManagement<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>


<p>If you have already generated the project, and you need to change the target Nexus version you will need to edit this new project&#8217;s POM. Open up the POM of your Nexus Plugin and find the section that defines properties. You will need to change the nexus-version property to target a Nexus version. After creating a project with the Nexus Plugin archetype, you will see a properties section of the POM that contains a ${nexusVersion} reference as follows:</p>


<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;project<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  ...
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;properties<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #808080; font-style: italic;">&lt;!-- Set the Nexus version here, against which you build the plugin --&gt;</span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;nexus-version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>${nexusVersion}<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/nexus-version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/properties<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  ...
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/project<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>


<p>Click Next after setting the ${nexusVersion}, and voila, we have a nexus-plugin project.</p>

<h3>Building and Deploying the Plugin Project</h3>

<p>Your new Nexus plugin project has some sample components you can use as a starting point for your own plugin development.</p>

<p><img src="http://www.sonatype.com/people/wp-content/uploads/2010/01/new-project-package-explorer.png" alt="new-project-package-explorer" title="new-project-package-explorer" width="367" height="364" class="aligncenter size-full wp-image-3753" /></p>

<p>You can now build this project and expand the bundle right into your nexus installation ${nexus-work-dir}/plugin-repository/</p>

<p><img src="http://www.sonatype.com/people/wp-content/uploads/2010/01/nexus-work-directory-layout.png" alt="nexus-work-directory-layout" title="nexus-work-directory-layout" width="306" height="120" class="aligncenter size-full wp-image-3754" /></p>

<p>And when Nexus starts it will find the plugin and load it automatically.    For this sample plugin, you should see the log message in the Nexus log:</p>

<blockquote><p>Plugin manager &#8220;ACTIVATE&#8221; on plugin &#8220;org.sonatype.nexus.plugin:test-plugin:0.0.1-SNAPSHOT&#8221; was successful.</p></blockquote>

<p>As expected, you are now able to properly use the new plexus resource, I used curl to perform a GET against the default /sample/hello service added to my Nexus instance.  The best part is that we have achieved everything you see above with absolutely zero code, Maven Archetypes really do simplify things for you <img src='http://www.sonatype.com/people/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<p><img src="http://www.sonatype.com/people/wp-content/uploads/2010/01/curl-example.png" alt="curl-example" title="curl-example" width="527" height="44" class="aligncenter size-full wp-image-3755" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sonatype.com/people/2010/01/writing-a-nexus-plugin-using-m2eclipse/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
	</channel>
</rss>

