<?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"
	>

<channel>
	<title>Sonatype Blog</title>
	<atom:link href="http://blogs.sonatype.com/people/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blogs.sonatype.com/people</link>
	<description>State-of-the-Art Build Production for the Modern Software Enterprise</description>
	<pubDate>Wed, 07 Jan 2009 00:12:29 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
	<language>en</language>
			<item>
		<title>Now Playing: Grails 1.1b2 w/ &#8220;Improved Maven Support&#8221;</title>
		<link>http://blogs.sonatype.com/people/2008/12/now-playing-grails-11b2-with-improved-maven-support/</link>
		<comments>http://blogs.sonatype.com/people/2008/12/now-playing-grails-11b2-with-improved-maven-support/#comments</comments>
		<pubDate>Sat, 27 Dec 2008 23:11:04 +0000</pubDate>
		<dc:creator>tim</dc:creator>
		
		<category><![CDATA[Community]]></category>

		<category><![CDATA[Maven]]></category>

		<category><![CDATA[g2one]]></category>

		<category><![CDATA[grails]]></category>

		<category><![CDATA[groovy]]></category>

		<category><![CDATA[springsource]]></category>

		<guid isPermaLink="false">http://blogs.sonatype.com/people/?p=1344</guid>
		<description><![CDATA[Graeme Rocher has never been a fan of Maven, and (as far as I can tell) he still isn&#8217;t.     In &#8220;Grails &#38; Maven Kiss and Make-up with Grails 1.1 Beta 2&#8220;, Graeme writes:

So Grails 1.1 Beta 2 is out. Rejoice! There are many new features that are detailed in the release notes. However, one [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-1346" title="grails" src="http://blogs.sonatype.com/people/wp-content/uploads/2008/12/grails.png" alt="" width="208" height="64" />Graeme Rocher has never been a fan of Maven, and (as far as I can tell) he still isn&#8217;t.     In &#8220;<a href="http://graemerocher.blogspot.com/2008/12/grails-maven-kiss-and-make-up-with.html">Grails &amp; Maven Kiss and Make-up with Grails 1.1 Beta 2</a>&#8220;, Graeme writes:</p>

<blockquote>So <a href="http://grails.org/">Grails</a> 1.1 Beta 2 is out. Rejoice! There are many new features that are detailed in the r<a href="http://grails.org/1.1-Beta2+Release+Notes">elease notes</a>. However, one of the main ones in this beta is the new support for <a href="http://maven.apache.org/">Maven</a>&#8230;.Regular readers of my blog will probably be aware of my long history as one who, ahem, is not particularily fond of Maven. Granted I am <span style="font-weight: bold;">still</span> not [particularly] fond of Maven, but it is the Christmas period and in the spirit of &#8220;why can&#8217;t we all just get [along]&#8221; I am proud to say that Grails <a href="http://grails.org/Maven+Integration">integrates nicely with Maven</a> now <img src='http://blogs.sonatype.com/people/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </blockquote>

<p><span style="color: #ff0000;">Merry</span> <span style="color: #008000;">Christmas</span>, indeed.
<span id="more-1344"></span></p>

<p>
In the same spirit of &#8220;why can&#8217;t we all just get along&#8221;, I&#8217;ve had a similar shift in my opinion of Groovy over the years, I used to talk about Groovy as the wrong choice when compared to something like Jython or JRuby, but after having used Groovy in a number of projects, I ready to admit defeat.  While I&#8217;m still interested in Java inoperability with Ruby and Python, it is often much more straightforward to use Groovy than it is to deal with the &#8220;impedance mismatch&#8221; between something like JRuby and Java.  Groovy has turned into a mature and valuable language that offers tight integration with the JVM thanks to the continued efforts of Graeme and Guillame at G2One (recently acquired by SpringSource).</p>

<p><a href="http://groovy.codehaus.org/GMaven">GMaven</a> provides a great option for people interested in <a href="http://groovy.codehaus.org/GMaven+-+Implementing+Maven+Plugins">writing Maven Plugins in Groovy</a> and also as a quick way to extend a Maven build with a Groovy script.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sonatype.com/people/2008/12/now-playing-grails-11b2-with-improved-maven-support/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Central Maven Repository Traffic: Using S3</title>
		<link>http://blogs.sonatype.com/people/2008/12/central-maven-repository-taffic-using-s3/</link>
		<comments>http://blogs.sonatype.com/people/2008/12/central-maven-repository-taffic-using-s3/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 18:00:02 +0000</pubDate>
		<dc:creator>brian</dc:creator>
		
		<category><![CDATA[Community]]></category>

		<category><![CDATA[Maven]]></category>

		<category><![CDATA[Nexus]]></category>

		<category><![CDATA[central]]></category>

		<category><![CDATA[repository]]></category>

		<guid isPermaLink="false">http://blogs.sonatype.com/people/?p=1318</guid>
		<description><![CDATA[Yesterday, in Central Maven Repository Traffic: Investigation and Analysis, I wrote about the analysis involved in tracking down the increasing load on Central. By identifiying some misbehaving tools, we were able to reduce the traffic from a 98 Mbps average down to 60-80 Mbps.  In this post, I discuss the next step toward a Central [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-thumbnail wp-image-1330" title="central-maven1" src="http://blogs.sonatype.com/people/wp-content/uploads/2008/12/central-maven1.png" alt="" width="137" height="138" />Yesterday, in <a href="http://blogs.sonatype.com/people/?p=1299">Central Maven Repository Traffic: Investigation and Analysis</a>, I wrote about the analysis involved in tracking down the increasing load on Central. By identifiying some misbehaving tools, we were able to reduce the traffic from a 98 Mbps average down to 60-80 Mbps.  In this post, I discuss the next step toward a Central Maven repository that can scale to meet the load generated by the millions of developers using an ecosystem of tools which rely on the Central Maven Repository.<span id="more-1318"></span></p>

<h2>Where We Left Off&#8230;</h2>

<p>As a refresher, here&#8217;s what the load looked like at the end.   To summarize, Central was experience load problems on httpd, we subsequently moved to Nginx which fixed the load problem but caused us to regularly saturate a 100 Mbps pipe.   After a few weeks of investigation, we discovered that much of the traffic was due to a misconfigured product that was repeatedly downloading the Nexus index.   We notified the responsible project and blocked access to the index until the problem was fixed.   The end product of all of that work was a Central Maven Repository that had fewer saturation events and which was operating in a consistent 60-80 Mbps range in the middle of a work week.</p>

<div style="text-align:center;"><img class="aligncenter size-full wp-image-1308" title="toolblocked1" src="http://blogs.sonatype.com/people/wp-content/uploads/2008/12/toolblocked1.png" alt="" width="499" height="153" /></div>

<p>We still experienced significant amounts of traffic on Monday morning as users fired up <a href="http://m2eclipse.sonatype.org">M2Eclipse</a> and downloaded the updated weekly index. We tried shifting the index creation from Sunday night to Friday afternoon, to help smooth out some traffic over the weekend, but ultimately this didn&#8217;t help much. We ended up having to QOS the transfers of the zip down to something like 30 kbps to keep the rest of the repository available during these loads. This wasn&#8217;t a great solution as it significantly increased the time for users to get at the index.</p>

<p><img class="aligncenter size-full wp-image-1333" title="weeklyindex1" src="http://blogs.sonatype.com/people/wp-content/uploads/2008/12/weeklyindex1.png" alt="" width="499" height="156" /></p>

<h2>Considering Amazon S3</h2>

<p>One of the ideas we had been persuing was to use <a href="http://aws.amazon.com/s3/">Amazon S3</a> to host central. For those of you unfamiliar with S3, it is a Cloud based system for storing and serving data and it is a part of the Amazon Web Services products (EC2, S3, Cloudfront).  The nearly unlimited bandwidth and option to use Cloudfront to bring the data physically closer to the users is a definite bonus.   It was clear to us that we need something that could scale indefinitely as we continue to see increased adoption of tools that rely on the Central Repository.  The drawback with S3, is that we don&#8217;t have a direct ability to monitor the traffic and uncover any abuse or misconfigured tools like we do now.   We all agreed that moving to something like S3 was the future.</p>

<p>Despite our <a href="http://blogs.sonatype.com/people/?p=988">frequent pleas <strong></strong>to use Repository Managers and not scrape the repo</a>, we continue to find people doing just that nearly every day. The bandwidth on S3 is not free and opening it up without the ability to protect the bottom line from abusers is not a great idea.    Once you start designing systems on an Internet Scale you start to realize that bandwidth isn&#8217;t free.</p>

<h2>Moving to &#8220;The Cloud&#8221;: Amazon S3</h2>

<p>We decided first to take baby steps and see if S3 could help us with a very specific problem: The index downloads.   Instead of downloading multiple GB of repository data and creating an index locally, we think it makes more sense for people and tools to download a repository index once a week.   This index weighs in at 30 MB, and while that might not seem to be very large at first glance&#8230; multiply 30 MB by 50,000 downloads, and you&#8217;ll quickly start to serve TB of data.  This is exactly what was happening, and it seemed like an easy target to offload to Amazon S3.</p>

<p>We found a handy Ruby script called <a href="http://s3sync.net/wiki">S3Sync</a> that we use to synchronize the maven2/.index folder over to a &#8220;repo1.maven.org&#8221; bucket on S3. Nginx is then configured to send temporary redirects (302) for all /.index/ requests over to S3. By doing this, we are still able to manage traffic to the Index, yet offload the bulk of the data transfer to the S3 network.</p>

<p>So how did it work? Unbelievably well. Take a look at the week prior to the shift to S3 and week after the shift to S3:<img class="aligncenter size-full wp-image-1334" title="indextos31" src="http://blogs.sonatype.com/people/wp-content/uploads/2008/12/indextos31.png" alt="" width="499" height="160" /></p>

<p>Take a look at the Weekly traffic before the switch to S3, realizing that the weekly traffic numbers mask the periodic 100 Mbps saturation that we were seeing in the hourly graphs. A new index was published, and we saw a spike of download activity during the morning of December 1st.   After that our weekly traffic gradually diminishes to a background level of between 40 Mbps and 80 Mbps on an average weekday.     Again, note that even those good days had periods of complete saturation, after blocking the offending tools we saw an improvment, but we wanted to offload the bulk of our index downloads to S3 to gain further improvements.<img class="aligncenter size-full wp-image-1335" title="befores31" src="http://blogs.sonatype.com/people/wp-content/uploads/2008/12/befores31.png" alt="" width="499" height="218" /></p>

<p>Now, take a look at the weekly traffic graph after moving the index to S3.   Unless you note the difference in Y Axis scale, this might not seem as impressive.    The number we&#8217;re most interested in decreasing is the 95th percentile value, it describes the 5-minute average bandwidth which 95% of our traffic falls within.      If our 95th percentile number is very close to 100 MBps it means that we&#8217;re likely to saturate the 100 MBps quite often.   If our 95th percentile is down around 20 MBps, we&#8217;re much more likely to have a stable and available repository.  After moving the index to S3, we have a 5x decrease in the 95th percentile from 98.7 MBps to 12.3 MBps.   We went from a weekly bandwith average of 49.28 MBps to 8.24 MBps, and our total transfer for the week went from 3.81 TB to 629.7 GB.<img class="aligncenter size-full wp-image-1336" title="afters31" src="http://blogs.sonatype.com/people/wp-content/uploads/2008/12/afters31.png" alt="" width="499" height="216" /></p>

<p>Before moving the index to S3, we were suffering from slow response times and an index download which would take a few minutes during peak traffic.   After we moved the index to S3, response times improved by 300%, and the index download now takes a few seconds to complete.   Just moving the index to S3 yielded dramatic improvements for the Central Maven Repository.</p>

<h2>The Result: Greater Speed, Higher Availability</h2>

<p><strong>In the 2 weeks since we moved the index to S3 it has served over 4TB of data and 730,000 requests!</strong> Even though the bandwidth bill for the S3 service is significant, we estimate it to be half of what we save on the Central connection traffic.    In other words, we&#8217;ve increase availability and reduced the overhead costs associated with the Central Maven Repository.</p>

<p><span style="color: #ff0000;"><em>A note of caution:</em></span> To protect the system from abuse, we may have to change the urls on S3 from time to time, so don&#8217;t point directly at the S3 url, continue to request the data from Central and you&#8217;ll be ok.</p>

<p>We won&#8217;t stop here in finding ways to optimize the repository experience for users. One thing that will be rolled out shortly is Incremental Index support. This will enable tools that use the Nexus Indexer API to grab only chunks of the index that have changed. This should have a significant impact again on the amount of traffic. We also continue to investigate the possibility of leveraging the cloud to host the entire repository so stay tuned.</p>

<p><em><strong>Note:</strong> If you liked the screenshots used in these past two entries, check out <a href="http://www.jingproject.com">Jing Project</a>. Jing is a great free and easy to use tool for capturing screen images or videos and marking them up. Both OSX and Windows versions are available.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sonatype.com/people/2008/12/central-maven-repository-taffic-using-s3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Feedback on the Nexus 1.2 Release</title>
		<link>http://blogs.sonatype.com/people/2008/12/feedback-on-the-nexus-12-release/</link>
		<comments>http://blogs.sonatype.com/people/2008/12/feedback-on-the-nexus-12-release/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 17:19:05 +0000</pubDate>
		<dc:creator>tim</dc:creator>
		
		<category><![CDATA[Community]]></category>

		<category><![CDATA[Nexus]]></category>

		<category><![CDATA[feedback]]></category>

		<category><![CDATA[Maven]]></category>

		<guid isPermaLink="false">http://blogs.sonatype.com/people/?p=1322</guid>
		<description><![CDATA[Some good feedback from Henri Gomez From the nexus-user mailing list on December 23rd:

We [had] a major crash on Archiva 1.1.3 after our Linux SLES VMWARE partition has been upgraded.  We couldn&#8217;t get it to work with Sun JDK 1.5 / 1.6 (seems to be a major problem with Linux/Sun JDK/VMWare) and Archiva didn&#8217;t support [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;"><img class="alignright size-thumbnail wp-image-1323" title="nx-big_large1" src="http://blogs.sonatype.com/people/wp-content/uploads/2008/12/nx-big_large1.png" alt="" width="100" height="100" />Some good feedback from Henri Gomez From the <a href="http://nexus.sonatype.org/mailing-list-user-archives.html#nabble-f34835">nexus-user mailing list</a> on December 23rd:</p>

<blockquote><em>We [had] a major crash on Archiva 1.1.3 after our Linux SLES VMWARE partition has been upgraded.  We couldn&#8217;t get it to work with Sun JDK 1.5 / 1.6 (seems to be a major problem with Linux/Sun JDK/VMWare) and Archiva didn&#8217;t support IBM JDK.</em>

<em>I had to switch to Nexus 1.2.0.2 and after 4 hours of works, it just works great.</em>

<em>Nexus WAR 1.2.0.2, Tomcat 6.0.18 and IBM JDK 6.0 and everything works now fluently.</em>

<em>A big thanks to all Nexus developers and thanks also to made it available as a simple webapp.</em></blockquote>

<p>While we think it takes less than 4 hours to install Nexus, Henri was probably taking his time to preserve data from his old Archiva installation.   If you are interested in Sonatype Nexus, you can <a href="http://nexus.sonatype.org">download the 1.2.0.2 release</a> and get started today.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sonatype.com/people/2008/12/feedback-on-the-nexus-12-release/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Central Maven Repository Traffic: Investigation and Analysis</title>
		<link>http://blogs.sonatype.com/people/2008/12/central-maven-repository-traffic-investigation-and-analysis/</link>
		<comments>http://blogs.sonatype.com/people/2008/12/central-maven-repository-traffic-investigation-and-analysis/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 16:13:08 +0000</pubDate>
		<dc:creator>brian</dc:creator>
		
		<category><![CDATA[Community]]></category>

		<category><![CDATA[Maven]]></category>

		<category><![CDATA[central]]></category>

		<category><![CDATA[Nexus]]></category>

		<category><![CDATA[repository]]></category>

		<guid isPermaLink="false">http://blogs.sonatype.com/people/?p=1299</guid>
		<description><![CDATA[For several months starting in August, the use of the Maven Central Repository has seen a dramatic increase in traffic.  This is a great indicator of the adoption of Maven and other tools that recognize the value of a shared binary repository. It also set in motion a series of upgrades and changes required to [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-thumbnail wp-image-1301" title="central-maven" src="http://blogs.sonatype.com/people/wp-content/uploads/2008/12/central-maven.png" alt="" width="137" height="138" />For several months starting in August, the use of the Maven Central Repository has seen a dramatic increase in traffic.  This is a great indicator of the adoption of Maven and other tools that recognize the value of a shared binary repository. It also set in motion a series of upgrades and changes required to keep the system going strong for everyone.   We&#8217;re written about <a href="http://blogs.sonatype.com/people/?p=966">some of the steps we&#8217;ve taken</a> in the last few months to <a href="http://blogs.sonatype.com/people/?p=988">preserve Maven Central</a> as a public resource, and I wanted to provide more details for those of you who are interested in the numbers behind these changes.</p>

<p>The first change occurred in August, when we moved Central to a new 100 Mbps connection. This temporarily solved most of our availability problems, but the load continued to increase and Central started running out of httpd worker threads. For a while we played a cat and mouse game of bumping up the workers.  Read on to find out how we ultimately solved this problem and made Central more stable and available for the world of developers it serves.</p>

<p><img class="aligncenter size-full wp-image-1304" title="centraloldconnection1" src="http://blogs.sonatype.com/people/wp-content/uploads/2008/12/centraloldconnection1.png" alt="" width="499" height="158" /></p>

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

<h2>Moving to Nginx</h2>

<p>As I previously reported, increasing the number of workers to the required level caused the CPU load on the machine to climb to well over 200 (on a 4 processor machine, this means it was 50x overloaded). On a tip, we investigated and migrated to <a href="http://nginx.net/">Nginx</a>, a remarkably fast and efficient http server optimized for static content. This immediately solved our load issue, dropping the load to an average of .05 instead of 200 during high traffic.   You can&#8217;t get much better than that.</p>

<p>The next issue we faced was that Nginx was so efficient at serving the content, that the connection was getting saturated, causing packet loss and connection timeouts.  We were easily filling up our 100 Mbps pipe as traffic to Central continued to climb from August 2008 to November 2008.   This next weekly graph hides the problem, it shows the &#8220;average&#8221; bandwidth used over an hour, but it conveys the trend. </p>

<p><img class="aligncenter size-full wp-image-1305" title="centralnewconnection1" src="http://blogs.sonatype.com/people/wp-content/uploads/2008/12/centralnewconnection1.png" alt="" width="499" height="155" /></p>

<h2>Isolating the Hourly &#8220;Spikes&#8221;</h2>

<p>If you zoom into this graph you&#8217;ll see that 5-minute averages showed a saturated 100 Mbps pipe every hour on the hour. The problem needed an immediate solution, a saturated pipe for 10-15 minutes every hour translates to refused connections, slow transfers, and unhappy users.</p>

<p><img class="aligncenter size-full wp-image-1306" title="hourlies1" src="http://blogs.sonatype.com/people/wp-content/uploads/2008/12/hourlies1.png" alt="" width="499" height="156" /></p>

<p>These hourly spikes took a long time to isolate, and they were not confined to the regular work week.  They continued around the clock - 7 days a week. On Thanksgiving (between Turkey and Pumpkin Pie), I really dug into the logs. The source was not coming from any single location that was easily identifiable, rather it seemed to be a distributed, coordinated &#8220;attack&#8221; on the system. We looked closer at the files being accessed and determined that the Nexus Index zip file was a lion&#8217;s share of the traffic. Given that it is one of the larger files in the repo at 28mb, it wasn&#8217;t really abnormal but was it the target of the hourly spikes? To find out, I moved the index.zip out of the way for 1 minute two separate times during the spike:</p>

<p><img class="aligncenter size-full wp-image-1307" title="indexblock1" src="http://blogs.sonatype.com/people/wp-content/uploads/2008/12/indexblock1.png" alt="" width="499" height="152" /></p>

<h2>A Culprit Identified&#8230;</h2>

<p>Moving the index.zip decreased the duration of the spike. Finally, we had a target to analyze. Looking closer now at this file, we uncovered many IPs downloading the zip multiple times a day&#8230; (one extreme case was download this file every 2 minutes!). All the suspicious requests were using a generic Jakarta user agent so we knew it wasn&#8217;t Nexus.  (Nexus defines a User-Agent, you should too.) We started looking into other tools that might use the index and found the culprit. One tool had a bug that caused it to ignore the properties file and the timestamp on the zip and download the full zip every time a request was made. Worse, the default configuration had every instance grabbing the file every 5 hours exactly on the hour even though the file only changes once a week. Account for clock drift and it perfectly explains the hourly spikes from distributed sources.</p>

<p>Now that we identified the source of the problem, we were able to block it from getting the index until the tool was fixed. Implementing the block had an immediate effect:</p>

<p><img class="aligncenter size-full wp-image-1308" title="toolblocked1" src="http://blogs.sonatype.com/people/wp-content/uploads/2008/12/toolblocked1.png" alt="" width="499" height="153" /></p>

<h2>Problem Solved</h2>

<p>The traffic fell off to almost nothing, what you would expect on a holiday weekend. Notice that once an updated index was published, the traffic spike returned for a bit, but the overall ambient traffic was back to ~60-80 Mbps instead of the 98 Mbps that had been the norm over the preceeding months.   This was the impetus for Tim&#8217;s earlier blog entries on <a href="http://blogs.sonatype.com/people/?p=977">Efficient Downloads of the Nexus Index</a> and <a href="http://blogs.sonatype.com/people/?p=988">Installing a Repository Manager</a>.    </p>

<p>60-80 Mbps is certainly better than intermittent spikes to 100 Mbps and people suffering from slow downloads, but we continued to crack at the problem to try to increase availability and reduce bandwidth even further.  Tomorrow, I&#8217;ll talk about how we have reduced the traffic on Central from 80 Mbps down to 14 Mbps.   The solution might surprise you.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sonatype.com/people/2008/12/central-maven-repository-traffic-investigation-and-analysis/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Sonatype Nexus Maven Repository Manager 1.2 Released</title>
		<link>http://blogs.sonatype.com/people/2008/12/sonatype-nexus-maven-repository-manager-12-released/</link>
		<comments>http://blogs.sonatype.com/people/2008/12/sonatype-nexus-maven-repository-manager-12-released/#comments</comments>
		<pubDate>Mon, 22 Dec 2008 16:25:39 +0000</pubDate>
		<dc:creator>brian</dc:creator>
		
		<category><![CDATA[Maven]]></category>

		<category><![CDATA[News]]></category>

		<category><![CDATA[Nexus]]></category>

		<category><![CDATA[nexus index]]></category>

		<category><![CDATA[plugins]]></category>

		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://blogs.sonatype.com/people/?p=1063</guid>
		<description><![CDATA[The Nexus 1.2.0.2 release is available for download. This release improves upon the architectural enhancements started in 1.1 for plugins.  1.2.0 also provides for greater manageability and customization of the embedded Jetty server, support for incremenetal Nexus indexes, and support for plugins.  To download this 1.2.0 release go to http://nexus.sonatype.org.  Here is an quick overview [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-1287" title="nx-big_large" src="http://blogs.sonatype.com/people/wp-content/uploads/2008/12/nx-big_large.png" alt="" width="100" height="100" />The Nexus 1.2.0.2 release is available for download. This release improves upon the architectural enhancements started in 1.1 for plugins.  1.2.0 also provides for greater manageability and customization of the embedded Jetty server, support for incremenetal Nexus indexes, and support for plugins.  To download this 1.2.0 release go to <a href="http://nexus.sonatype.org">http://nexus.sonatype.org</a>.  Here is an quick overview of some of the more interesting changes in this release.</p>

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

<ul>
    <li><strong>Jetty Customization: </strong>The embedded jetty is now able to consume a full jetty.xml. This means several things, first it allows you to adjust the buffers and timeouts (this is needed to work around windows bugs if you have nexus on <a href="http://docs.codehaus.org/display/JETTY/Slow+Win2003">windows</a>). More importantly it means that proxying via https/ssl is now possible. A link to the <a href="http://nexus.sonatype.org/about/faq.html#QHowcanIforceNexustogenerateHTTPSURLswhenintegratedwithApacheHttpdandModProxy">info</a> is available from the <a href="http://nexus.sonatype.org/about/faq.html">FAQ</a>. Examples are also included in the bundle at  conf/examples. I recommend you still review the docs.</li>
    <li><strong>Incremental Index Support:</strong> Built in to 1.2 for remote repositories. Shortly we will start publishing incremental indexes on Central and Nexus will be able to download only the pieces that have changed. It is not yet publishing the incremental for downstream, but that will come shortly.</li>
    <li><strong>“Clear Cache” is now called “Expire Cache”</strong>: to avoid confusion. All this does is mark files as being expired so Nexus will recheck the remote for updates. Nothing is actually cleared and the files would only be redownloaded if the timestamp on the remote is newer.</li>
    <li><strong>Clean/Repair Metadata Files:</strong> Nexus is now able to rebuild Maven Metadata files to remove/fixup bad information.</li>
    <li><strong>Command-line Utilities:</strong> We also have some command line tools available to separate mixed snapshot/release repositories and convert local repository formats for importing into Nexus.</li>
</ul>

<p>See the full list of improvements and fixes <a href="http://nexus.sonatype.org/using/changes.html">here</a>.</p>

<p>This 1.2.0.2 release is also the core used for the Nexus Pro 1.2 Beta. The Pro version packages several plugins around the OSS core. These plugins were discussed in a <a href="http://blogs.sonatype.com/people/?p=779">previous post</a>. The Pro Beta is shipping today to those users that have <a href="http://www.sonatype.com/contact/nexus-beta-contact.html">signed up</a> for the beta program.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sonatype.com/people/2008/12/sonatype-nexus-maven-repository-manager-12-released/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Mercury Ant tasks - HowTo</title>
		<link>http://blogs.sonatype.com/people/2008/12/mercury-ant-tasks-howto/</link>
		<comments>http://blogs.sonatype.com/people/2008/12/mercury-ant-tasks-howto/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 02:18:04 +0000</pubDate>
		<dc:creator>oleg</dc:creator>
		
		<category><![CDATA[Community]]></category>

		<category><![CDATA[How-To]]></category>

		<category><![CDATA[Maven]]></category>

		<category><![CDATA[Mercury]]></category>

		<category><![CDATA[m2eclipse]]></category>

		<guid isPermaLink="false">http://blogs.sonatype.com/people/?p=1065</guid>
		<description><![CDATA[mercury-ant-tasks is an Ant wrapper for Mercury functionality, that provides a lot of Mercury functionality inside ant scripts.




Please check this posting first. It contains the latest information on the subject.

&#60;br/>
&#60;br/>

What exactly is provided:


    Configuration

    named authentication elements to be used by repository or proxy authentication
    supports [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-thumbnail wp-image-995" title="repo-conservation" src="http://blogs.sonatype.com/people/wp-content/uploads/2008/12/mercury-logo.png" alt="Mercury logo" width="150" height="90" />mercury-ant-tasks is an Ant wrapper for Mercury functionality, that provides a lot of Mercury functionality inside ant scripts.
<span id="more-1065"></span></p>

<hr />

<h2>Please check <a href="http://people.apache.org/~ogusakov/sites/mercury-ant/mercury-ant-tasks/howto.html">this posting</a> first. It contains the latest information on the subject.</h2>

<p>&lt;br/>
&lt;br/></p>

<p>What exactly is provided:</p>

<ul>
    <li><strong>Configuration</strong>
<ul>
    <li>named authentication elements to be used by repository or proxy authentication</li>
    <li>supports both name/password or certificate pointer (file or URL) plus optional password</li>
    <li>named repository configurations</li>
    <li>local repositories (not limited to one)</li>
    <li>remote repositories</li>
    <li>stream verification per repository - separate for reading and writing</li>
    <li>currently supported SHA-1 and PGP (.asc)</li>
</ul>
</li>
    <li><strong>named dependency sets</strong>
<ul>
    <li>lists dependencies and optionally - their Maven scopes</li>
    <li>standardized on a one-string naming convention</li>
    <li>supports OSGi-syntax version ranges</li>
</ul>
</li>
    <li><strong>ant path creation/alteration</strong>
<ul>
    <li>a task that either creates a new ant path or adds to existing one</li>
    <li>optionally allows to specify Maven-like scope for the path resolution</li>
</ul>
</li>
    <li><strong>repository writes</strong>
<ul>
    <li>allows to write named files into repositories</li>
    <li>optional classifiers, types</li>
    <li>signature generation is configured per repository</li>
    <li>SHA1, PGP</li>
</ul>
</li>
</ul>

<hr />

<h3>Where to get mercury-ant-tasks?</h3>

<p>All the development releases will be deployed to <a href="http://people.apache.org/~ogusakov/repos/test/org/apache/maven/mercury/mercury-ant-tasks/1.0-alpha-1-SNAPSHOT/">this site</a>; grab the latest snapshot and:</p>

<ul>
    <li>put it into ${user.home}/.ant/lib</li>
    <li>if you plan to use PGP signatures - also put there bcpg-jdk15-140.jar and bcprov-jdk15-140.jar from <a href="http://repo1.maven.org/maven2/bouncycastle/">this central repository location</a></li>
    <li>if interested - my test <a href="http://people.apache.org/~ogusakov/repos/test/org/apache/maven/mercury/mercury-ant-tasks/1.0-alpha-1-SNAPSHOT/build.xml">build.xml</a> contains all the unit test scripts</li>
</ul>

<hr />

<h3> mercury-ant-tasks howto-by-example</h3>

<p>&nbsp;&nbsp;</p>

<p>This snippet shows how to define mercury namespace in the ant project markup</p>


<div class="wp_syntax"><div class="code"><pre class="xml xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;project</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;mercury-ant-test&quot;</span> <span style="color: #000066;">default</span>=<span style="color: #ff0000;">&quot;compile&quot;</span> </span>
<span style="color: #009900;"><span style="color: #000066;">xmlns:merc</span>=<span style="color: #ff0000;">&quot;antlib:org.apache.maven.mercury.ant.tasks&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</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>&nbsp;&nbsp;</p>

<p>This snippet shows how to define two repositories - one remote, one local. <strong>You don&#8217;t have to always define a local repository</strong>, but in this case binaries would reside in temp. location and will be reloaded from the remote on each invocation of the merc:resolve task</p>


<div class="wp_syntax"><div class="code"><pre class="xml xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merc:config</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;conf&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merc:repo</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;localRepo&quot;</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;/maven.repo&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merc:repo</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;central&quot;</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;http://repo1.maven.org/maven2&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/merc:config<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>


<p>&nbsp;&nbsp;</p>

<p>This snippet shows how to define authenticated repository and hide the password in the external file, so that each OS user can have their own credentials</p>


<div class="wp_syntax"><div class="code"><pre class="xml xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;~/.secret/secret.properties&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merc:config</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;conf&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merc:auth</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;repo-auth&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;${repo.user}&quot;</span> <span style="color: #000066;">pass</span>=<span style="color: #ff0000;">&quot;${repo.pass}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merc:repo</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;localRepo&quot;</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;/maven.repo&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merc:repo</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;central&quot;</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;http://repo1.maven.org/maven2&quot;</span></span>
<span style="color: #009900;">             <span style="color: #000066;">authid</span>=<span style="color: #ff0000;">&quot;repo-auth&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/merc:config<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>


<p>&nbsp;&nbsp;</p>

<p>This snippet shows how to configure a repository for PGP signature generation and checking; here secret keyring password is also kept in external file. Key ID always is a 16-digit hex number - use <a href="http://www.gnupg.org/">GnuPG</a> GUI to look it up (and also generate/manipulate your keys). The verifier will accept any key from pubring.gpg for the signature</p>


<div class="wp_syntax"><div class="code"><pre class="xml xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;~/.secret/secret.properties&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merc:config</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;conf&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merc:auth</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;repo-auth&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;${repo.user}&quot;</span> <span style="color: #000066;">pass</span>=<span style="color: #ff0000;">&quot;${repo.pass}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merc:repo</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;localRepo&quot;</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;/maven.repo&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
&nbsp;
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merc:repo</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;central&quot;</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;http://repo1.maven.org/maven2&quot;</span></span>
<span style="color: #009900;">                    <span style="color: #000066;">authid</span>=<span style="color: #ff0000;">&quot;repo-auth&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merc:verifywrite</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;pgp&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;keyring&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;/home/me/pgp/secring.gpg&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;pass&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${secret.keyring.pass}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;key&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;0EDB5D91141BC4F2&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/merc:verifywrite<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merc:verifyread</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;pgp&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;keyring&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;/home/me/pgp/pubring.gpg&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/merc:verifyread<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/merc:repo<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/merc:config<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>


<p>&nbsp;&nbsp;</p>

<p>This snippet shows how to define authenticated repository and hide the password in the external file, so that each OS user can have their own credentials</p>


<div class="wp_syntax"><div class="code"><pre class="xml xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;property</span> <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;~/.secret/secret.properties&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merc:config</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;conf&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merc:auth</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;repo-auth&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;${repo.user}&quot;</span> <span style="color: #000066;">pass</span>=<span style="color: #ff0000;">&quot;${repo.pass}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merc:repo</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;localRepo&quot;</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;/maven.repo&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merc:repo</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;central&quot;</span> <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;http://repo1.maven.org/maven2&quot;</span></span>
<span style="color: #009900;">                    <span style="color: #000066;">authid</span>=<span style="color: #ff0000;">&quot;repo-auth&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/merc:config<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>


<p>&nbsp;&nbsp;</p>

<p>This snippet shows how to define a dependency set. Junit will only be added to paths that define scope=&#8221;test&#8221;</p>


<div class="wp_syntax"><div class="code"><pre class="xml xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merc:dep</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;my-libs&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merc:dependency</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;asm:asm:[2.0,3.0)&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merc:dependency</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;junit:junit:[4.0.1,):::test&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/merc:dep<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>


<p>&nbsp;&nbsp;</p>

<p>This snippet shows how to resolve a dependency set and add the resulting binaries to &#8220;compile-path&#8221; path. This path will not include JUnit from previous snippet</p>


<div class="wp_syntax"><div class="code"><pre class="xml xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merc:resolve</span> <span style="color: #000066;">pathid</span>=<span style="color: #ff0000;">&quot;compile-path&quot;</span> <span style="color: #000066;">depid</span>=<span style="color: #ff0000;">&quot;my-libs&quot;</span> <span style="color: #000066;">configid</span>=<span style="color: #ff0000;">&quot;conf&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;javac</span> <span style="color: #000066;">srcdir</span>=<span style="color: #ff0000;">&quot;${src}&quot;</span> <span style="color: #000066;">destdir</span>=<span style="color: #ff0000;">&quot;${target}&quot;</span> <span style="color: #000066;">classpathref</span>=<span style="color: #ff0000;">&quot;compile-path&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>


<p>&nbsp;&nbsp;</p>

<p>This snippet shows how to resolve a dependency set in test scope and add the resulting binaries to &#8220;test-compile-path&#8221; path. This path will have JUnit</p>


<div class="wp_syntax"><div class="code"><pre class="xml xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merc:resolve</span> <span style="color: #000066;">pathid</span>=<span style="color: #ff0000;">&quot;test-compile-path&quot;</span></span>
<span style="color: #009900;">                      <span style="color: #000066;">depid</span>=<span style="color: #ff0000;">&quot;my-libs&quot;</span></span>
<span style="color: #009900;">                      <span style="color: #000066;">configid</span>=<span style="color: #ff0000;">&quot;conf&quot;</span></span>
<span style="color: #009900;">                      <span style="color: #000066;">scope</span>=<span style="color: #ff0000;">&quot;test&quot;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>


<p>&nbsp;&nbsp;</p>

<p>This snippet shows how to write a jar file and it&#8217;s sources to a repository</p>


<div class="wp_syntax"><div class="code"><pre class="xml xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merc:write</span> <span style="color: #000066;">repoid</span>=<span style="color: #ff0000;">&quot;remoteRepo&quot;</span></span>
<span style="color: #009900;">                   <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;t:t:1.0&quot;</span></span>
<span style="color: #009900;">                   <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${basedir}/target/t.jar&quot;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;merc:write</span> <span style="color: #000066;">repoid</span>=<span style="color: #ff0000;">&quot;remoteRepo&quot;</span></span>
<span style="color: #009900;">                   <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;t:t:1.0:sources&quot;</span></span>
<span style="color: #009900;">                   <span style="color: #000066;">file</span>=<span style="color: #ff0000;">&quot;${basedir}/target/t-src.jar&quot;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>


<p>&nbsp;</p>

<hr/>

<p>&nbsp;</p>

<h3>mercury-ant-tasks reference</h3>

<p>Now, let&#8217;s have a closer look at ant mercury markup. To make it available to ant, provide a namespace definition on the project level, for example:
<code>&lt;project name="test" default="compile" xmlns:merc="antlib:org.apache.maven.mercury.ant.tasks"&gt;</code></p>

<p>Everywhere here I mention <em>named</em> - named configuration, named set. It means named in ant sense: something that has an <em>id</em> attribute value, and then we can reference that particular object (configuration, set, etc) by this value.</p>

<table border="0" style="width: 600px; border: 1px solid black; padding: 5px;">
<tbody style="width: 600px;">
<tr>
<th>Tag</th>
<th>Attribute<br/>(<b>required</b>)</th>
<th>Description</th>
</tr>
<tr bgcolor="#f6f6f6">
<td>merk:config</td>
<td></td>
<td>defines a named configuration, for now it&#8217;s just a set of named repositories and authentications</td>
</tr>
<tr>
<td></td>
<td><b>id</b></td>
<td>the name of this configuration</td>
</tr>
<tr bgcolor="#f6f6f6">
<td>merc:auth</td>
<td></td>
<td>defines a named authentication</td>
</tr>
<tr>
<td></td>
<td><b>id</b></td>
<td>name of this authentication</td>
</tr>
<tr>
<td></td>
<td>user</td>
<td>user name to use in this authentication</td>
</tr>
<tr>
<td></td>
<td>certfile</td>
<td>a pointer to certificate file or URL. Can take a form of just a file pointer, or URL: file:///home/me/certificate. Or regular URL http://my.site.com/certificates/file. <strong>Note:</strong> currently SSL client does not support client certificates</td>
</tr>
<tr>
<td></td>
<td>pass</td>
<td>password to use with either user or certificate</td>
</tr>
<tr bgcolor="#f6f6f6">
<td>merc:repo</td>
<td></td>
<td>defines a named repository that may contain dependencies. <strong>It can only reside inside merc:config element</strong></td>
</tr>
<tr>
<td></td>
<td><b>id</b></td>
<td>defines a unique id for this repository. Use consistent IDs as the are used by cache to speed up access to repository metadata</td>
</tr>
<tr>
<td></td>
<td>type</td>
<td>repository type, used internally to find repository implementation. Default is M2 repository implementations from Mercury <b>(default: &#8220;m2&#8243;)</b></td>
</tr>
<tr>
<td></td>
<td>dir</td>
<td>defines a local repository. Point to the root of the local repository directory</td>
</tr>
<tr>
<td></td>
<td>url</td>
<td>defines a remote repository and contains it&#8217;s URL</td>
</tr>
<tr>
<td></td>
<td>authid</td>
<td>contains a reference to the <em>merc:auth</em> element that defines how to access authenticated repository</td>
</tr>
<tr>
<td></td>
<td>proxyauthid</td>
<td>contains a reference to the <em>merc:auth</em> element that defines how to access authenticated proxy for a repository</td>
</tr>
<tr>
<td></td>
<td>readable</td>
<td>boolean, defines this repository as suitable for reading from it</td>
</tr>
<tr>
<td></td>
<td>writeable</td>
<td>boolean, defines this repository as suitable for writing to it</td>
</tr>
<tr bgcolor="#f6f6f6">
<td>merc:verifyread</td>
<td></td>
<td>defines a read verification configuration.<strong>It can only reside inside merc:repo element</strong></td>
</tr>
<tr>
<td></td>
<td><b>type</b></td>
<td>define the verification algo to use. Supported today are <strong>pgp</strong> and <strong>sha1</strong></td>
</tr>
<tr>
<td></td>
<td>lenient</td>
<td>boolean, if set to true - verification failure does not stop the repository operation <b>(default: true)</b></td>
</tr>
<tr>
<td></td>
<td>sufficient</td>
<td>boolean, if set to true and there are multiple verificators - success of this verification stops all others <b>(default: false)</b></td>
</tr>
<tr bgcolor="#f6f6f6">
<td>merc:verifyread</td>
<td></td>
<td>defines a read verification configuration.<strong>It can only reside inside merc:repo element</strong></td>
</tr>
<tr>
<td></td>
<td><b>type</b></td>
<td>define the verification algo to use. Supported today are <strong>pgp</strong> and <strong>sha1</strong></td>
</tr>
<tr>
<td></td>
<td>lenient</td>
<td>boolean, if set to true - verification failure does not stop the repository operation <b>(default: true)</b></td>
</tr>
<tr>
<td></td>
<td>sufficient</td>
<td>boolean, if set to true and there are multiple verificators - success of this verification stops all others <b>(default: false)</b></td>
</tr>
<tr bgcolor="#f6f6f6">
<td>merc:deps</td>
<td></td>
<td>defines a named set of dependencies</td>
</tr>
<tr>
<td></td>
<td><b>id</b></td>
<td>the name of this set</td>
</tr>
<tr bgcolor="#f6f6f6">
<td>merc:dependency</td>
<td></td>
<td>a path element query, that could be resolved by <strong>merc:resolve</strong> task</td>
</tr>
<tr>
<td></td>
<td><b>name</b></td>
<td>a query in the format <strong>groupId:artifactId:versionRange:classifier:type:scope</strong>, required are only the first 3 fields, the rest can be omitted. Examples: <strong>ant:ant:1.7.0</strong> - search for this dependency, <strong>ant:ant:[1.7.0,)</strong> - search for any version, greater or eq. to 1.7.0, <strong>ant:ant:[1.7.0,)::test</strong> - search for these version and resolve them in the test scope (see merc:resolve), <strong>ant:ant:[1.7.0,1.7.1]</strong> - search for ant versions between 1.7.0 and 1.7.1 inclusive, <strong>my.apps:app:1.1::zip</strong> - find and store locally my.app/app/app-1.1.zip</td>
</tr>
<tr bgcolor="#f6f6f6">
<td>merc:resolve</td>
<td></td>
<td>ant path manipulation: create new path or append to the existing path</td>
</tr>
<tr>
<td></td>
<td><b>depid</b></td>

<td>id of the dependency set that should be resolved and added to the path</td>
</tr>
<tr>
<td></td>
<td><b>configid</b></td>
<td>id of the configuration to be used by this resolution</td>
</tr>
<tr>
<td></td>
<td>pathid</td>
<td>id of the newly created path. This path should not have been previously defined</td>
</tr>
<tr>
<td></td>
<td>refpathid</td>
<td>id of the existing path. This path should already exist</td>
</tr>
<tr>
<td></td>
<td>scope</td>
<td>scope, for which this path should be resolved. <b>(default: compile)</b></td>
</tr>
<tr bgcolor="#f6f6f6">
<td>merc:write</td>
<td></td>
<td>this task writes a file to the specified repository under specified name</td>
</tr>
<tr>
<td></td>
<td><b>repoid</b></td>
<td>id of the repository to write this file into</td>
</tr>
<tr>
<td></td>
<td>name</td>
<td>repository name of the atrifact to write to the repository (see dependency name desc., exclude ranges)</td>
</tr>
<tr>
<td></td>
<td>pom</td>
<td>pom file to use instead of the name attribute</td>
</tr>
<tr>
<td></td>
<td><b>file</b></td>
<td>file to be written to the repository</td>
<td></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sonatype.com/people/2008/12/mercury-ant-tasks-howto/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Does Your Tool Depend on the Central Maven Repository?</title>
		<link>http://blogs.sonatype.com/people/2008/12/maintain-an-essential-public-resource-the-central-maven-repository/</link>
		<comments>http://blogs.sonatype.com/people/2008/12/maintain-an-essential-public-resource-the-central-maven-repository/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 12:00:04 +0000</pubDate>
		<dc:creator>tim</dc:creator>
		
		<category><![CDATA[Maven]]></category>

		<category><![CDATA[Nexus]]></category>

		<category><![CDATA[repository]]></category>

		<guid isPermaLink="false">http://blogs.sonatype.com/people/?p=966</guid>
		<description><![CDATA[Here are three quick notes for people who write tools which depend on the Central Maven Repository.   Adhering to these standards will help to preserve the free, public resource that millions of Maven users depend on.   We think it is great that people are interacting with the repository, but we want to make sure that [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-thumbnail wp-image-995" title="repo-conservation" src="http://blogs.sonatype.com/people/wp-content/uploads/2008/12/repo-conservation-150x90.png" alt="" width="150" height="90" />Here are three quick notes for people who write tools which depend on the Central Maven Repository.   Adhering to these standards will help to preserve the free, public resource that millions of Maven users depend on.   We think it is great that people are interacting with the repository, but we want to make sure that we&#8217;re all doing so in a responsible manner that conserves bandwidth.</p>

<h3><span id="more-966"></span></h3>

<h3>#1: Populate User-Agent Headers</h3>

<p>If your build tool or repository manager interacts with the Central Maven Repository, you need to start setting a reasonable User Agent.  Nexus, Artifactory, Archiva, Maven, and Ivy all identify themselves in the User-Agent header.  This is incredibly important for the health of the Central repository, if there is a bug in a release of one of these tools which pegs the bandwidth max of Central, this can jeopardize the availability of this central resource for others.   Appropriate User-Agent headers help the repository maintainers quickly identify problems so that we can make sure that Central remains available for the majority of users.</p>

<p>In general, if your tool ever interacts with the Central Maven repository it is a good idea to maintain contact with at least one member of the Apache Maven PMC, and there are a few working for Sonatype including Brian, Jason, and John.</p>

<p>If you decide to write a new build tool, that&#8217;s great.  Before you distribute it to tens of thousands of developers, make sure your client sets the User-Agent.   We&#8217;ve had cases recently that involved misconfigured tools that lacked an identifying User-Agent.  If the tool in question had a meaningful User-Agent header it would have taken all of five minutes to find the problem and identify the project in question.   Instead it took members of the team multiple weeks of effort.</p>

<h3>#2: Don&#8217;t Scrape Central, Don&#8217;t Walk the Repo</h3>

<p>There are a few services which have decided to scrape the entire contents of the central repository into another copy and then to operate on this copy.  While there are different ways to do this (rsync, getting it from a mirror), we often see people using a tool like wget with a modified User-agent header field to constantly scan the entire repository.  This creates a storm of requests against Central, and wastes bandwidth.  It is also another way to crowd out other people trying to use the Central Repository.</p>

<p>Again, this is a case of communicating with the Maven PMC.  If you are building a service that is going to be consuming Gigabytes of bandwidth on Central, you need to get in touch with the PMC as they are the body that oversees and supports the Central Maven repository. If you want to do this, you can, but people are going to likely point you at a mirror.   Even with a mirror, you need to make sure that the operators of that particular mirror don&#8217;t mind you siphoning off a couple of Gigs every month.  Bandwidth isn&#8217;t free, and the first priority is always availability.</p>

<h3>#3: Don&#8217;t use a 404 as a Search Tool</h3>

<p>There are a few tools out there that haven&#8217;t figured out how to use the Nexus index from the Maven repository  (Maven&#8217;s one of them).   Going forward, most tools should start consulting the Nexus index to test for the presence or absence of an artifact.   404 requests are not a problem in and of themselves, but we&#8217;re trying to encourage people to minimize the number of remote interactions with Central so we can maximize availability.  We could like serve tens of thousands of 404 requests a second, but we&#8217;d like to think that people want to minimize remote interaction when possible.</p>

<p>If you are writing a tool and you want to know how to interact with the Nexus Index.  The code to do so is licensed under an Eclipse Public License and is available from <a href="http://nexus.sonatype.com">http://nexus.sonatype.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sonatype.com/people/2008/12/maintain-an-essential-public-resource-the-central-maven-repository/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Introducing Byldan: A .NET Version of Maven</title>
		<link>http://blogs.sonatype.com/people/2008/12/introducing-byldan-a-net-version-of-maven/</link>
		<comments>http://blogs.sonatype.com/people/2008/12/introducing-byldan-a-net-version-of-maven/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 17:35:09 +0000</pubDate>
		<dc:creator>shane</dc:creator>
		
		<category><![CDATA[Maven]]></category>

		<category><![CDATA[NMaven]]></category>

		<category><![CDATA[News]]></category>

		<category><![CDATA[byldan]]></category>

		<category><![CDATA[dotnet]]></category>

		<guid isPermaLink="false">http://blogs.sonatype.com/people/?p=1012</guid>
		<description><![CDATA[If you are a .NET developer and like the Maven concept but don&#8217;t want to install Maven and Java on your system, Byldan is a project definitely worth looking into.  Last year, Byldan started as an experimental, Mavenish build system written in C# but is now the basis for doing a full Maven port to [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-thumbnail wp-image-1051" title="byldan-logo" src="http://blogs.sonatype.com/people/wp-content/uploads/2008/12/byldan-logo.png" alt="" width="142" height="110" />If you are a .NET developer and like the Maven concept but don&#8217;t want to install Maven and Java on your system, <a href="http://www.codeplex.com/byldan">Byldan</a> is a project definitely worth looking into.  Last year, Byldan started as an experimental, Mavenish build system written in C# but is now the basis for doing a full Maven port to .NET.</p>

<p>At the time I started Byldan, I had been working on <a href="http://www.codeplex.com/nmaven">NMaven</a> for more than a year and had encountered a lot of issues of getting Maven to play nice with NMaven. I wanted to see what a build system might look like in pure .NET.</p>

<p><span id="more-1012"></span>The first thing I noticed was the very significant speed enhancements of building a project with Byldan versus NMaven. I also needed to get the reactor build order straightened out and after searching around found <a href="http://www.codeplex.com/NGenerics">NGenerics</a>, which allowed me to do a topological sort on project dependencies. The .NET open-source community may not be as large as Java, but there is some good stuff out there.</p>

<p>The final thing I noticed was I couldn&#8217;t find a good library for creating tar files (or even zip) to package the distribution, as any existing tools were either commercial or GPL licensed. So I implemented my own: <a href="http://www.codeplex.com/Archivist">Archivist</a>.</p>

<p>At the time, I knew that getting full support for the pom, with interpolation and inheritance of all the elements would be a major task, so I settled on a simplified version of the pom for Byldan. But now, with the new project builder coming out soon in Maven 3.0-alpha1, I can tackle this problem head on. I recently converted maven-shared-model and maven-project-builder to .NET assemblies using ikvmc. Since these projects are self contained, only relying on JDK dependencies, this was a simple conversion from Java byte-code to a .NET assembly. Now I can use the same project builder in Byldan as I do in Maven. This code looks like:</p>


<div class="wp_syntax"><div class="code"><pre class="java java" style="font-family:monospace;">javaUtil<span style="color: #339933;">::</span><span style="color: #003399;">List</span> domainModels <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> javaUtil<span style="color: #339933;">::</span><span style="color: #003399;">ArrayList</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>;
domainModels.<span style="color: #006633;">add</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> ByldanProjectDomainModel<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">FileInputStream</span><span style="color: #009900;">&#40;</span>projectFileInfo.<span style="color: #006633;">FullName</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>;
&nbsp;
ModelTransformerContext ctx <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ModelTransformerContext<span style="color: #009900;">&#40;</span>
javaUtil<span style="color: #339933;">::</span><span style="color: #003399;">Arrays</span>.<span style="color: #006633;">asList</span><span style="color: #009900;">&#40;</span> <span style="color: #000000; font-weight: bold;">new</span> ArtifactModelContainerFactory<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>, <span style="color: #000000; font-weight: bold;">new</span> IdModelContainerFactory<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>;
&nbsp;
ByldanProjectDomainModel model <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>ByldanProjectDomainModel<span style="color: #009900;">&#41;</span> ctx.<span style="color: #006633;">transform</span><span style="color: #009900;">&#40;</span>domainModels,
    <span style="color: #000000; font-weight: bold;">new</span> PomTransformer<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> PomDomainModelFactory<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>,
    <span style="color: #000000; font-weight: bold;">new</span> PomTransformer<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> PomDomainModelFactory<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>;</pre></div></div>


<p>The code in C# is almost exactly the same as Java, I just need to qualify some of the namespaces, like java.util.  We are using the same libraries to handle pom constructing, whether its Maven/NMaven, <a href="http://docs.codehaus.org/display/MAVEN/Mercury">Mercury </a>or Byldan, whether it&#8217;s Java or .NET.</p>

<p>Now that Byldan project files are in line with the Maven ones, I&#8217;m currently looking for other areas to align, like repository format and artifact types. The assembly to support IKVM generated assemblies comes prepackaged with Mono but not Microsoft .NET, so I also have some work there. Expect an official 0.5 release sometime over the next week.</p>

<p>Regarding the long-term plans, Maven 3.0-alpha2 is going to be focused on full Mercury integration with Maven, allowing us to dump the old artifact resolver code. This has interesting implications for both NMaven and Byldan. I&#8217;ll go down to the Sonatype offices next month and meet with Oleg to discuss how we can port Mercury to .NET for use in Byldan. We will also discuss toolchain support and how to use Maven toolchains to customize SAT rules, which we will eventually need to handle platform aware resolution of Java artifacts and .NET assemblies.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sonatype.com/people/2008/12/introducing-byldan-a-net-version-of-maven/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Help Maintain Central: Install a Repository Manager</title>
		<link>http://blogs.sonatype.com/people/2008/12/what-you-can-do-to-help-maintain-the-central-repository-install-a-repository-manager/</link>
		<comments>http://blogs.sonatype.com/people/2008/12/what-you-can-do-to-help-maintain-the-central-repository-install-a-repository-manager/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 12:00:18 +0000</pubDate>
		<dc:creator>tim</dc:creator>
		
		<category><![CDATA[Community]]></category>

		<category><![CDATA[Maven]]></category>

		<category><![CDATA[Nexus]]></category>

		<category><![CDATA[repository]]></category>

		<guid isPermaLink="false">http://blogs.sonatype.com/people/?p=988</guid>
		<description><![CDATA[The Central Maven Repository is a public resource essential to the day to day work routines for millions of developers. It is a public resource that has transformed the way that open source communities distribute software artifacts, and we continue to see repository use increase over time. Central Maven Repository is currently serving around 30 [...]]]></description>
			<content:encoded><![CDATA[<p>The Central Maven Repository is a public resource essential to the day to day work routines for millions of developers. It is a public resource that has transformed the way that open source communities distribute software artifacts, and we continue to see repository use increase over time. Central Maven Repository is currently serving around 30 TB to hundreds of thousands of clients every single month, and the traffic levels on central are steadily increasing.   The Central Maven repository regularly breaks four million requests in a day.  It is massive, and massively important.   Sonatype employees play a large role in helping to maintain this public resource, and so do you.</p>

<p><img class="aligncenter size-full wp-image-973" title="repository-big-stats1" src="http://blogs.sonatype.com/people/wp-content/uploads/2008/12/repository-big-stats1.png" alt="" width="270" height="118" /></p>

<p>While this continued growth is great, we&#8217;re starting to have some issues with edge-case usage patterns of the Central repository. In order to defend the availability of this essential public resource the team that maintains the Central Maven Repository strong suggests that you&#8230;
<span id="more-988"></span></p>

<h3>Start Using a Repository Manager</h3>

<p>Clearly, we think <a href="http://nexus.sonatype.org">Nexus</a> is the best option out there, but there are others including Artifactory and Archiva.  If you haven&#8217;t downloaded a repository manager, and you are using Maven (or Ivy), we strongly suggest that you download a <a href="http://nexus.sonatype.org">repository manager</a> to help us protect Central.  Central can handle the current load, and we&#8217;re not in any danger of exceeding the limits of the systems that serve Central, but bandwidth translates to real energy use, and we&#8217;d like to think that people are interested in conservation.    We&#8217;re at 30 TB and growing in 2008, time will only tell how quickly that figure grows.  Installing a repository manager in your organization will help reduce congestion and make sure that we&#8217;re using our resources efficiently.</p>

<p>Our statistics suggest that there are single organizations with more than 50,000 hits per day for the same 100 files. In other words, either someone has configured an automated build to wipe out the local repository, or there are hundreds of developers at a single company being told to constantly wipe out ~/.m2/repository.   Again, if you are making 50,000 requests to the Central Maven Repository, it is time to <a href="http://nexus.sonatype.org">download Nexus</a> and start taking some control over your own builds.  If you are making 50,000 requests to Central, installing a local repository manager should save you some serious build time.   When Maven is configured to hit a local Nexus instance, it will likely be using a fast network connection to a private resource.  When Maven is configured to hit Central, you are competing with the millions of developers that use Maven.</p>

<p>If you work at an organization which uses Maven, you need to start <a href="http://nexus.sonatype.org">using a Repository Manager</a> today. By our calculations, if every organization that used Maven, used a repository manager. The traffic and usage profile of the Central Maven repository would be down dramatically. Repository managers like <a href="http://nexus.sonatype.org">Nexus</a> are easy to setup and freely available.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sonatype.com/people/2008/12/what-you-can-do-to-help-maintain-the-central-repository-install-a-repository-manager/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dependency Resolution as a Diagram</title>
		<link>http://blogs.sonatype.com/people/2008/12/dependency-resolution-as-a-diagram/</link>
		<comments>http://blogs.sonatype.com/people/2008/12/dependency-resolution-as-a-diagram/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 01:40:03 +0000</pubDate>
		<dc:creator>oleg</dc:creator>
		
		<category><![CDATA[Maven]]></category>

		<category><![CDATA[Mercury]]></category>

		<guid isPermaLink="false">http://blogs.sonatype.com/people/?p=1016</guid>
		<description><![CDATA[They say that one picture is worth a thousand words, so I shut up:


]]></description>
			<content:encoded><![CDATA[<p>They say that one picture is worth a thousand words, so I shut up:</p>

<p><img src="http://blogs.sonatype.com/people/wp-content/uploads/2008/12/sat4.png" alt="" title="sat" width="500" height="1480" class="aligncenter size-full wp-image-1028" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.sonatype.com/people/2008/12/dependency-resolution-as-a-diagram/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
