<?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; search</title>
	<atom:link href="http://www.sonatype.com/people/tag/search/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>Thu, 09 Feb 2012 15:48:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>You Don&#8217;t Need A Browser to Use Maven Central</title>
		<link>http://www.sonatype.com/people/2011/06/you-dont-need-a-browser-to-use-maven-central/</link>
		<comments>http://www.sonatype.com/people/2011/06/you-dont-need-a-browser-to-use-maven-central/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 15:36:36 +0000</pubDate>
		<dc:creator>Joel Orlina</dc:creator>
				<category><![CDATA[Maven Central]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[Sonatype]]></category>

		<guid isPermaLink="false">http://www.sonatype.com/people/?p=8160</guid>
		<description><![CDATA[Since its release in January, the Maven Central website (http://search.maven.org) has provided Apache Maven users with: Search functionality that allows one to quickly track down artifacts and their dependency details when trying to resolve build problems. Browse functionality that aids in discovery of new artifacts to use in projects. In the intervening months, Sonatype has [...]]]></description>
			<content:encoded><![CDATA[<p>Since its release in January, the Maven Central website (<a href="http://search.maven.org" target="_blank">http://search.maven.org</a>) has provided Apache Maven users with:</p>

<ul>
    <li>Search functionality that allows one to quickly track down artifacts and their dependency details when trying to resolve build problems.</li>
    <li>Browse functionality that aids in discovery of new artifacts to use in projects.</li>
</ul>

<p>In the intervening months, Sonatype has focused its efforts on improving the usability of the Maven Central user interface in the hopes of making it the first place users look when trying to find an artifact.  Recently, users who have reaped the benefits of using the Maven Central website have asked about interacting programmatically with the search functionality.</p>

<p>If you pay attention to your web browser&#8217;s address bar when conducting searches on Maven Central, you can already see that a REST-style API exists.  For example, searching for &#8220;guice&#8221; from the main search box results in the following URL being generated (the following URL&#8217;s are NOT URL-encoded for the sake of readability):</p>

<ul>
    <li><strong><a href="http://search.maven.org/#search|ga|1|guice" target="_blank">http://search.maven.org/#search|ga|1|guice</a></strong></li>
</ul>

<p>Translating the search request into English, that URL requests a basic search for any artifact (irrespective of version) containing the word &#8220;guice&#8221; in either the groupId or artifactId, returning only the first page of results.  Each row of the results shows the latest version of the artifact and the date the artifact was last updated as well as any classifiers associated with the artifact.</p>

<p>You can build up the complete library of search requests simply by paying attention to your web browser&#8217;s address field as you use the Maven Central website.  For the sake of convenience, we&#8217;ve collected all the URLs that make up Maven Central&#8217;s search API in a document available <a href="http://search.maven.org/ajaxsolr/images/MavenCentralAPIGuide.pdf" target="_blank">here</a>.</p>

<p>Sadly, these URL&#8217;s are still only useful when requesting them via web browser.  They are links that can be bookmarked or e-mailed, but they do NOT work when using a non-browser agent like wget or curl.  The Maven Central user interface is essentially a browser-based application that uses Javascript to make asynchronous requests to yet another set of URL&#8217;s.  Once you make a request that looks like the URL above, the browser fires off the actual request to another Maven Central URL responsible for conducting the search and returning results that are formatted by the browser.</p>

<p>The sample request above, when converted to an actual Maven Central search request, looks like this:</p>

<ul>
    <li><strong><a href="http://search.maven.org/solrsearch/select?q=guice&amp;rows=20&amp;wt=json" target="_blank">http://search.maven.org/solrsearch/select?q=guice&amp;rows=20&amp;wt=json</a></strong></li>
</ul>

<p>The actual text of your query goes in the appropriately named &#8220;q&#8221; parameter, the &#8220;rows&#8221; parameter restricts the results to a smaller number than the full result set, and the &#8220;wt&#8221; parameter can be either &#8220;xml&#8221; or &#8220;json,&#8221; depending on how your application prefers to handle results.</p>

<p>Some useful examples appear below.  Again, please refer to the <a href="http://search.maven.org/ajaxsolr/images/MavenCentralAPIGuide.pdf" target="_blank">API Guide</a> for a complete listing:</p>

<ul>
    <li>Fully-qualified classname search &#8211;
<strong><a href="http://search.maven.org/solrsearch/select?q=fc:&quot;org.specs.runner.JUnit&quot;&amp;rows=20&amp;wt=json" target="_blank">http://search.maven.org/solrsearch/select?q=fc:&#8221;org.specs.runner.JUnit&#8221;&amp;rows=20&amp;wt=json</a></strong></li>
    <li>GroupId and artifactId search that returns all available artifact versions &#8211;
<strong><a href="http://search.maven.org/solrsearch/select?q=g:&quot;org.apache.maven.indexer&quot;+AND+a:&quot;maven-indexer&quot;&amp;rows=20&amp;core=gav" target="_blank">http://search.maven.org/solrsearch/select?q=g:&#8221;org.apache.maven.indexer&#8221;+AND+a:&#8221;maven-indexer&#8221;&amp;rows=20&amp;core=gav</a></strong></li>
    <li>SHA1 search (you would need to pre-calculate the SHA1 before sending the request to Maven Central) &#8211;
<strong><a href="http://search.maven.org/solrsearch/select?q=1:&quot;2d3c16092663da9041b171b8d3627cbafa8f0cb1&quot;&amp;rows=20&amp;wt=json" target="_blank">http://search.maven.org/solrsearch/select?q=1:&#8221;2d3c16092663da9041b171b8d3627cbafa8f0cb1&#8243;&amp;rows=20&amp;wt=json</a></strong></li>
</ul>

<p>In an upcoming post, I&#8217;ll describe the architecture behind Maven Central that makes all this functionality possible.</p>
<div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.sonatype.com/people/2011/06/you-dont-need-a-browser-to-use-maven-central/&via=SonatypeCM&text=You Don't Need A Browser to Use Maven Central&related=:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>]]></content:encoded>
			<wfw:commentRss>http://www.sonatype.com/people/2011/06/you-dont-need-a-browser-to-use-maven-central/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Searching Central Just Got Easier with Nexus</title>
		<link>http://www.sonatype.com/people/2009/10/searching-central-just-got-easier-with-nexus/</link>
		<comments>http://www.sonatype.com/people/2009/10/searching-central-just-got-easier-with-nexus/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 18:36:01 +0000</pubDate>
		<dc:creator>Tim O'Brien</dc:creator>
				<category><![CDATA[Nexus]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[nexus pro]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[repository management]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://www.sonatype.com/people/?p=3157</guid>
		<description><![CDATA[We&#8217;ve made a small, but important change to the front page of http://repository.sonatype.org.    (You might recognize the design.) Searching the Central Maven Repository Just Got Easier from Sonatype on Vimeo. To search for an library or an artifact: Go to http://repository.sonatype.org Type in an artifact or group identifier, a class name, or a checksum. Press [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve made a small, but important change to the front page of <a href="http://repository.sonatype.org">http://repository.sonatype.org</a>.    (You might recognize the design.)</p>

<p><object width="597" height="328"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=7105206&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=7105206&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="597" height="328"></embed></object></p>

<p><a href="http://vimeo.com/7105206">Searching the Central Maven Repository Just Got Easier</a> from <a href="http://vimeo.com/sonatype">Sonatype</a> on <a href="http://vimeo.com">Vimeo</a>.</p>

<p>To search for an library or an artifact:</p>

<ol>
    <li>Go to <a href="http://repository.sonatype.org">http://repository.sonatype.org</a></li>
    <li>Type in an artifact or group identifier, a class name, or a checksum.</li>
    <li>Press Enter.</li>
</ol>

<p>Once you have located the artifact you were looking for, click on the artifact and copy the dependency XML from Nexus to your POM.   It couldn&#8217;t get any easier or intuitive.   Make sure to bookmark <a href="http://repository.sonatype.org">http://repository.sonatype.org</a>.</p>
<div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.sonatype.com/people/2009/10/searching-central-just-got-easier-with-nexus/&via=SonatypeCM&text=Searching Central Just Got Easier with Nexus&related=:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>]]></content:encoded>
			<wfw:commentRss>http://www.sonatype.com/people/2009/10/searching-central-just-got-easier-with-nexus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use repository.sonatype.org to Search Central Maven Repository</title>
		<link>http://www.sonatype.com/people/2008/11/use-repositorysonatypeorg-to-search-central-maven-repository/</link>
		<comments>http://www.sonatype.com/people/2008/11/use-repositorysonatypeorg-to-search-central-maven-repository/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 13:47:28 +0000</pubDate>
		<dc:creator>Tim O'Brien</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[Nexus]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://blogs.sonatype.com/people/book/?p=247</guid>
		<description><![CDATA[If you are looking for the easiest way to search for artifacts in the Central Maven Repository, go to http://repository.sonatype.org. Sonatype maintains a publi instance of Nexus that can be used to search for artifacts by GAV (groupId, artifactId, version) coordinates, Class Name, or Checksum. Here&#8217;s a brief demonstration of the search capabilities on http://repository.sonatype.org. [...]]]></description>
			<content:encoded><![CDATA[<p>If you are looking for the easiest way to search for artifacts in the Central Maven Repository, go to <a href="http://repository.sonatype.org">http://repository.sonatype.org</a>.   Sonatype maintains a publi instance of <a href="http://nexus.sonatype.org">Nexus</a> that can be used to search for artifacts by GAV (groupId, artifactId, version) coordinates, Class Name, or Checksum.    Here&#8217;s a brief demonstration of the search capabilities on <a href="http://repository.sonatype.org">http://repository.sonatype.org</a>.</p>

<p>&lt;</p>

<p>p style=&#8221;text-align: center&#8221;>[vimeo]http://www.vimeo.com/2283525[/vimeo]
<strong>NOTE:</strong> Maximize Video to Full Screen Mode to see Details<span id="more-284"></span></p>

<p>If you would like to manage your own instance of Nexus and index your own Hosted repositories, you can download an install Nexus from <a href="http://nexus.sonatype.org">http://nexus.sonatype.org</a>.   If you manage your own instance of Nexus, you can proxy other Maven repositories (including Central) and you will have a place to publish your own organization&#8217;s artifacts.</p>

<p>When you host a Nexus instance and you proxy a remote repository, Nexus downloads a Nexus repository index, this index is what enables Nexus to quickly search the contents of a Maven repository.    Downloading this small repository index is all Nexus needs to do to search the entire repository.  For more information about Nexus, see <a href="http://nexus.sonatype.org">http://nexus.sonatype.org</a>.</p>
<div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.sonatype.com/people/2008/11/use-repositorysonatypeorg-to-search-central-maven-repository/&via=SonatypeCM&text=Use repository.sonatype.org to Search Central Maven Repository&related=:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>]]></content:encoded>
			<wfw:commentRss>http://www.sonatype.com/people/2008/11/use-repositorysonatypeorg-to-search-central-maven-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Searching the Maven Repository</title>
		<link>http://www.sonatype.com/people/2008/11/searching-the-maven-repository/</link>
		<comments>http://www.sonatype.com/people/2008/11/searching-the-maven-repository/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 16:06:24 +0000</pubDate>
		<dc:creator>Tim O'Brien</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[Nexus]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://blogs.sonatype.com/people/book/?p=236</guid>
		<description><![CDATA[A common question from Apache Maven users is &#8220;How do I search the central repository?&#8221; or &#8220;How do I find out what groupId or artifactId I should use for a specific dependency?&#8221;  Use Sonatype&#8217;s Nexus installation at http://repository.sonatype.org to search multiple repositories at once.    Sonatype has an instance of Nexus serving as a mirror of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://cms.sonatype.com/wordpress/wp-content/uploads/2008/11/finding-artifacts.png"><img class="alignright size-thumbnail wp-image-240" src="http://cms.sonatype.com/wordpress/wp-content/uploads/2008/11/finding-artifacts.png" alt="" width="130" height="88" /></a>A common question from Apache Maven users is &#8220;How do I search the central repository?&#8221; or &#8220;How do I find out what groupId or artifactId I should use for a specific dependency?&#8221;  Use Sonatype&#8217;s Nexus installation at <a href="http://repository.sonatype.org">http://repository.sonatype.org</a> to search multiple repositories at once.    Sonatype has an instance of Nexus serving as a mirror of a number of repositories including Central.   If you are looking for the right XML to put in your project&#8217;s POM for a dependency like Log4J or ActiveMQ, just load <a href="http://repository.sonatype.org">repository.sonatype.org</a> in your browser..</p>

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

<p>Then type in part of an <em>artifactId</em> or a <em>groupId</em>, and you should see a result screen that finds all matching artifacts across several repositories:</p>

<p><a href="http://repository.sonatype.org"><img class="aligncenter size-full wp-image-238" src="http://cms.sonatype.com/wordpress/wp-content/uploads/2008/11/artifact-search.png" alt="" width="500" height="375" /></a></p>

<p>This is a quick way for you to locate the available versions for a particular version and find out what the appropriate groupId, artifactId, and version is for a dependency.   If you need more detail, you can click on the POM link to the right of each entry to view the POM for that paricular artifact, and if you would like to download the artifact, click on the artifact link.</p>

<p>If you would like to browse the repositories, click on the browse repositories link on the left-hand side of the window.   In the list of repositories, you will see both groups and repositories.  Nexus groups are collections of repositories exposed from a single URL.</p>

<p><strong>Looking for artifacts?  Go to <a href="http://repository.sonatype.org">http://repository.sonatype.org</a>.</strong></p>

<p>In the next episode&#8230; search for JARs by a hash or an MD5 fingerprint&#8230; and searching for class names.</p>
<div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.sonatype.com/people/2008/11/searching-the-maven-repository/&via=SonatypeCM&text=Searching the Maven Repository&related=:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>]]></content:encoded>
			<wfw:commentRss>http://www.sonatype.com/people/2008/11/searching-the-maven-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

