lazybones icon indicating copy to clipboard operation
lazybones copied to clipboard

Consider direct support of Nexus and Artifactory repositories

Open pledbrook opened this issue 10 years ago • 5 comments

Companies who run private Maven-compatible repositories probably won't want to publish to Bintray. They may also be reluctant to set up another server to provide the metadata. The big question is whether it's possible to interrogate these repositories in a way that works well for the list and info commands (+ any future ones, such as search).

pledbrook avatar Jun 04 '14 09:06 pledbrook

@pledbrook we definitely have a need for this; we use a private Artifactory cluster and are not interested in publishing to Bintray. I'm considering putting together a pull request that would abstract the concept of Bintray from LazyBones, and make publishing generic to any modern binary repo (Bintray, Artifactory, Nexus, etc.). Do you have any guidance, input, requests before I get started?

ghost avatar Mar 12 '15 00:03 ghost

@hotmeatballsoup Thanks for the interest. The tricky part of this feature is working out how the metadata will be stored. One of the reasons I chose Bintray is that it makes it relatively easy to get at the list of packages, the available versions, description, etc. It may be possible to do this with Artifactory as well (with custom metadata), but I don't know about Nexus.

If it's not possible to get the required information from Artifactory/Nexus, then we might need to consider a separate server for the metadata, but this should be a last resort. I suspect some users wouldn't want to or be able to run an extra server app.

I planned to refactor Lazybones to formalise the main components of the app, but parts of the API are quite tricky to fix due to the nature of the available repository implementations. I made a start on a separate branch and you can see my attempt at an API there. The PackageInfo class should give you an idea of what metadata Lazybones needs for each package. PackageSource represents a repository (Bintray or other) and is perhaps the trickiest bit to get right. I'd love to be able to query a repository for a list of packages while filtering the results, but how many repositories support that?

Hopefully that's given you an idea of the aims and challenges around this particular issue. I welcome any feedback and if you have any questions, please don't hesitate to ask.

pledbrook avatar Mar 17 '15 09:03 pledbrook

+1 on this feature. We use a local Artifactory instance also.

jshickey avatar Apr 28 '16 15:04 jshickey

Hi @pledbrook, I'm looking at https://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API to see if it can provide the information required (since I have an Artifactory available to test with). Can you point me to, or provide more information on how the list of packages, available versions, and descriptions etc... are currently retrieved from bintray (I'm a real example kind of person). Hopefully I can adapt that to artifactory apis.

townsfolk avatar Feb 08 '17 19:02 townsfolk

Sorry, I think I found it: https://github.com/pledbrook/lazybones/blob/master/lazybones-app/src/main/groovy/uk/co/cacoethes/lazybones/packagesources/BintrayPackageSource.groovy

townsfolk avatar Feb 08 '17 20:02 townsfolk