<?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; documentation</title>
	<atom:link href="http://www.sonatype.com/people/tag/documentation/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>Retrieving a plugin&#039;s documentation</title>
		<link>http://www.sonatype.com/people/2010/12/retrieving-a-plugins-documentation/</link>
		<comments>http://www.sonatype.com/people/2010/12/retrieving-a-plugins-documentation/#comments</comments>
		<pubDate>Mon, 13 Dec 2010 12:00:50 +0000</pubDate>
		<dc:creator>Anders Hammar</dc:creator>
				<category><![CDATA[Sonatype]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://www.sonatype.com/people/?p=6642</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2010/12/retrieving-a-plugins-documentation/' addthis:title='Retrieving a plugin&#039;s documentation '  ><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>One of the key things driving the adoption of Maven, is the rich set of plugins available. Whenever you want to add some functionality to the build process, or possibly even just want to do a one-time job, chances are that there is already a plugin for that. When you want to use Maven plugins, you [...]]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2010/12/retrieving-a-plugins-documentation/' addthis:title='Retrieving a plugin&#039;s documentation '  ><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>One of the key things driving the adoption of Maven, is the rich set  of plugins available. Whenever you want to add some functionality to the  build process, or possibly even just want to do a one-time job, chances  are that there is already a plugin for that.</p>

<p>When you want to use Maven  plugins, you need to get more information about them to know how to use  them. Most often, there is online documentation that describes the  goals and parameters. However, sometimes no such documentation exists or  you just cannot find it. Also, the online documentation very often  describes the latest version of the plugin &#8211; but what if you have to use an  older version?</p>

<p>This  blog post will explain the different options you have to retrieve  information about a plugin, just by using Maven itself.</p>

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

<p>As mentioned above, the simplest way of viewing a plugin&#8217;s  documentation is to use the one provided online. Not only does this documentation describe the  available goals and the plugin&#8217;s parameters, but it most often also provides  examples and other useful information. If available, this should  normally be your first choice. However, there are at least two other  ways of retrieving information from a plugin about it&#8217;s goals and  parameters. These come in handy when there is no other documentation, and also when you want to be sure to find the goals and parameters of a  specific version of the plugin.</p>

<p>The first option, and most likely the easiest one to remember, is to use the <tt>help</tt> goal of the plugin itself. Here&#8217;s an example:</p>

<blockquote>
<pre>mvn compiler:help</pre>
</blockquote>

<p>This would give you an overview of the goals of the Maven Compiler Plugin. If you want more information, add the <tt>detail</tt> parameter:</p>

<blockquote>
<pre>mvn compiler:help -Ddetail</pre>
</blockquote>

<p>If you want to focus on a specific goal, you do that through the <tt>goal</tt> parameter:</p>

<pre>
<blockquote>mvn compiler:help -Ddetail -Dgoal=compile</blockquote>
</pre>

<p>Please note that this will describe the version of the plugin according  to normal Maven plugin management. To override that, there is always the  option of specify the plugin version through the standard Maven syntax.</p>

<blockquote>
<pre>mvn org.apache.maven.plugins:maven-compiler-plugin:2.3:help -Ddetail -Dgoal=compile</pre>
</blockquote>

<p><a rel="attachment wp-att-6652" href="http://www.sonatype.com/people/2010/12/retrieving-a-plugins-documentation/blog150-help_goal-2/"><img class="alignleft size-full wp-image-6652" title="blog150-help_goal" src="http://www.sonatype.com/people/wp-content/uploads/2010/12/blog150-help_goal.png" alt="" width="797" height="606" /></a></p>

<p>Another great thing about the help goal is that it is created by Maven Plugin Plugin. So you could very easy add this feature to your own plugin as well, only by adding a <a href="http://maven.apache.org/plugins/maven-plugin-plugin/examples/generate-help.html" target="_blank">simple POM configuration</a>. However, this dependency is also the drawback. The functionality in Maven Plugin Plugin was added in version 2.4, so plugins (or older versions of plugins) written before that would not have the help goal. Fortunately, there is another option for those cases.</p>

<p>A fallback option is to use the Maven Help Plugin and its describe goal. It will work with any version of a plugin you want to describe. As an example, here is the equivalent to the one above:</p>

<pre>
<blockquote>mvn help:describe -Dplugin=org.apache.maven.plugins:maven-compiler-plugin:2.3 -Ddetail -Dmojo=compile</blockquote>
</pre>

<p><a rel="attachment wp-att-6661" href="http://www.sonatype.com/people/2010/12/retrieving-a-plugins-documentation/blog150-describe_goal-2/"><img class="alignleft size-full wp-image-6661" title="blog150-describe_goal" src="http://www.sonatype.com/people/wp-content/uploads/2010/12/blog150-describe_goal.png" alt="" width="797" height="606" /></a></p>

<p>As this feature is described in detail in <a href="http://www.sonatype.com/books/mvnref-book/reference/installation-sect-help-plugin-install.html#installation-sect-describing-plugin" target="_blank">chapter 6.3.1 of Maven: The Complete Reference</a> and also in the online documentation of <a href="http://maven.apache.org/plugins/maven-help-plugin/examples/describe-configuration.html" target="_blank">Maven Help Plugin</a>, I will not go into more details about it.</p>

<p>Try the different options and see which one you prefer. Please note that even if they provide much of the same information there are some slight differences. In some areas, like information about default phase binding, I find the help:describe option more informative.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sonatype.com/people/2010/12/retrieving-a-plugins-documentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Documenting the Nexus REST API with Enunciate</title>
		<link>http://www.sonatype.com/people/2010/02/documenting-the-nexus-rest-api-with-enunciate/</link>
		<comments>http://www.sonatype.com/people/2010/02/documenting-the-nexus-rest-api-with-enunciate/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 17:31:15 +0000</pubDate>
		<dc:creator>Tamas Cservenak</dc:creator>
				<category><![CDATA[Nexus]]></category>
		<category><![CDATA[Sonatype]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[enunciate]]></category>
		<category><![CDATA[nexus pro]]></category>
		<category><![CDATA[rest]]></category>

		<guid isPermaLink="false">http://www.sonatype.com/people/?p=4301</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2010/02/documenting-the-nexus-rest-api-with-enunciate/' addthis:title='Documenting the Nexus REST API with Enunciate '  ><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>Nexus OSS Core has more than 120 REST Resources published. And that number is just increasing with new Nexus Plugins. Not to mention Nexus Pro that comes with even more plugins and more REST resources.    Everything you do in Nexus, whether you use the Maven Nexus plugin or the Nexus UI, is interacting with [...]]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2010/02/documenting-the-nexus-rest-api-with-enunciate/' addthis:title='Documenting the Nexus REST API with Enunciate '  ><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><strong><a href="http://www.sonatype.com/people/wp-content/uploads/2010/01/nexus-small.png"><img class="alignright size-full wp-image-3683" title="nexus-small" src="http://www.sonatype.com/people/wp-content/uploads/2010/01/nexus-small.png" alt="" width="250" height="62" /></a>Nexus OSS Core has more than 120 REST Resources</strong> published. And that number is just increasing with new Nexus Plugins. Not to mention Nexus Pro that comes with even more plugins and more REST resources.    Everything you do in Nexus, whether you use the Maven Nexus plugin or the Nexus UI, is interacting with a REST service that is available to you if you want to write your own customizations and scripts.   It has been this way since we started the project in 2007.  In this post, I&#8217;m going to discuss how this came to be, how Nexus was developed with REST in mind from the beginning.</p>

<h3>Nexus: A Core of REST Services</h3>

<p>When we started the Nexus project, I called it a &#8220;blind&#8221; application.  A &#8220;blind&#8221; webapp is one with no UI technology whatsoever built-in.   All it publishes is a few static files, and a REST API.   All of the UI that you see in Nexus is Javascript.   Your browser executes Javascript which, in turn, interacts with a set of services.   The only presentation technology on the server side is a trivial Velocity template used to render the initial &#8220;shell&#8221; of the page.<span id="more-4301"></span></p>

<p>The server-side application you call Nexus, doesn&#8217;t generate the UI, that is all Javascript.   It is a completely separate and standalone application, that runs in your browser! A self contained JavaScript application (powered by ExtJS), that communicates with Nexus server, using REST calls only.  This has one very important consequence: whatever Nexus functionality you are able to reach using the Nexus User Interface (and I do mean <em>all</em>), you can do with a plain REST client.     If you want to automate a task, you can use a tool like <tt>curl</tt>, or some Ruby script, or any HTTP capable client.   You can even start to implement your own custom interface if you would like a completely customized UI.</p>

<p>As I said, it was like this since day one. But, we always had one major issue that prevented wider acceptance of Nexus&#8217; REST API: <strong>we had no up-to-date documentation for it</strong>.    It wasn&#8217;t a priority, we spent much of our time trying to integrate the only existing REST framework (restlet.org) with Plexus, and since we were moving so quickly to implement new features, we didn&#8217;t think it made sense to stop and document an ever-changing interface.  We did maintain a <a rel="nofollow" href="https://docs.sonatype.com/display/NX/Nexus+Rest+API">wiki page</a> which described the REST services from the beginning of the project, it always provided stale information given our aggressive development pace.</p>

<h3>REST Documentation: Using Enunciate</h3>

<p>I&#8217;ve been looking at the <a rel="nofollow" href="http://enunciate.codehaus.org/">Enunciate</a> project for some time, and it appears to be the solution to our REST document issues.  Enunciate is a cool project hosted on <a href="http://codehaus.org"><span style="color: #003366;">Codehaus</span></a>, with a bold promise:</p>

<p><em>Enunciate is designed to make your life easier. Enunciate deals with your deployment difficulties, documentation, and client-side code. By using Enunciate to publish your service interfaces, not only will you have all three Web service interfaces (SOAP, REST, and AMF), but you&#8217;ll also have full up-to-date documentation generated, strongly typed ActionScript code that you can use to invoke your remote services from your Flex code, and rich client-side libraries that can be used to access your Web services from a variety of platforms (including Mac/iPhone).</em></p>

<p>Our initial plans are to use Enunciate in a &#8220;lite&#8221; mode to <strong>generate documentation</strong> (and potentially client side code) for our current REST API. Later, we plan to integrate it more closely into new Nexus &#8220;Remoting API&#8221; implementation, and it will be the backbone of our REST services when we will implement version 2.0 of our API.</p>

<p>Here is just a taste of what is to come.  We&#8217;ve used Enunciate to generate documentation for our REST services, and the work is proceeding very quickly.   Here is a snapshot of the documentation we will be releasing soon.</p>

<p><a href="http://www.sonatype.com/people/wp-content/uploads/2010/02/tim1.png"><img class="aligncenter size-medium wp-image-4303" title="Nexus Enunciate Sample #1" src="http://www.sonatype.com/people/wp-content/uploads/2010/02/tim1-300x256.png" alt="" width="300" height="256" /></a></p>

<p><a href="http://www.sonatype.com/people/wp-content/uploads/2010/02/tim2.png"><img class="aligncenter size-medium wp-image-4304" title="Nexus Enunciate Sample #2" src="http://www.sonatype.com/people/wp-content/uploads/2010/02/tim2-300x230.png" alt="" width="300" height="230" /></a></p>

<p><a href="http://www.sonatype.com/people/wp-content/uploads/2010/02/tim3.png"><img class="aligncenter size-medium wp-image-4316" title="Enunciated Nexus REST API Sample #3" src="http://www.sonatype.com/people/wp-content/uploads/2010/02/tim3-300x263.png" alt="" width="300" height="263" /></a></p>

<h3>Remaining Problems to Solve</h3>

<p>When our REST API was concieved in Q4 of 2007 we didn&#8217;t have the rich array of options that we have today.   One major REST library was available, and that was <a rel="nofollow" href="http://www.restlet.org/">Restlet</a>.  JSR311 wasn&#8217;t around back then, so we were forced to code directly to the Restlet API.  Back in 2007, it was very cool to create Plexus components that were then automatically published as REST Resources in Nexus. But today, the same thing looks very cumbersome and is not what one would call a &#8220;state of the art&#8221;. Back then, we had these goals in mind:</p>

<ul>
    <li>have complete REST API published on Nexus</li>
    <li>have a decoupled UI application</li>
    <li>provide XML/JSON serialized transport to REST Resource without any effort, with proper content negotiation (XML was kept as &#8220;Plan B&#8221;)</li>
    <li>make our REST Resources as Plexus components (to enjoy all the benefits of IoC, and later pluggability)</li>
</ul>

<p>While we fulfilled much of these goals above, we did that at a high cost.  For a Nexus core developer (or Nexus plugin developer), it is very cumbersome to create a new REST Resource using our classes, compared to what REST libraries are available today. Current state-of-the-art REST libraries make our initial implementation seem somewhat naive (hence the need to move toward new libraries like Enunciate). Our 1st and biggest mistake was a very deep class hierarchy in our current API.  While all the &#8220;defaults&#8221; are properly configured, it is often difficult to create a non-trivial Resource in the current API if you are not intimately familiar with the system.</p>

<p>Also, in the initial design, we use XStream with a custom driver to produce JSON. Back then, it was a real pain to produce proper JSON out of Java.   Today, we have libraries like Jackson.   In the next interation of refactoring, you&#8217;ll see update the infrastructure used to produce our REST services to bring it up to speed with what is available today.</p>

<h3>The Benefits of &#8220;enunciating&#8221; a REST API</h3>

<p>At first, we will use Enunciate with Nexus during build time only, to generate HTML documentation of our REST API. This documentation will be available publicly, but will also be bundled with every Nexus instance!   Our work to modify our own REST infrastructure is going to require some &#8220;invasive&#8221; work, but I have to emphasize that Enunciate is not invasive if you use it on a modern JSR311 based REST applications. Enunciate is invasive for us only, since we are about to use it on a home grown, non-JSR311 REST application.</p>

<p>Enunciate gathers and builds your services model using your sources and all the metadata it finds (Java5 annotations, Javadoc).  To &#8220;enunciate&#8221; the Nexus REST API, we had to add JSR311 annotations to our existing REST Resources.  There was one more problem to solve: our method signatures are more &#8220;servlet like&#8221;, and they didn&#8217;t fit the model of a JSR311 REST Application. While a JSR311 application method signature completely describes the method expectations about payload, parameters, and response type, our methods – whether GET, PUT, POST or DELETE – have almost same signature: RestRequest, RestResponse, Variant. Hence, we had to add more metainformation describing what a method does: what it expects as input, if any, and what it sends out as response.</p>

<p>Luckily, it turned out that this was the only piece missing, and Enunciate was happy to generate documentation for us. Ryan added the new annotation that describes the &#8220;alternate REST Signature&#8221; of the method, and Enunciate got all the information it needed to generate documentation for us.</p>

<p>Another painful step yet to be completed is &#8220;freeing&#8221; our REST DTOs from Modello. Initially, we knew we wanted to <em>version</em> the DTOs used in REST. Hence, we used Modello to generate the DTOs. Later, problems with Modello and Restlet forced us to always use version 1.0 of our REST DTOs. Since Enunciate requires that DTOs have JAXB2 annotations, we decided to store our DTOs as code and ditch Modello in our builds.</p>

<p>All this looks like a lot of work, but it is actually pretty straightforward.   While this might seem dull to someone not developing Nexus, this work is going to bring real value once it is completed.    In addition to solving our documentation problems, Enunciate is going to open up a world of possibilities once we migrate our REST services over to the framework.</p>

<p>For more information about Enunciate, the <a rel="nofollow" href="http://docs.codehaus.org/display/ENUNCIATE/Enunciate">Enunciate Wiki</a> contains a nice example of how to use Enunciate in case like ours is, without JAX-RS. Example is shown <a rel="nofollow" href="http://docs.codehaus.org/display/ENUNCIATE/Leveraging+Enunciate+Without+JAX-*S">here</a>.  Examples of Enunciate generated documentation can be seen on it&#8217;s <a rel="nofollow" href="http://enunciate.codehaus.org/">site</a>. There is a great walk-through, with <a rel="nofollow" href="http://enunciate.codehaus.org/wannabecool/step4/index.html">static examples</a>.</p>

<h3>Expect More Changes in the Next Few Months</h3>

<p>As Nexus graduated from alphas, betas and now is at a 1.5.0 version, we realize we have to change gears to keep up. Enunciate is the 1st &#8220;newcomer&#8221; technology to Nexus stack.  There will be more to come.   Think of this as the Nexus 100,000 mile checkup.  We&#8217;re taking a look at the stack and taking this as an opportunity to upgrade where necessary.</p>

<p>One last note, this post is not about any deficiencies in Restlet.  Restlet is a great framework, and it served us well.  We – the Nexus Project team – are <strong>very thankful</strong> to Restlet.org project with all the help we got from them and for the great library they made.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sonatype.com/people/2010/02/documenting-the-nexus-rest-api-with-enunciate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why Putting Repositories in your POMs is a Bad Idea</title>
		<link>http://www.sonatype.com/people/2009/02/why-putting-repositories-in-your-poms-is-a-bad-idea/</link>
		<comments>http://www.sonatype.com/people/2009/02/why-putting-repositories-in-your-poms-is-a-bad-idea/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 19:30:34 +0000</pubDate>
		<dc:creator>Brian Fox</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[Sonatype]]></category>
		<category><![CDATA[best practice]]></category>
		<category><![CDATA[Book]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[Nexus]]></category>
		<category><![CDATA[repository]]></category>

		<guid isPermaLink="false">http://www.sonatype.com/people/?p=1647</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2009/02/why-putting-repositories-in-your-poms-is-a-bad-idea/' addthis:title='Why Putting Repositories in your POMs is a Bad Idea '  ><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>I get this question frequently so it is time to write down my thoughts on the answer so I can stop repeating myself. Here&#8217;s the question: Should I put the urls to my repositories in my poms or in my settings? The short answer is: settings. The long answer is: it depends. There are two [...]]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2009/02/why-putting-repositories-in-your-poms-is-a-bad-idea/' addthis:title='Why Putting Repositories in your POMs is a Bad Idea '  ><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>I get this question frequently so it is time to write down my thoughts on the answer so I can stop repeating myself.  Here&#8217;s the question:</p>

<p><em>Should I put the urls to my repositories in my poms or in my settings?</em></p>

<p>The short answer is: <em>settings</em>.</p>

<p>The long answer is: <em>it depends</em>.</p>

<p>There are two scenarios to consider here. Enterprise software (generally not published externally) and public software. Lets take Enterprise software first.   Continue reading this post for a full explanation of both scenarios.
<span id="more-1647"></span></p>

<h2>Enterprise</h2>

<p>In an Enterprise scenario, you will typically want to have a repository manager like <a href="http://www.sonatype.com/products/nexus">Nexus</a> sitting on your front lines. It will be proxying all external repositories and hosting your internal ones.</p>

<p>When Maven looks for an artifact, it walks down the list of repositories defined in the POMs and settings until it finds what it wants. If you define your repository manager as a repository in your POMs Maven will still fall back to the built-in Central repository when artifacts are not found in the repository manager.</p>

<p>One possible solution to this is to overload the &#8220;central&#8221; repository id and point this at your repository manager. This can work, but you would want to do this in your corporate pom so you don&#8217;t need to define it in every project you have. Once you&#8217;ve overloaded &#8220;central&#8221;, you have a <a href="http://en.wikipedia.org/wiki/Catch-22">&#8220;Catch-22&#8243;</a>. In a clean environment, you need to know where the repository is to find the parent POM &#8212; to tell you where the repository is. You will end up having to define this repository in your settings anyway just to bootstrap.</p>

<p>Simply redefining Central has a few other problems. Specifically, it doesn&#8217;t redirect repositories that may be defined in other POMs you include transitively. This causes a few problems: first, it will slow down your builds as Maven goes out to all the external repositories looking for artifacts&#8230;possibly even your internal ones that would never be found there.  Second, it means something may build for one developer but not another.  Third, it means as an organization you have no idea where your artifacts are coming from.</p>

<p>As an organization, you generally will want all your developers using the same set of repositories for their builds, and make all requests via a controlled mechanism. This is best accomplished with a mirrorOf * entry in your settings to redirect all lookup requests to your repository manager. It is not possible to define a mirrorOf in a POM. See this section of the <a href="http://www.sonatype.com/books/nexus-book/reference/maven-sect-single-group.html">Nexus Book</a> for examples of what a good setup will look like.</p>

<p>With all these things considered, you can see that defining the repositories in your poms doesn&#8217;t really help you much and generally just gets in the way.</p>

<p>This all presumes that your artifacts are not consumed externally. If they are, then you also fall into the next category. (They are not mutually exclusive)</p>

<h2>Open Source Projects</h2>

<p>If you are publishing your software and others will check it out and build it, then there are more points to consider. If all your dependencies are available in the Central repository, then you have nothing else to do. If however, you have artifacts that may exist only in your repository <em>(think snapshots of your parent POMs)</em>, or other third party repos, then developers will have a hard time building your source.  Only in this case does it make sense to add repository entries to your POMs. However, there are side effects to this that should be noted:</p>

<ul>
    <li>The entries you have defined will be <strong>burned forever</strong> into your released POMs. This means that, should the URLs change down the road, anyone consuming your POMs will face these broken URLs and have to track down the new ones manually.</li>
    <li>Each of these entries will end up in your consumer&#8217;s builds since Maven needs to check them all for missing dependencies. Maven currently isn&#8217;t able to tell when you introduce a repository which dependencies are supposed to be found there (and it gets worse when you consider transitivity).</li>
</ul>

<p>If the product of your build is a tool (like Nexus) rather than components used as dependencies, then adding the repository to the POM is fairly safe. In this case, it is unlikely others will depend on your artifacts directly in some other build, and the above concerns are nullified since presumably the new source would have the correct repository URLs.</p>

<p>If you are publishing jars that will be consumed by others, then you should think about getting them synced to the Central repository. This means that they will always be available to all users no matter what happens to your repository or URLs, and you won&#8217;t accidentally introduce new repositories to their builds.   Central will eventually reject POMs with repository elements for this reason.</p>

<h2>Summary</h2>

<p>So to sum up, if you want to have repeatable builds and good control over your organization internally, use a repository manager and use a mirrorOf entry in everyone&#8217;s settings.xml to point at that url.</p>

<p>If you are exposing your source and want to make it easy for others to build, then consider adding a repository entry to your POM, but don&#8217;t pick a URL lightly, think long-term, and use a URL that will always be under your control.  If your URL has to change down the road, make sure that you will always be able to track 404s and write the appropriate mod_rewrite rules to ensure that future builds will be able to find the appropriate artifacts.</p>

<p><strong>PS</strong>. If you got here from the Jfrog blog, then I suggest you read my <a title="response" href="http://java.dzone.com/articles/why-nexus-and-not-artifactory">response</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sonatype.com/people/2009/02/why-putting-repositories-in-your-poms-is-a-bad-idea/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Galoppini Covers Sonatype&#039;s Open Documentation</title>
		<link>http://www.sonatype.com/people/2009/02/galoppini-covers-sonatypes-open-documentation/</link>
		<comments>http://www.sonatype.com/people/2009/02/galoppini-covers-sonatypes-open-documentation/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 21:40:57 +0000</pubDate>
		<dc:creator>Tim O'Brien</dc:creator>
				<category><![CDATA[Book]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[press]]></category>

		<guid isPermaLink="false">http://www.sonatype.com/people/?p=1619</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2009/02/galoppini-covers-sonatypes-open-documentation/' addthis:title='Galoppini Covers Sonatype&#039;s Open Documentation '  ><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>Roberto Galoppini just published a brief interview with Mark de Visser this morning which covers Sonatype&#8217;s open documentation efforts. As someone who has been involved with Sonatype&#8217;s open book efforts along with Jason, Brian, John, Jason, Bruce, and our other contributing authors it is interesting to see the traffic and interest that is generated by [...]]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2009/02/galoppini-covers-sonatypes-open-documentation/' addthis:title='Galoppini Covers Sonatype&#039;s Open Documentation '  ><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>Roberto Galoppini just <a href="http://robertogaloppini.net/2009/02/21/open-source-documentation-issue-maven-the-definitive-guide-the-sonatype-approach/">published a brief interview with Mark de Visser this morning</a> which covers Sonatype&#8217;s open documentation efforts.   As someone who has been involved with Sonatype&#8217;s open book efforts along with Jason, Brian, John, Jason, Bruce, and our other contributing authors it is interesting to see the traffic and interest that is generated by something as simple as free documentation.  I&#8217;ve long been a big believer that books about open source software should be as free as the software itself, and I&#8217;m also convinced that solid documentation is a necessary foundation for a vibrant open-source community.   Without a good &#8220;free&#8221; book, it is nearly impossible for an open source project to grow a community.
<span id="more-1619"></span>
Here&#8217;s an excerpt where Mark discusses our relationship with O&#8217;Reilly, and how we&#8217;re currently trying to find ways to get our books into print format via print-on-demand.</p>

<blockquote><b>Mark de Visser:</b> Our publisher, O’Reilly, has been an invaluable part of the success of Maven: The Definitive Guide. When you write a book, you usually deliver a product to the production department of a publisher and that publisher prints a few thousand copies which are distributed to a network of book sellers and intermediaries. Once you deliver the manuscript, both the content and the community are out of your hands. This “dead-tree model” of publishing is as antiquated as it is impersonal, and, with the Maven book, we saw a chance to break the cycle and work with a publisher like O’Reilly who is very open to the idea of publishing a freely available book. Our editor, Mike Loukides, wasn’t hesitant at all to agree to publish a free book and talked about the success they have had with books like the Subversion book and the Asterisk book, both of which were free but generated a great deal of print sales. We will jointly evaluate options to deliver print-on-demand versions of the print books, which match closer to the dynamic nature of our constantly updated online books.</blockquote>

<p><a href="http://robertogaloppini.net/2009/02/21/open-source-documentation-issue-maven-the-definitive-guide-the-sonatype-approach/">Read more of Galoppini&#8217;s Interview at his blog &#8220;Commercial Open Source Software&#8221;</a></p>

<p>Not only are we interested in pursuing less traditional avenues such as print-on-demand, we&#8217;re currently evaluating some of the more open electronic book formats such as ePub.   Since our documentation is written in the DocBook XML format, there are some fairly straightforward open source projects designed to create ePub output from a standard DocBook or DITA document.  Stay tuned.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sonatype.com/people/2009/02/galoppini-covers-sonatypes-open-documentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>We&#039;re Taking Requests</title>
		<link>http://www.sonatype.com/people/2009/02/were-taking-requests/</link>
		<comments>http://www.sonatype.com/people/2009/02/were-taking-requests/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 14:56:31 +0000</pubDate>
		<dc:creator>Tim O'Brien</dc:creator>
				<category><![CDATA[Book]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[support]]></category>
		<category><![CDATA[videos]]></category>

		<guid isPermaLink="false">http://blogs.sonatype.com/people/?p=1546</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2009/02/were-taking-requests/' addthis:title='We&#039;re Taking Requests '  ><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>Are you having problems with a particularly crazy Maven build?  Is there a part of Maven that you just don&#8217;t have a handle on, even after reading and rereading The Definitive Guide or the Apache Maven site?    We&#8217;re here to support the community, and Sonatype is serious about helping to invest in the foundational, [...]]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2009/02/were-taking-requests/' addthis:title='We&#039;re Taking Requests '  ><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>Are you having problems with a particularly crazy Maven build?  Is there a part of Maven that you just don&#8217;t have a handle on, even after reading and rereading <a href="http://books.sonatype.com/maven-book">The Definitive Guide</a> or the Apache Maven site?    We&#8217;re here to support the community, and Sonatype is serious about helping to invest in the foundational, open-source documentation that will help the community around Maven grow and evolve.    I&#8217;m biased because I focus on documentation, but I&#8217;ve always thought that good documentation makes the difference between open source projects that evolve over time and open source projects that fade into obscurity.   The docs are the interface to the community, and as widespread as Maven is, there are still people adopting the tool and learning from step 1.    If you have any requests for documentation, we&#8217;d encourage you to let us know.</p>

<ol>
    <li>Get Satisfaction, if you have a request for documentation let us know through our <a href="http://getsatisfaction.com/sonatype">Get Satisfaction</a> page.</li>
    <li>If you have a request for a video, create an account at Vimeo and make a request via our <a href="http://www.vimeo.com/sonatype">Vimeo Profile</a>.</li>
    <li>Send a message to <a href="mailto:book@sonatype.com">book@sonatype.com</a></li>
</ol>

<p>We encourage you to make the request via a public channel such as Get Satisfaction or Vimeo because it will provide the best community feedback and accountability.   Get Satisfaction is an interesting customer service experiment, it isn&#8217;t merely a company-driven customer service site, it is an experiment in transparent and accountable customer-driven service.   When you ask us a question on Get Satisfaction, the questions and answers are visible to everyone.   If you have an idea for documentation, please feel free to share it with us. We&#8217;re taking requests.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sonatype.com/people/2009/02/were-taking-requests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Second Printing of Maven: The Definitive Guide</title>
		<link>http://www.sonatype.com/people/2009/01/second-printing-of-maven-the-definitive-guide/</link>
		<comments>http://www.sonatype.com/people/2009/01/second-printing-of-maven-the-definitive-guide/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 08:58:40 +0000</pubDate>
		<dc:creator>Tim O'Brien</dc:creator>
				<category><![CDATA[Book]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[oreilly]]></category>

		<guid isPermaLink="false">http://blogs.sonatype.com/people/?p=1043</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2009/01/second-printing-of-maven-the-definitive-guide/' addthis:title='Second Printing of Maven: The Definitive Guide '  ><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>Good news, O&#8217;Reilly has just completed the Second Printing of Maven: The Definitive Guide. Aside from some typos and some small updates to the test, there is not much a difference between the first edition and the second edition, and I feel confident that the core concepts of Maven and the introductory material in the [...]]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://www.sonatype.com/people/2009/01/second-printing-of-maven-the-definitive-guide/' addthis:title='Second Printing of Maven: The Definitive Guide '  ><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>Good news, O&#8217;Reilly has just completed the Second Printing of Maven: The Definitive Guide.  Aside from some typos and some small updates to the test, there is not much a difference between the first edition and the second edition, and I feel confident that the core concepts of Maven and the introductory material in the book will age well over time.  Whenever a publisher decides to publish a book on a fast moving topic like Maven they always ask you to justify how the content will age.  Will it grow quickly irrelevant?  Or, will the content remain viable for a few years?</p>

<p>With Maven: The Definitive Guide, I&#8217;m convinced that the core material&#8230; the lifecycle, binding plugin goals to lifecycle phases, plugins.  All of these things are mature concepts which are not likely to be deprecated in future versions of Maven.  While the Maven team continues to evolve with projects like Mercury and Tycho, the core of this pivotal tool remains a solid bedrock for this documentation effort.  No one is going to &#8220;reinvent&#8221; the idea of the Lifecycle during the transition between Maven 2.0 and Maven 3.</p>

<p>If you haven&#8217;t picked up a copy yet, <a href="http://www.amazon.com/gp/product/0596517335/ref=cm_rdp_product_img">buy one from Amazon</a>.  I tend to find it easier to just <a href="http://www.amazon.com/gp/product/0596517335/ref=cm_rdp_product_img">pick up a book</a> and read it away from the computer and away from the distractions of twitter and email.  There&#8217;s also something about being able to dog-ear and highlight a physical book that cannot be replicated on a computer screen.</p>

<div style="text-align:center;"><img src="http://blogs.sonatype.com/people/wp-content/uploads/2008/12/book-large.jpg" border="0" alt="book_large.jpg" width="300" height="300" /></div>

<p>Thanks to all of the people who purchased a copy of the book, and thank you to all of the people who have taken the time to report issues and suggestions to <a href="http://getsatisfaction.com/sonatype/products/sonatype_maven_the_definitive_guide">our GetSatisfaction page</a> for the book.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sonatype.com/people/2009/01/second-printing-of-maven-the-definitive-guide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

