Setup Groovy enVironment Manager (GVM)

Groovy enVironment Manager (GVM) is a tool used for managing the multiple version of the software development kits in the Unix based systems. In the current version, it supports the groovy related development kits. Groovy software kits can be installed and configured using this tool. There is no setup available for the windows based systems. In simple terms, GVM is very much handy for installing the various version of Groovy, Grails, etc. and setting the default version used or switching to different versions by using the command. At present it supports the following:

  • Groovy
  • Grails
  • Griffon
  • Gradle
  • Groovyserv
  • Lazybones
  • vert.x

This tool can be installed on the following platforms.

  • Linux
  • Mac OSX
  • Cygwin
  • Solaris
  • FreeBSD (with bash installed)

When you install GVM, your system should have installed the already. Otherwise you can install it by typing the following command. In the below example, second statement is for installing the GVM in your system.

sudo apt-get install curl
curl -s | bash

Install Software Using GVM

It is very simple to install using the above commands. Once installed, you can use the GVM commands and install the softwares supported by them (I have listed above in this article). You can specify any particular version details to install. If you are not passing the version details, it would install the latest version in the repository. Look at the below screenshot, when I type the command gvm install groovy, it has started installing the latest version of groovy 2.1.7 in my local. In the same way you can install the required software.

GVM  Groovy

Also you can add the already installed software to it. The following are commands important to remember.

$ gvm use grails 2.1.1  //Telling gvm to use specific version
$ gvm default grails 1.3.9 //Setting the default version to be used
$ gvm current grails  // Lists current version details
$ gvm selfupdate //This enables the auto update of GVM when new version is released
$ gvm version //Prints current version of GVM

The above commands are simple to understand and easy to to test it in your local environment. If you are working the Unix based systems, let’s try this tool if you are developing the groovy applications.

Leave a Reply

Your email address will not be published. Required fields are marked *

Pin It on Pinterest

Share This

Share this post with your friends!