{jenkins-plugin-info:maven-artifact-choicelistprovider}

This Plugin adds an additional ChoiceListProvider to famous Extensible Choice Parameter Plugin to select Artifacts from any Nexus or Maven Central Repository.

MavenArtifact ChoiceListProvider

What is this?

This Plugin adds an additional ChoiceListProvider to famous Extensible Choice Parameter Plugin.

With this extension its possible to use the Service API from a Maven Repositories like Nexus, Maven-Central or Artifactory to search for artifacts using groupId, artifactId and packaging.

This plugin will let the user choose a version from the available artifacts in the repository and will publish the URL as an environment variable. The Plugin will return the full URL of the choosen artifact, so that it will be available during the build, i.E. you can retrieve the artifact by using "wget"

Example

We are using this plugin to let our QA department choose between the various versions of our software which then is downloaded and installed on the test environment.

Configuration Example

Knowns Issue

Nexus 3

Since Nexus 3.15.x the RESTful search service is available by a different URL. In the current plugin version this new URL is used. If you are using an older Nexus 3 instance you have to use the plugin in version 1.3.4

Nexus Snapshots

If you would like to use Snapshot Versions of your artifacts you have to enable the tick-box in the Jenkins Settings. Only with the RESTful interface of Nexus 2 you will be able to retrieve Snapshot versions.

Artifactory

Artifactory API is not returning the correct ArtifactIds but only a URL to a JSON file that contains the DownloadURI of the Artifact. As currently there is no way in the Extensible Choice Plugin to intercept the selected value and because its not performant to query Artifactory for all items in the list for the correct downloadURI, the workaround is like this:

wget `wget -qO - https://repo.jenkins-ci.org/api/storage/releases/org/jenkins-ci/plugins/ant-in-workspace/1.1.0/ant-in-workspace-1.1.0-javadoc.jar | json downloadUri`

The json command like tool is required:

json --version
json 9.0.6
written by Trent Mick
https://github.com/trentm/json

https://github.com/phreakadelle/maven-artifact-choicelistprovider-plugin/issues/11#issuecomment-374142298

Links

Authors

Stephan Watermeyer

Further Links

License

Licensed  under the MIT License (MIT).

Changelog

07. Februrary 2019 - 1.4.0

22. December 2018 - 1.3.4

30. July 2018 - 1.3.2

12. July 2018 - 1.3.1

18. January 2018 - 1.2.3

15. December 2017 - 1.2.2

18. October 2017 - 1.2.0

15. Februar 2017 - 1.1.3

18. Januar 2017 - 1.1.1

17. Januar 2017 - 1.1.0

13. January 2017 - 1.0.4

23. November 2016 - 1.0.3

11. November 2016 - 1.0.2

ADD: New dependency to extensible-choice-plugin in version 1.3.3
FIX: POM Update

10. November 2016 - 1.0.1

ADD: New Feature to use the search.maven.org REST API to display artifacts in Jenkins
FIX: Some changes to support the official release of this software

09. November 2016 - 1.0.0

25. July 2016 - 0.0.8

25. July 2016 - 0.0.6

20. July 2016

29. June 2016

30. May 2016

24. May 2016