Groovy for Domain-specific Languages - Second Edition

(nextflipdebug2) #1

Groovy Quick Start


[ 22 ]

GVM is the ideal tool for maintaining parallel versions of the various tools in the
Groovy ecosystem. GVM has a simple and intuitive command-line interface for
installing and using Groovy, and a whole collection of other useful Groovy-based
tools. Switching between different versions of the Grails framework is achieved
with a simple command:


$gvm use grails 3.0.5


$grails run-app


$gvm u grails 3.0.5


$grails upgrade


As well as Groovy itself, GVM can be used to install most of the popular Groovy
tools such as Grails, Griffon, Gradle, and Vert.x. This list is being extended by the
Groovy community all the time, so for the latest list of supported tools, see the GVM
tool site at http://gvmtool.net.


Installing GVM


On Linux, Mac OS X, Solaris, and FreeBSD, installation of GVM can be achieved with
one simple command:


$curl –s get.gvmtool.net | bash


I like the elegance and simplicity of this installation method. If you load
http://get.gvmtool.net into a browser, you will see that it is the bash installation
script for GVM. The curl command downloads the script and pipes it into bash to
execute. You can immediately open a new terminal window and start using GVM.
Use the following commands to check the available options:


$gvm help


Installing GVM on Windows

In my experience, Windows developers fall into two camps: those who love Cygwin
because it gives them the power of a Linux style Command Prompt on Windows,
and those who just hate it because it imposes too many constraints. If you are the
former type of developer, then you already have Cygwin and the curl package
installed, which means you have already run the previous curl command,
so job done!


http://www.ebook3000.com
Free download pdf