You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently discovered this project and liked it immediately. Unfortunately it does not quite work for me atm. I'm currently mainly interested in discovering which versions are available on a maven repo server, so the client method: find_artifacts.
We are using a privately hosted nexus3 as maven server. Searching for versions on the server with gid and aid as coordinate (e.g.: "de.sma.tools:genupd") unfortunately always returns empty although versions do exists.
The problem seems to be that current implementation of repo.get_versions method which is internally called by find_artifacts checks at first if the artifact query path exists on server, which basically means doing a http request to <server-repo-url>/<gid>/<aid> and checking if the server returns a 2XX code.
But this URL seems to be never valid for nexus hosted maven repos:
It actually seems that the only direct paths accessible from nexus servers are the complete path for a maven artifact (obviously):
And the path for the maven artifact metadata (which is used by the listdir method):
This might be technically a violation of the maven standard on nexus side, but it would imho still be possible to support nexus in pymaven without compromising existing functionality (much).
If for example the path existence test would be omitted at the start of repo.get_versions and listdir method would return an empty list instead of failing on http error it would work for nexus (tested that) and should also not greatly change behavior for already supported use cases I think.
What would your project stance be on this matter? If you're interested I would be willing to write a proper PR for this.
The text was updated successfully, but these errors were encountered:
Hi! As @morco, I would be interested in interacting with a privately hosted nexus3 too.
I use requests and the Nexus3 REST API to interact with it, but I would rather use this library if it supported this.
I haven't look the code in detail yet, but I think that this should be doable without impacting the existing functionality at all. This library already uses polymorphism for repositories, so we maybe we could add a new subclass for a nexus maven repo (or maybe a client, I would have to study the code to tell).
So, is this something that you would like to support in this library or would it be out of its scope?
Thanks!
PD: As @morco, I would like to contribute, do you have a contributing guide? All I found is the contributor agreement.
@danieljmv01: I have created a branch in my fork which works for me for now. So if installing from source repo is workable in your environment as a temporary solution feel free to try it.
Thanks for your interest in pymaven! Work on pymaven was recently restarted. If either of you are still interested in contributing, please reach out to me either in this issue or via a PR. I plan to do some modernization of the project soon, and adding a contribution guide is on my todo list.
Good day,
I recently discovered this project and liked it immediately. Unfortunately it does not quite work for me atm. I'm currently mainly interested in discovering which versions are available on a maven repo server, so the client method:
find_artifacts
.We are using a privately hosted nexus3 as maven server. Searching for versions on the server with gid and aid as coordinate (e.g.: "de.sma.tools:genupd") unfortunately always returns empty although versions do exists.
The problem seems to be that current implementation of
repo.get_versions
method which is internally called byfind_artifacts
checks at first if the artifact query path exists on server, which basically means doing a http request to<server-repo-url>/<gid>/<aid>
and checking if the server returns a 2XX code.But this URL seems to be never valid for nexus hosted maven repos:
It actually seems that the only direct paths accessible from nexus servers are the complete path for a maven artifact (obviously):
And the path for the maven artifact metadata (which is used by the
listdir
method):This might be technically a violation of the maven standard on nexus side, but it would imho still be possible to support nexus in pymaven without compromising existing functionality (much).
If for example the path existence test would be omitted at the start of
repo.get_versions
andlistdir
method would return an empty list instead of failing on http error it would work for nexus (tested that) and should also not greatly change behavior for already supported use cases I think.What would your project stance be on this matter? If you're interested I would be willing to write a proper PR for this.
The text was updated successfully, but these errors were encountered: