In Ruby's Bundler dependency management system, you can use a local path or a remote git/github repo as a dependency.
Build reproducibility is assured because Bundler records the commit ID when the dependency is introduced or updated.
Is this possible in Maven, either natively or via a plugin?
I was thinking of something that would automate the clone & install steps you currently have to do to use an unpublished artifact from Github.
Moandji
Thanks for the pointer, but to be honest, I barely understand what the wiki is saying.
My usecsase is just to automate what I'm doing manually:
1. grab latest from a Git repo, generally a snapshot, and install it so other projects can depend on it
2. Push a project to github, which depends on other artifacts that exist only in other Git repos. To make it easy for others to use this project, I wouldd like them to be able to execute step 1 via a Maven plugin.
I was thinking about this today, would the following make sense:
- In pom, depend on unpublished artifacts, found in a Git repos.
- In pom plugin, list those repos (and optionally branch/tag to pull from, like Bundler does).
- Other user clones my repo, then runs mvn git-dependencies.
- The listed repos are cloned somewhere and mvn install run against each one.
(Insert caveats about dependencies already in local .m2, ability to force updates, etc. Again, like Bundler.)
Is this madness? Maybe I just write too much code that I never bother releasing to Central...
Moandji