/restful-api-examples

REST client examples that use Jersey and Jackson JAX-RS. Examples use Nexus and Artifactory REST API's.

Primary LanguageJava

Build Status

Summary

This project contains a couple of examples how to call REST API services. The source code contains example REST clients for Artifactory and Nexus. Both are artifact repositories and provide REST API's.

The following technologies are used:

Run Examples

  • Import Maven project into the IDE of your choice
  • Run main() Method of ArtifactoryTestClient within your IDE
  • Run main() Method of NexusTestClient within your IDE

Requirements

Artifactory Installation

Nexus Installation

Please follow the instructions outlined in this blog article: http://blog.codecentric.de/en/2012/08/tutorial-create-a-jenkins-plugin-to-integrate-jenkins-and-nexus-repository/#part2

The example partially uses features that are only available in the Nexus Pro Edition. You can also just comment out the section in the NexusTestClient.java that uses the metadata-plugin.

Project structure

├── pom.xml
├── README.md
└── src
    ├── main
    │   ├── java
    │   │   └── de
    │   │       └── mb
    │   │           └── rest
    │   │               ├── artifactory
    │   │               │   ├── client
    │   │               │   │   └── ArtifactoryTestClient.java
    │   │               │   └── resource
    │   │               │       └── Builds.java
    │   │               └── nexus
    │   │                   ├── client
    │   │                   │   └── NexusTestClient.java
    │   │                   └── resource
    │   │                       └── RepositoryTargets.java
    │   └── resources
    └── test
        ├── java
        └── resources