Maven Repository Client

Skip to end of metadata
Go to start of metadata

Plugin Information

No Information For This Plugin

The Maven Repository Client Plugin provides a way to select a version from a Maven repository in order to further operate on the build artifacts, associated with that version.


 
GitHub: https://github.com/mrumpf/repoclient-plugin 

Introduction

The idea behind this is that you continuously deploy all your build artifacts to a Maven repository. But you deploy only selected ones to a remote site, a customer FTP server or an application server for example.

The plugin allows to select a version from a Maven repository, feed the selection as environment parameters to an Ant/Gradle (examples provided) script, which iterates over the properties and downloads the artifacts. The scripts can be used as a starting point for your own deployment tasks.

Configuring the Maven Repository Client Plugin

Update Center

The Maven Repository Client Plugin can be selected via the update center.

Global Configuration

In the Jenkins global configuration area multiple repositories can be added:

  • Repository name - the name of the repository to be used in the 
  • Base URL - the repository base URL
  • Username - the user to access a protected repository (optional)
  • Password - the password to access a protected repository (optional)
  • Test Connection - a HTTP request is done against the server (proxy settings must be correct)

Job Configuration

On the Job configuration, when "This build is parameterized" is selected, a build parameter of type "Maven Repository Artifact" can be chosen from the drop-down box.

A "Maven Repository Artifact" has the following configuration properties:

  • Repository - a repository, as defined in the global configuration
  • GroupId - the group id of the artifact to select the version from
  • ArtifactId - the artifact to select the version from
  • Pattern - a pattern to select a subset of artifacts of a version
  • Description - a description of the artifact shown to the user

Build Parameters

When the build is triggered via "Build Now", a drop-down box with the versions for each configured groupId.artifactId will be shown.

Environment Properties

The following environment properties will be passed to the build:

repoclient_reponame_<GROUPID>.<ARTIFACTID> - the name of the repository, as defined in the Jenkins global configuration

repoclient_artifactid_<GROUPID>.<ARTIFACTID> - the artifact id 

repoclient_groupid_<GROUPID>.<ARTIFACTID> -  the group id

repoclient_pattern_<GROUPID>.<ARTIFACTID> - the regex pattern used to select the files

repoclient_version_<GROUPID>.<ARTIFACTID> - the version number 

repoclient_urls_<GROUPID>.<ARTIFACTID> - the URLs of the selected files

repoclient_user_<GROUPID>.<ARTIFACTID> - the name of the repository user

repoclient_password_<GROUPID>.<ARTIFACTID> - the password of the repository user

Build Scripts

The following example build scripts are available:

  • Ant - a simple Ant script which iterates over the selected artifact URLs
  • Gradle - a simple Gradle script which iterates over the selected artifact URLs

Version History

Version 1.0.0 (05/xx/2012)

  • Initial Release

Labels

Edit
plugin-buildwrapper plugin-buildwrapper Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.