Java Developer Kit (JDK)
You will need a JDK 1.5+ (J2SE 1.5+) or compatible JDK to build Groovy.
To execute the build process you need to have Apache Ant version
1.7.0 (or newer) installed.
The optional TraX taskdefs are required, and some linux distributions, such as openSUSE, may require you to install them separately from the ant packages.
To fetch the source code for the server, you will need to have a Git client version 1.2 (or newer, 1.4 is recommended) installed.
If you are using a source archive from the distribution site site, then you do not need to have a Git client installed.
Fetch the Groovy Source Code
Have a look at our Git page for further details on how to get the sources, either from the Codehaus Git repository, or the GitHub mirror.
From a Source Archive
Select one of the
*-src.* archives from the distribution site site and unzip it.
For example, to use the source from the Groovy
wget http://dist.groovy.codehaus.org/distributions/groovy-src-2.0.0-beta-2.zip unzip groovy-src-2.0.0-beta-2.zip
Preparing to Build for the First Time
If you are behind a proxy firewall, you may need to set up proxy information in a
<?xml version="1.0"?> <settings> <proxies> <proxy> <protocol>http</protocol> <host>proxy.host.net</host> <port>8080</port> <nonProxyHosts>localhost</nonProxyHosts> </proxy> </proxies> </settings>
If you will need to publish artifacts then you will need to have appropriate permissions with codehaus and ensure that you have stored your credentials in a
~/.m2/settings.xml file of the form:
<?xml version="1.0"?> <settings> <servers> <server> <id>codehaus.org</id> <username>YOUR_USER_NAME</username> <password>YOUR_PASSWORD</password> </server> </servers> </settings>
To build everything, run tests and create a complete installation in
In case of java.lang.OutOfMemoryError try increasing the size of the heap space by setting the ANT_OPTS variable as follows:
Increase the size of the heap size if required.
If the unit tests hang indefinitely while building, try adding the following to your ant command:
After this finished successfully, then you can try out the distribution that was just built. For example to play with
groovysh you can run:
Sometimes its desirable to skip the test execution for faster turn around. To turn off tests set the
skipTests property, as in:
ant install -DskipTests=true
To build a Groovy distribution archive:
This will build everything, generate documentation and create distribution archives under
To publish artifacts to the Maven 2 repository, run:
If deploy is failing, then check Installing the UserTrust CA into the Java JDK.
Building from IntelliJ IDEA
Please follow the instructions found here.
Please follow the instructions on the groovy github page: https://github.com/groovy/groovy-core#building