Is there a maven client that isn't mvn (the binary included with the maven distribution) I could use to pull down an artifact from a maven repository without using a pom? I'd like to use a maven repository as the repo for our ops team to pick up builds (including snapshots of builds) but I don't want them to have to mess around with writing poms and declaring dependencies in them. Ideally, I'm looking for just a cli client that I could just pass in a repo url and coordinates and download a given artifact. Does such a thing exist or am I better off writing a one-off script for this?
Use the maven embedder. More to the point, use the functionality inside the maven embedder for resolving and downloading jars. Although if you're trying to just write a simple CLI, the repository structure isn't complex and you could easily write a script that takes a maven repo url, artifact ID, group ID and version to generate the full URL to the jar.
Use Nexus. It provides a web interface that other teams can use to download artifacts. http://nexus.sonatype.org/
Well technically the repository is accessed over HTTP, so given the repository location, artifact and coordinates, it should just be possible to give your ops team a URL to the artifact that they can hit in any browser.
Think about Pax URL which lets you use plain URLs to reference maven artifacts like so:
mvn:groupId/artifactId/version
See PAX URL Website for more info (MVN Protocol Handler).
Toni
I see 3 easy options:
- Just send them a link pointing on your artifact in your repository and have them use their browser.
- Install and use
wget
(wget http://path/to/artifact.extension
). - Install and use
mvn dependency:get
(requiresmvn
but doesn't require apom.xml
, see this answer for more details).