Repository Management with Nexus
As documented in Section 19.1, “Managing Nexus Plugins”, Nexus is built as a collection of plugins supported by a core architecture and additional plugins can be installed.
You can use the Nexus Plugin Console to list all installed Nexus plugins and browse REST services made available by the installed plugins. To open the Nexus Plugin Console, click on the Plugin Console link in the Administration menu in the left-hand Nexus menu.
Once you open the Plugin Console, you will see a list of plugins installed in your Nexus installation. Clicking on a plugin in this list will display information about the plugin including name, version, status, a description, SCM information about the plugin, and the URL of the plugin’s project web site and links to the plugin documentation.
All the functionality in the Nexus user interface is accessing the REST API’s provided by the different plugins. An example for the plugin documentation is the main documentation for the core Nexus API linked off the Nexus Restlet 1.x Plugin from Figure 6.26, “Plugin Console” and displayed in Figure 6.27, “Documentation Website for the Core REST API”
You can use the Nexus REST API to integrate Nexus in your external systems.
If your external integration uses Java, or is otherwise JVM based, then you can use the Nexus client using the dependency from Nexus Client Core Dependency for Maven Projects with the version corresponding to your Nexus server version.
<dependency> <groupId>org.sonatype.nexus</groupId> <artifactId>nexus-client-core</artifactId> <version>2.9.0-02</version> </dependency>
The REST API can be invoked from many other programming and scripting
languages. A simple example of using the
curl command in a shell
script is displayed in A
curl Invocation Loading the List of Users from Nexus.
curl -X GET -u admin:admin123 http://localhost:8081/nexus/service/local/users