Created
August 2, 2017 11:23
-
-
Save themerius/17590ae1fefd4907c8e1776c2b558a84 to your computer and use it in GitHub Desktop.
Download a maven artifact to directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Background: This is useful to download executable JARs, | |
| # so wie can use Artifactory+Maven like an "App Store for Java services". | |
| # This will download the newest version, | |
| # but you can also declare a specific version number. | |
| VERSION="LATEST" | |
| ARTIFACT="com.hazelcast:hazelcast-all:$VERSION:jar" | |
| # Docs: https://maven.apache.org/plugins/maven-dependency-plugin/copy-mojo.html | |
| mvn dependency:copy -U -Dartifact=$ARTIFACT \ | |
| -DoutputDirectory=$HOME \ | |
| -Dmdep.useBaseVersion=true \ | |
| -Dmdep.stripVersion=true | |
| # Now you should be able to run it like that: | |
| # $ java -jar $HOME/hazelcast-all.jar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment