Managing multiple Groovy installations on Linux

If a developer needs to work with different Groovy distributions on the same machine, chances are that he or she would be involved in a lot of environment variable fiddling, such as PATH, JAVA_HOME, and GROOVY_HOME.

Luckily, there is a tool that helps to manage those variables as well as to download the required setup files on demand.

The name of this goody is GVM (Groovy enVironment Manager). GVM was inspired by similar tools from the Ruby ecosystem, RVM, and rbenv.

In this recipe, we will demonstrate how to use the GVM tool and show the benefits it delivers.

Getting ready

Use the package manager available on your Linux distribution to install curl, unzip, and java on your machine. For example, on Ubuntu ...

Get Groovy 2 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.