Bug 1062114 - RFE Maven repository as content source
Summary: RFE Maven repository as content source
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: Content
Version: JON 3.1.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-06 07:52 UTC by Carsten Ringe
Modified: 2022-03-31 04:28 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Carsten Ringe 2014-02-06 07:52:35 UTC
For our deployment process we upload all artifacts into a maven repository (Sonatypes Nexus, http://www.sonatype.org/nexus/) and on deploy time we're downloading the artifact in the specified RELEASE version and copy it to the target system.

I'd like to have a content source in JON representing the maven repository that allows me to specify the maven "groupId", "artifactId", "version" and the content source will fetch all available RELEASE versions from the maven repository and makes them available as packages in a JON repository, so I can use the bundle mechanics to deploy them to the target systems.

For a Sonatype Nexus specific solution there is a REST API that comes with the Nexus repository. You can acces it at http://YOURNEXUSHOST/nexus/nexus-core-documentation-plugin/core/docs/index.html. The API provides a resource "/artifact/maven/resolve" that can be used to "Resolve an artifact identified by GAV coordinates given, and retrieve a set of details about that artifact" (from the docs).

To get details about an artifact, you can GET http://YOURNEXUSHOST/nexus/service/local/artifact/maven/resolve?g=GROUPID&a=ARTIFACATID&v=VERSION&r=REPOSITORYNAME and get the following result:

{"data":{"presentLocally":true,"groupId":"GROUPID","artifactId":"ARTIFACTID","version":"VERSION","extension":"jar","snapshot":false,"snapshotBuildNumber":0,"snapshotTimeStamp":0,"sha1":"4e031bb61df09069aeb2bffb4019e7a5034a4ee0","repositoryPath":"/GROUPID/ARTIFACTID/VERSION/ARTIFACTNAME.jar"}}

You can then GET http://YOURNEXUSHOST/nexus/service/local/artifact/maven/redirect?r=public&g=GROUPID&a=ARTIFACATID&v=VERSION&e=jar to download the artifact.


This is my first entry in the Red Hat Bugzilla, and I hope I provided all necessary information to make sense of my RFE. If not, feel free to contact me.

Comment 1 marian 2014-02-13 15:11:43 UTC
Hy people,

I was also looking for a way to integrate nexus and JON as i am evaluating JON as an alternative to: 

http://www.xebialabs.com/deployit

So thank you Carsten for this feature request :) 

One other thing, think about automated tests (Arquillian and it's Drone/Graphene extensions) and nightly builds, it would also be awesome to have a maven plugin that would provision/deploy the artifacts on the cluster administered by JON to run the tests. 

Having the nighlty bluids and the pre prod / prod environments managed by JON would allow us to promote the release, thus obtaining deployment pipelines almost seamless, if not 100% automated (if desired)

Given the Maven's acceptance and usage and the Nexus repository or releases repositories in general, it would be a really strong point for JON to be integrated with Maven/Nexus.

Cheers,
Marian

Comment 2 Heiko W. Rupp 2014-02-13 15:29:16 UTC
Hey guys,
those RfEs sound good. I wonder if you could help us implementing those.
Content Source (providers) are implemented as server side plugins.
Have e.g. a look at https://git.fedorahosted.org/cgit/rhq/rhq.git/tree/modules/enterprise/server/plugins/url for a content source that uses an url for backend connections. 
That nexus one could perhaps even "inherit" from the url one.

Marian: what exactly do you mean with that maven plugin? A RHQ-plugin that somehow leverages maven to lay down bits? Or a maven plugin that talks to RHQ so that RHQ can lay down the bits?


Note You need to log in before you can comment on or make changes to this bug.