You Don’t Need A Browser to Use Maven Central

June 9, 2011 By Joel Orlina 0

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 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.

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

Translating the search request into English, that URL requests a basic search for any artifact (irrespective of version) containing the word “guice” 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.

You can build up the complete library of search requests simply by paying attention to your web browser’s address field as you use the Maven Central website.  For the sake of convenience, we’ve collected all the URLs that make up Maven Central’s search API in a document available here.

Sadly, these URL’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’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.

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

The actual text of your query goes in the appropriately named “q” parameter, the “rows” parameter restricts the results to a smaller number than the full result set, and the “wt” parameter can be either “xml” or “json,” depending on how your application prefers to handle results.

Some useful examples appear below.  Again, please refer to the API Guide for a complete listing:

In an upcoming post, I’ll describe the architecture behind Maven Central that makes all this functionality possible.

Nexus 1.9 – Performance, Compatibility, and Dependency Browsing

April 14, 2011 By Brian Fox 0

Sonatype has released the latest version of our industry leading repository manager – Nexus 1.9.1

This post outlines some of the new features available in all 1.9 releases of both Nexus Professional and Nexus Open Source. This release has a lot of important, under-the-hood changes – including a number of changes to the core infrastructure of Nexus to increase Maven 3 compatibility and to incorporate open source libraries for repository interaction (Aether and Maven Indexer). In addition to a wide array of fixes and features in Nexus Open Source, you can now use Nexus Professional to analyze Maven Dependencies.

Changes in Nexus Professional 1.9.1

Nexus Professional has the following key benefits.  For a complete list of all features added and bugs fixed in Nexus Professional 1.9.1, see the official release notes (note: release notes require a log-in).

  • Moved the Custom Metadata Plugin to optional plugins – This Custom Metadata plugin is now shipped as an optional dependency. If you are using the Custom Metadata plugin you will need to copy this plugin from the optional dependencies directory to the plugins directory. Nexus will then start up this plugin the next time it is restarted.
  • The New Maven Module Dependency Report – Nexus Professional adds a helpful report for people browsing the repository. For the first time, you can click on an artifact and see a report of Maven dependencies. From this report you can click through to search for dependencies.

(more…)

Next Generation Infrastructure with Maven, m2eclipse at EclipseCon 2011

March 3, 2011 By hloney Comments Off

EclipseCon 2011 is approaching quickly, but it’s not too late to make plans to head to Santa Clara, California this month!

EclipseCon is the conference for anyone involved in Eclipse. As a proud member of the Eclipse Foundation, Sonatype is looking forward to another year of great talks, tutorials and BOF’s. We will be hosting a number of extended workshops as well as talks in the Cypress Room all day on Tuesday, March 22, 2011.

Sonatype founder Jason van Zyl will be giving a presentation on Next Generation Development Infrastructure with Maven, m2eclipse, Nexus & Hudson.

Presentation details:

All development organizations eventually converge on a set of tools to reduce costs, lower onboarding time, and leverage knowledge in strong communities to create standard processes. To this end we see in many organizations the emergence of a standard development stack consisting of Maven, m2eclipse, Nexus & Hudson. In this talk, Jason van Zyl, Founder of the Apache Maven project, will discuss the future of Maven and specifically Maven 3.x, the rapidly approaching m2eclipse 1.0 release, the recent Nexus 1.9 release and roadmap, and emerging tools such as Maven Shell and Polyglot Maven. Sonatype itself leverages this stack on a daily basis and this discussion will focus not only on the tools individually, but how they can work together to create a best practices approach to building and delivering your software in your organization.

Event details:

Stay tuned to the Sonatype blog for updates on Sonatype’s talks and presentations at EclipseCon 2011. And for the latest news and updates from the Sonatype team, follow us on Twitter @SonatypeCM.

Hudson moves to Github! We're not forking around!

February 15, 2011 By Jason van Zyl 0

First, I’d like to address some misinformation. The use of Github itself was never an issue. It was how the original movement of the sources to Github was executed, and why, that created tension. Github is just a tool and it is a better choice for source control, at least in the short term, for several reasons:

  • Rich REST API: Good for IDE and tooling integration and will allow some cool workflows which can empower contributors.
  • Known quantity: Developers are very familiar with Github and its workflows. It’s easy for developers to interact with us by forking, making modifications, and submitting pull requests.
  • Git repositories are available over HTTPS which makes collaboration at larger organizations easier.
  • SVN interoperability: There are still many developers who are comfortable with their SVN tool chain and Github makes working with Git and SVN simultaneously a possibility

We proposed using Github on the Hudson list, and in short order agreement was reached and the move was initiated. Winston did the infrastructure work last night to push the sources for Hudson over to Github. It was really that Simple. It’s amazing how smoothly things go when you clearly communicate your intentions to all stakeholders. We hope to keep improving the infrastructure for Hudson so if you’re interested please join the Hudson Dev list!

You can also keep track of Hudson developments by following us on Twitter!

Categories: Sonatype Tags: , ,

Guicing up Hudson: Making life easier for developers with JSR-330

February 10, 2011 By Jason van Zyl 0

Today we started rolling out the first of our proposed JSR-330 Dependency Injection changes to Hudson back into the Hudson community. We’re giving it back because we think it is going to make a huge difference for Hudson’s future development. As more and more libraries move to JSR-330, we’re going to see a lot of possibilities open up because of these changes. With today’s donation, we’re making it easier to extend Hudson, we’re reducing the effort required to write a Hudson plugin, and we’re helping to put in a new foundation for the next level of Hudson interoperability and performance.

What does this mean for you as an end-user?

Guice is emerging as a lightweight Dependency Injection standard. We’ve moved the core of Maven to Guice over the past two years and it has dramatically increased performance and opened up possibility for integration with other tools and libraries. Since Guice is implementing JSR-330 standards, what we’re really doing with this effort is moving Hudson to a more standard, more maintainable architecture. As an end-user, you will likely notice increased stability as the core becomes more modular, easier to maintain and test. You should also expect greater integration with other tools that can speak the JSR-330 standard. This includes components that use both Guice and the Spring Framework.

(more…)

Categories: Sonatype Tags: , ,