- Install Groovy
- 1. Download
- 1.1. Stable
- 1.2. Snapshots
- 1.3. Prerequisites
- 2. Maven Repository
- 3. SDKMAN! (The Software Development Kit Manager)
- 4. Other ways to get Groovy
- 4.1. Installation on Mac OS X
- 4.1.1. MacPorts
- 4.1.2. Homebrew
- 4.2. Installation on Windows
- 4.3. Other Distributions
- 4.4. Source Code
- 4.5. IDE plugin
- 5. Install Binary
- Distributions
- Verification
- 4.0.0-beta-1 distributions
- 3.0.9 distributions
- 2.5.15 distributions
- 2.4.21 distributions
- Other versions
- Invoke dynamic support
- Operating system/package manager installation
- From your build tools
- Maven repositories
- Install Groovy
- 1. Download
- 1.1. Stable
- 1.2. Snapshots
- 1.3. Prerequisites
- 2. Maven Repository
- 3. SDKMAN! (The Software Development Kit Manager)
- 4. Other ways to get Groovy
- 4.1. Installation on Mac OS X
- 4.1.1. MacPorts
- 4.1.2. Homebrew
- 4.2. Installation on Windows
- 4.3. Other Distributions
- 4.4. Source Code
- 4.5. IDE plugin
- 5. Install Binary
Install Groovy
1. Download
From the download page, you will be able to download the distribution (binary and source), the Windows installer (a community artifact) and the documentation for Groovy.
For a quick and effortless start on Mac OSX, Linux, WSL2 or Cygwin, you can use SDKMAN! (The Software Development Kit Manager) to download and configure any Groovy version of your choice. Basic instructions can be found below.
1.1. Stable
Combined binary / source / documentation bundle: Distribution bundle
You can learn more about this version in the release notes or in the changelog.
If you plan on using invokedynamic support, read those notes.
1.2. Snapshots
For those who want to test the very latest versions of Groovy and live on the bleeding edge, you can use our snapshot builds. As soon as a build succeeds on our continuous integration server a snapshot is deployed to this repository. These snapshots are not official releases and are intended for integration testing by the development community prior to official versions being released. We welcome any feedback.
1.3. Prerequisites
Groovy 3.0 requires Java 8+ with support for up to Groovy 16.
Various Groovy CI servers run the test suite (with more than 10000 tests) across numerous versions of Java. Those servers are also useful to look at to confirm supported Java versions for different Groovy releases.
2. Maven Repository
If you wish to embed Groovy in your application, you may just prefer to point your build to your favourite maven repository or the Groovy artifactory instance. Please see the download page for available modules for each Groovy version.
3. SDKMAN! (The Software Development Kit Manager)
This tool makes installing Groovy on any Bash platform (Mac OSX, Linux, Cygwin, Solaris or FreeBSD) very easy.
Simply open a new terminal and enter:
Follow the instructions on-screen to complete installation.
Open a new terminal or type the command:
Then install the latest stable Groovy:
After installation is complete and you’ve made it your default version, test it with:
That’s all there is to it!
4. Other ways to get Groovy
4.1. Installation on Mac OS X
4.1.1. MacPorts
If you’re on MacOS and have MacPorts installed, you can run:
4.1.2. Homebrew
If you’re on MacOS and have Homebrew installed, you can run:
4.2. Installation on Windows
If you’re on Windows, you can also use the Windows installer.
4.3. Other Distributions
You may download other distributions of Groovy from the ASF archive repository or from the Groovy artifactory instance (also includes pre-ASF versions).
4.4. Source Code
If you prefer to live on the bleeding edge, you can also grab the source code from GitHub.
4.5. IDE plugin
If you are an IDE user, you can just grab the latest IDE plugin and follow the plugin installation instructions.
5. Install Binary
These instructions describe how to install a binary distribution of Groovy:
Download a binary distribution of Groovy and unpack it into some folder on your local file system.
Set your GROOVY_HOME environment variable to the directory where you unpacked the distribution.
Add GROOVY_HOME/bin to your PATH environment variable.
Set your JAVA_HOME environment variable to point to your JDK. On OS X this is /Library/Java/Home , on other unixes its often /usr/java etc. If you’ve already installed tools like Ant or Maven you’ve probably already done this step.
You should now have Groovy installed properly. You can test this by typing the following in a command shell:
Which should create an interactive groovy shell where you can type Groovy statements. Or to run the Swing interactive console type:
Источник
Distributions
Distributions are bundles of source or class files needed to build or use Groovy.
All Apache projects provide a source zip which lets anyone build the software from scratch. If any doubt arises, you can regard the source zip as the authoritative artifact for each release. We also provide binary, downloadable documentation and SDK (combines src, binary and docs) convenience artifacts. You can also find a link to a non-ASF Windows installer convenience executable (if available).
Verification
We provide OpenPGP signatures (‘.asc’) files and checksums (‘.sha256’) for every release artifact. We recommend that you verify the integrity of downloaded files by generating your own checksums and matching them against ours and checking signatures using the KEYS file which contains the OpenPGP keys of Groovy’s Release Managers across all releases.
Newer releases have two sets of verification links. The dist labelled links are through the normal Apache distribution mechanism. The perm labelled links are through the Apache archive server. The latter of these won’t change but may not be available for a short while (usually less than a day) after a release. Older releases are only available from the archive server.
Groovy 4.0 is the next major version of Groovy designed for JDK8+ with much improved JPMS support.
4.0.0-beta-1 distributions
binary dist: asc sha256 perm: asc sha256 | source asc sha256 | documentation dist: asc sha256 perm: asc sha256 | SDK bundle dist: asc sha256 perm: asc sha256 | Windows installer (community artifact) |
Please consult the change log for details.
Groovy 3.0 is the latest stable version of Groovy designed for JDK8+ with a new more flexible parser (aka Parrot parser).
3.0.9 distributions
binary dist: asc sha256 perm: asc sha256 | source asc sha256 | documentation dist: asc sha256 perm: asc sha256 | SDK bundle dist: asc sha256 perm: asc sha256 | Windows installer (community artifact) |
Please consult the change log for details.
Groovy 2.5 is the previous stable version of Groovy.
2.5.15 distributions
binary dist: asc sha256 perm: asc sha256 | source asc sha256 | documentation dist: asc sha256 perm: asc sha256 | SDK bundle dist: asc sha256 perm: asc sha256 | Windows installer (community artifact) |
Please consult the change log for details.
Groovy 2.4 is an earlier version of Groovy still in widespread use. Important: Releases before 2.4.4 weren’t done under the Apache Software Foundation and are provided as a convenience, without any warranty.
2.4.21 distributions
binary dist: asc sha256 perm: asc sha256 | source asc sha256 | documentation dist: asc sha256 perm: asc sha256 | SDK bundle dist: asc sha256 perm: asc sha256 | Windows installer (community artifact) |
Please consult the change log for details.
Other versions
Downloads for all versions are hosted (and mirrored) in:
- Apache’s release mirrors and archive repository.
- Groovy’s artifactory instance (includes pre-ASF versions).
You can also read the changelogs for all versions.
Invoke dynamic support
Please read the invoke dynamic support information if you would like to enable indy support and are using Groovy on JDK 7+.
Operating system/package manager installation
Installing Apache Groovy from a distribution zip is not hard but if you don’t want the hassle, consider the alternatives listed here.
SDKMAN! is a tool for managing parallel versions of multiple Software Development Kits on most Unix-based systems:
Windows users: see the SDKMAN install instructions for potential options.
Homebrew is «the missing package manager for macOS»:
SnapCraft is «the app store for Linux». Groovy is supported in the store or via the commandline:
MacPorts is a system for managing tools on macOS:
Scoop is a command-line installer for Windows inspired by Homebrew:
Chocolatey provides a sane way to manage software on Windows:
Linux/*nix users: you may also find Groovy is available using your preferred operating system package manager, e.g.: apt, dpkg, pacman, etc.
Windows users: consider also the Windows installer (see links above under Distributions).
From your build tools
If you wish to add Groovy as a dependency in your projects, you can refer to the Groovy JARs in the dependency section of your project build file descriptor:
Gradle | Maven | Explanation |
---|---|---|
Groovy versions 1.x to 3.x | ||
org.codehaus.groovy:groovy:x.y.z | org.codehaus.groovy groovy x.y.z | Just the core of Groovy without the modules*. Also includes jarjar’ed versions of Antlr, ASM, and an internal copy of needed CLI implementation classes. |
org.codehaus.groovy:groovy-$module:x.y.z | org.codehaus.groovy groovy-$module x.y.z | «$module» stands for the different optional groovy modules*. Example: groovy-sql . |
org.codehaus.groovy:groovy-all:x.y.z | org.codehaus.groovy groovy-all x.y.z pom | Core plus all of the modules (excluding optional modules) according to the version packaging scheme**. |
Groovy versions 4.0+ | ||
As above but use org.apache.groovy instead of org.codehaus.groovy . | ||
* Modules: 2.4.X: «ant», «bsf», «console», «docgenerator», «groovydoc», «groovysh», «jmx», «json», «jsr223», «nio», «servlet», «sql», «swing», «test», «templates», «testng» and «xml» 2.5.0: as above but excluding optional module «bsf» plus «cli-picocli», «datetime», «macro», «test-junit5». Optional modules: «bsf», «dateutil», «cli-commons» 2.5.1+: as above but «groovy-jaxb» is moved to become optional 3.0.0+: as above but «groovy-yaml» is a new optional module 4.0.0+: as above but «groovy-contracts», «groovy-typecheckers» and «groovy-macro-library» are new optional modules, «groovy-jaxb» and «groovy-bsf» are no longer supported, «groovy-yaml» is now included in «groovy-all», and «groovy-testng» is now an optional module | ||
** Packaging Scheme: 2.4.X: The core plus all the modules merged into one «fat jar». Optional dependencies are marked as optional, so you may need to include some of the optional dependencies to use some features of Groovy, e.g. AntBuilder, GroovyMBeans. 2.5+: A «fat pom» groovy-all-x.y.z.pom referring to the core plus all modules (excluding optional ones). In order to cater to the module system of Java 9+, the groovy-all-x.y.z.jar file is no longer available. | ||
Indy jars You can access the indy version of the core or a module jar by using the ‘indy’ classifier. |
Maven repositories
Groovy version(s) | Release Jars |
---|---|
Groovy versions 1.x to 3.x | Maven Central or Groovy artifactory release repository |
Groovy versions 4.x+ | Maven Central or Groovy artifactory release repository |
Note for the development community: developers needing access to pre-release artifacts to assist with integration testing leading up to an official release should consult the appropriate developer documentation.
Источник
Install Groovy
1. Download
From the download page, you will be able to download the distribution (binary and source), the Windows installer (a community artifact) and the documentation for Groovy.
For a quick and effortless start on Mac OSX, Linux, WSL2 or Cygwin, you can use SDKMAN! (The Software Development Kit Manager) to download and configure any Groovy version of your choice. Basic instructions can be found below.
1.1. Stable
Combined binary / source / documentation bundle: Distribution bundle
You can learn more about this version in the release notes or in the changelog.
If you plan on using invokedynamic support, read those notes.
1.2. Snapshots
For those who want to test the very latest versions of Groovy and live on the bleeding edge, you can use our snapshot builds. As soon as a build succeeds on our continuous integration server a snapshot is deployed to this repository. These snapshots are not official releases and are intended for integration testing by the development community prior to official versions being released. We welcome any feedback.
1.3. Prerequisites
Groovy 3.0 requires Java 8+ with support for up to Groovy 16.
Various Groovy CI servers run the test suite (with more than 10000 tests) across numerous versions of Java. Those servers are also useful to look at to confirm supported Java versions for different Groovy releases.
2. Maven Repository
If you wish to embed Groovy in your application, you may just prefer to point your build to your favourite maven repository or the Groovy artifactory instance. Please see the download page for available modules for each Groovy version.
3. SDKMAN! (The Software Development Kit Manager)
This tool makes installing Groovy on any Bash platform (Mac OSX, Linux, Cygwin, Solaris or FreeBSD) very easy.
Simply open a new terminal and enter:
Follow the instructions on-screen to complete installation.
Open a new terminal or type the command:
Then install the latest stable Groovy:
After installation is complete and you’ve made it your default version, test it with:
That’s all there is to it!
4. Other ways to get Groovy
4.1. Installation on Mac OS X
4.1.1. MacPorts
If you’re on MacOS and have MacPorts installed, you can run:
4.1.2. Homebrew
If you’re on MacOS and have Homebrew installed, you can run:
4.2. Installation on Windows
If you’re on Windows, you can also use the Windows installer.
4.3. Other Distributions
You may download other distributions of Groovy from the ASF archive repository or from the Groovy artifactory instance (also includes pre-ASF versions).
4.4. Source Code
If you prefer to live on the bleeding edge, you can also grab the source code from GitHub.
4.5. IDE plugin
If you are an IDE user, you can just grab the latest IDE plugin and follow the plugin installation instructions.
5. Install Binary
These instructions describe how to install a binary distribution of Groovy:
Download a binary distribution of Groovy and unpack it into some folder on your local file system.
Set your GROOVY_HOME environment variable to the directory where you unpacked the distribution.
Add GROOVY_HOME/bin to your PATH environment variable.
Set your JAVA_HOME environment variable to point to your JDK. On OS X this is /Library/Java/Home , on other unixes its often /usr/java etc. If you’ve already installed tools like Ant or Maven you’ve probably already done this step.
You should now have Groovy installed properly. You can test this by typing the following in a command shell:
Which should create an interactive groovy shell where you can type Groovy statements. Or to run the Swing interactive console type:
Источник