Using REST Services

Starting version 1.4, you can use some REST Services to manage your Apache Archiva instance and Search artifacts. All samples here will use Apache CXF REST client API. By the way you can use some others REST client frameworks. NOTE: a wadl is available in your Archiva instance : http(s)://ip:port/../restServices/application.wadl

Search Service

Authentication headers for connect to your Archiva instance :

Error during retrieving content skip as ignoreDownloadError activated.

Get a Search Service Client :

Error during retrieving content skip as ignoreDownloadError activated.

Quick Search

Error during retrieving content skip as ignoreDownloadError activated.

Search Artifacts Version : to search all availables version with a groupId and artifactId and packaging (if empty jar is used)

Error during retrieving content skip as ignoreDownloadError activated.

Search Service with a classifier :

Error during retrieving content skip as ignoreDownloadError activated.

Search Service with a classifier :

Error during retrieving content skip as ignoreDownloadError activated.

Copy Artifact from a repository to an other one :

For some reasons you want to use a test repository before moving your artifacts to a repository used by final users. To achieve this, you can use a service which can copy an artifact from a repository to an other one

Error during retrieving content skip as ignoreDownloadError activated.

To know all the possible options, you can refer to the javadoc of SearchRequest class.

Browse Service

Get a Browse Service Client :

Error during retrieving content skip as ignoreDownloadError activated.

Get artifacts based on project version metadata, generic metadata added previously in Archiva :

Error during retrieving content skip as ignoreDownloadError activated.

Get artifacts based on the artifact properties :

Error during retrieving content skip as ignoreDownloadError activated.

Get artifacts based on the project properties from POM :

Error during retrieving content skip as ignoreDownloadError activated.

Searching by properties and metadata :

Error during retrieving content skip as ignoreDownloadError activated.
Error during retrieving content skip as ignoreDownloadError activated.

Get Search

Error during retrieving content skip as ignoreDownloadError activated.

Dependencies to add in order to use those REST Services

Error during retrieving content skip as ignoreDownloadError activated.

Current versions use in Apache Archiva:

  • ${project.version}: 2.2.1
  • ${cxfVersion}: $cxfVersion
  • ${jacksonVersion}: 2.3.0

Security Framework Services:

You can use Redback Rest Services to control user creation/modification and add/remove roles.

See http://archiva.apache.org/redback/integration/rest.html