Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For example, to use the source from the Groovy 1.1-beta-2 release:

No Format

wget http://dist.groovy.codehaus.org/distributions/groovy-src-1.1-beta-2.zip
unzip groovy-src-1.1-beta-2.zip

...

If you are behind a proxy firewall, you may need to set up proxy information in a ~/.ant/settings.xml or ~/.m2/settings.xml file:

Code Block

<?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 ~/.ant/settings.xml or ~/.m2/settings.xml file of the form:

Code Block

<?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 target/install, run:

No Format

ant install
Info
titleUseful Information

In case of java.lang.OutOfMemoryError try increasing the size of the heap space by setting the ANT_OPTS variable as follows:

ANT_OPTS=-Xmx512M

Increase the size of the heap size if required.

...

After this finished successfully, then you can try out the distribution that was just built. For example to play with groovysh you can run:

No Format

./target/install/bin/groovysh

Sometimes its desirable to skip the test execution for faster turn around. To turn off tests set the skipTests property, as in:

No Format

ant install -DskipTests=true

...

To build a Groovy distribution archive:

No Format

ant dist

This will build everything, generate documentation and create distribution archives under target/dist:

Section
Column
  • groovy-binary-VERSION.zip
  • groovy-docs-VERSION.zip
  • groovy-src-VERSION.zip
Column
width60%
Note

As you might have guessed VERSION will be the version of the project you are building, like 12.10.0-beta-2-SNAPSHOT for pre-releases or 12.10.0-beta-2 for a released version.

...

To publish artifacts to the Maven 2 repository, run:

No Format

ant deploy

This will either publish to the release repository or the snapshot repository based on whether the POM version contains SNAPSHOT or not.

...