mima icon indicating copy to clipboard operation
mima copied to clipboard

Maybe introduce "nano maven"?

Open cstamas opened this issue 1 year ago • 4 comments

Many times users does not need to install, deploy, whatever, all they need is to resolve a GAV transitively...

Requirements:

  • specify (or use default .m2/repository) local repository
  • by default have central, but allow multiple remote reposes
  • only HTTP transport ("apache" or "jdk" with resolver 2)
  • input is GAV, output is list of resolved artifacts

This would be teared down resolver, minified to barest minimum, just to perform this task.

cstamas avatar Dec 17 '23 20:12 cstamas

However, I'm not sure the cost associated to trimming down (or modularising) the resolver will be worth the actual gain: i.e. I would think most of the code is about the collection / resolution rather than other use cases such as install / deploy. Pax-url does not resolve transitively IIRC, so that could be a good use case to trim down, as we'd not need collection / resolution / POM reading, just access to the local repository and download. I would definitely support that, as I think this is the main use case that has drive people to bypass the resolver and re-implement that part. As soon as we have transitive dependencies, we need much more and I don't think we'll be able to remove much from the resolver.

gnodet avatar Dec 18 '23 07:12 gnodet

@cstamas this is literally what jbang does :)

maxandersen avatar Jan 03 '24 19:01 maxandersen

just realized this is more about a nano library to allow one to programmatically do it - jbang is about the cli side ;) ignore me.

maxandersen avatar Jan 18 '24 23:01 maxandersen

Yes, idea was a library that is "trimmed down" version of resolver (ie. just "resolve" APIs and related bits kept).

cstamas avatar Jan 19 '24 10:01 cstamas