Written on
GVM - the Groovy enVironment Manager
Marco Vermeulen [0] created a new tool that supports in keeping track and switching between different versions of Groovy(-influenced) software development kits: GVM [1]. At the time of writing, GVM namely supports Groovy, Grails, Griffon, Gradle and Vert.x. GVM itself is a command-line tool based on the Bash shell, depending on curl and unzip to be pre-installed on target systems only.Get it while its hot
The installation is actually a single curl command-line call. Open your command-line and type the following line:
curl -s get.gvmtool.net | bash
Thanks for using
_____/\\\\\\\\\\\\__/\\\________/\\\__/\\\\____________/\\\\_
___/\\\//////////__\/\\\_______\/\\\_\/\\\\\\________/\\\\\\_
__/\\\_____________\//\\\______/\\\__\/\\\//\\\____/\\\//\\\_
_\/\\\____/\\\\\\\__\//\\\____/\\\___\/\\\\///\\\/\\\/_\/\\\_
_\/\\\___\/////\\\___\//\\\__/\\\____\/\\\__\///\\\/___\/\\\_
_\/\\\_______\/\\\____\//\\\/\\\_____\/\\\____\///_____\/\\\_
_\/\\\_______\/\\\_____\//\\\\\______\/\\\_____________\/\\\_
_\//\\\\\\\\\\\\/_______\//\\\_______\/\\\_____________\/\\\_
__\////////////__________\///________\///______________\///__
Will now attempt installing...
Looking for a previous installation of GVM...
Looking for JAVA_HOME...
Validating JAVA_HOME...
Looking for unzip...
Looking for curl...
Installing gvm scripts...
Creating candidate directories...
Attempting to update bash profile...
All done!
Installing and Switching Between Multiple Groovy Versions (<= awesome)
Once the gvm command is available, we can call gvm help to see an overview of the supported commands and arguments:
Usage: gvm <command> <candidate> [version]
command : install, uninstall, list, use, current, version, default, selfupdate, broadcast or help
candidate : groovy, grails, griffon, gradle, vert.x
version : optional, defaults to latest stable if not provided
gvm install groovy
Downloading: groovy 2.0.5
[...]
Installing: groovy 2.0.5
Done installing!
Do you want to use groovy 2.0.5 now? (Y/n): Y
groovy -version
Groovy Version: 2.0.5 JVM: 1.6.0_37 Vendor: Apple Inc. OS: Mac OS X
gvm install groovy 1.8.8
gvm use groovy 1.8.8
groovy -version
Groovy Version: 1.8.8 JVM: 1.6.0_37 Vendor: Apple Inc. OS: Mac OS X