Sonatype Nexus 1.4.1 introduces a plugin console and custom artifact metadata


December 16, 2009 By Tim O'Brien

Sonatype is pleased to announce the 1.4.1 release of both Nexus Open Source and Nexus Professional.

Nexus Open Source 1.4.1 Highlights

Nexus Plugin Console

Use the Nexus Plugin Console to list all installed Nexus plugins and browse REST services made available by installed Nexus Plugin. To open the Nexus Plugin Console, click on the Plugin Console link in the Administration section of the Nexus menu as shown in the following figure.

Once you open the Nexus Plugin Console, you will see a list of plugins installed in your Nexus installation. Clicking on a Nexus plugin in this list will display information about the plugin including: the plugin’s name, the plugin version, status, a description, SCM information about the plugin, and the URL of the plugin’s project web site.

Once you have selected a plugin from the list of installed plugin, you can browse the available REST interfaces by selecting the REST Services tab as shown in the following figure. Each plugin can contribute one or more REST services to Nexus.

This is just the first step in a fully interactive plugin console to install, remove and upgrade plugins on the fly.

An Improved Welcome Page

The welcome page for Nexus Open Source is now an easy-to-use search interface. Load Nexus in a browser, and start locating artifacts by class name, project name, or GAVC coordinate right away without having to wade through a complex search interface. This release of Nexus 1.4.1 brings the usability features Sonatype added to http://repository.sonatype.org to your own instance of Nexus.

Over 90 Stability and Usability Fixes

The 1.4.1 release of Nexus Open Source contains over 90 fixes and enhancements. From stability changes that affect the way Nexus responds to the unexpected to subtle changes to the way Nexus stores an index, the Nexus community continues to find ways to improve the efficiency and stability of a project that has become essential open source infrastructure for several large open source projects.

Nexus Professional 1.4.1 Highlights

Nexus Professional gives you the ability to store/edit/search custom metadata. This is part of a much larger index and searching upgrades coming down the road.

Viewing Artifact Metadata

When browsing repository storage or a repository index, clicking on an artifact will load the Artifact Information panel. Selecting the Artifact Metadata tab will display the interface shown in the following figure.

Artifact metadata consists of a key, a value, and a namespace. Existing metadata from an artifact’s POM is given a urn:maven namespace, and custom attributes are stored under the urn:nexus/user namespace.

Editing Artifact Metadata

Nexus Professional gives you the ability to add custom attributes to artifact metadata. To add a custom attribute, click on an artifact in Nexus, and select the Artifact Metadata tab. On the Artifact Metadata tab, click on the Add… button and a new row will be inserted into the list of attributes. Supply a key and value and click the Save button to update an artifact’s metadata. The following figure shows the Artifact Metadata panel with two custom attributes: “approvedBy” and “approved”.

Searching Artifact Metadata

Nexus Professional provides you with the ability to configure custom artifact metadata and search for artifacts with specific metadata. To search for artifacts using metadata, click on the Advanced Search link directly below the search field in the Nexus application menu to open the Search panel. Once in the search panel, click on the Keyword Search and click on Metadata Search in the search type dropdown as shown in the following figure.

Once you select the Metadata Search you will see two search fields and an operator dropdown. The two search fields are the key and value of the metadata you are searching for. The key corresponds to the key of the metadata you are searching for, and the value contains the value or value range you are searching for. The operator dropdown can be set to Equals, Matches, Bounded, or Not Equal.

One you locate a matching artfiact in the Metadata Search interface, click on the artifact and then select the Artifact Metadata to examine an artifacts metadata as shown in the following figure.

Uploading Metadata

You can also upload metadata from your build directly by attaching an RDF formatted file with the classifier “metadata”. Using this method, you can define your own namespaces that can be searched along with the defaults mentioned above.

Here’s an example of an RDF formatted file:

<urn:mycustomspace/artifact#test:release-deploy:1.0.1::jar> a <urn:mycustomspace#artifact> ;
	<urn:mycustomspace#repositoryId> "foo" ;
	<urn:mycustomspace#mavenVersion> "2.2.1" ;
	<urn:mycustomspace#releaseManager> "brianf" ;
	<urn:mycustomspace#codeCoverage> ".85" ;

You can use the maven-resources-plugin to filter and generate the data on the fly and attach it to your build with the buildhelper-maven-plugin:attach goal today. Once Nexus sees the file being deployed, the metadata is automatically added to the index on the fly.

We are working on a maven plugin to generate and manage the data from your build directly so stay tuned.

REST API

As always, everything in Nexus is available via a REST API (the UI is simply a REST client running in AJAX). All of the above operations are available for integration with plugins or other systems you may have.

Video Walk-through of the Custom Metadata Plugin