- Groovy for Domain:specific Languages(Second Edition)
- Fergal Dearle
- 523字
- 2021-07-16 19:42:47
Installing Groovy with GVM
The Groovy ecosystem continues to evolve and is not too proud to take inspiration from other sources. While the language itself has moved forwards in leaps and bounds over the last few years, by far my favorite addition to the ecosystem is GVM (Groovy enVironment Manager). GVM was inspired by tools such as RVM (Ruby Version Manager).
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
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!
If you are the latter, then GVM has got to be your best reason yet for giving Cygwin a spin. You can install Cygwin by running the setup program from the following address: http://cygwin.com/install.html. Pick the setup program appropriate to your system, either 32-bit or 64-bit. Cygwin does not install all packages by default, so at the end of the installation process, you will need to pick curl
from the Net package category and unzip from the Archive category.
From the directory where you installed Cygwin, you can now launch the Cygwin command prompt using the Cygwin.bat
command file:
C:\cygwin\Cygwin.bat Fergal@mypc ~
You can now issue the curl
command we used earlier to install GVM in your Cygwin session.
Note
Cygwin will pick up all your Windows environment and path variables. GVM itself depends on there being a valid JDK available and will look first for JAVA_HOME
and then for the javac
command executable to determine where this is. Make sure you have a properly configured JDK in your path somewhere. You can download and install the latest JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html.
- Building Modern Web Applications Using Angular
- Python從菜鳥到高手(第2版)
- Learning Linux Binary Analysis
- 編寫高質(zhì)量代碼:改善C程序代碼的125個建議
- Visual C++串口通信技術(shù)詳解(第2版)
- MySQL數(shù)據(jù)庫管理與開發(fā)實(shí)踐教程 (清華電腦學(xué)堂)
- 數(shù)據(jù)結(jié)構(gòu)(C語言)
- Big Data Analytics
- Java程序設(shè)計
- Swift細(xì)致入門與最佳實(shí)踐
- Android系統(tǒng)原理及開發(fā)要點(diǎn)詳解
- HoloLens與混合現(xiàn)實(shí)開發(fā)
- C語言程序設(shè)計簡明教程:Qt實(shí)戰(zhàn)
- Modern C++ Programming Cookbook
- Spring 5 Design Patterns