Versions Compared

Key

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

...

Info

The most recent version of the Groovy-Eclipse-Compiler plugin for maven is 2.67.0-01.
2.7.01-01-SNAPSHOT is now available from http://nexus.codehaus.org/snapshots/.

...

Code Block
<build>
...
<plugins>
  <plugin>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>2.3.2</version>
    <configuration>
      <compilerId>groovy-eclipse-compiler</compilerId>
      <!-- set verbose to be true if you want lots of very uninteresting messages -->
      <!-- <verbose>true</verbose> -->
    </configuration>
    <dependencies>
      <dependency>
        <groupId>org.codehaus.groovy</groupId>
        <artifactId>groovy-eclipse-compiler</artifactId>
        <version>2.67.0-01</version>
      </dependency>
    </dependencies>
  </plugin>
  ...
</plugins>
</build>

By default, this will use Groovy 12.80.4 0 to compile your code. If you would prefer to use 1.8.6 or 1.7.10, then add another dependency to the maven-compiler-plugin:

Code Block
<dependency>
  <groupId>org.codehaus.groovy</groupId>
  <artifactId>groovy-eclipse-batch</artifactId>
  <version>1.8.6-01</version>
  <!-- <version>1.7.10-06</version> -->
</dependency>

This will allow Groovy files to be compiled. The groovy-eclipse-compiler recognizes all settings supported by the maven-compiler-plugin.

...

Code Block
xml
xml
<build>
  ...
  <plugin>
    <groupId>org.codehaus.groovy</groupId>
    <artifactId>groovy-eclipse-compiler</artifactId>
    <version>2.67.0-01-SNAPSHOT<01</version>
    <extensions>true</extensions>
  </plugin>
  ...
</build>

...

A sample project using the compiler plugin as well as the source code for the plugin itself are available from the Codehaus.org subversion github repository:

Info

The SVN repository URL full URL to the maven projects is:

https://svngithub.codehaus.orgcom/groovy/groovy-eclipse/trunktree/master/extras

There are several projects in the repository:

  • groovy-eclipse-compiler : the compiler plugin itself (an m2eclipse project).
  • groovy-eclipse-batch-builder : a set of ant scripts and configuration files used to build the groovy-eclipse-batch artifact. This artifact is an amalgamation of all jars required for compiling Groovy and Java code in Eclipse, including ecj (the Eclipse compiler for Java), the non-UI components of Groovy-Eclipse, the Groovy jars, and various required Eclipse bundles.
  • groovy-eclipse-maven-tests : a sample project that uses the compiler plugin (an m2eclipse project).
  • org.codehaus.groovy.m2eclipse : an Eclipse plugin that provides integration between Groovy-Eclipse and m2eclipse (the Maven tooling for Eclipse).
  • Feature org.codehaus.groovy.m2eclipse : an Eclipse feature that is required for building and releasing the org.codehaus.groovy.m2eclipse plugin.

...

If you are going to be working with your maven project inside of Eclipse, it is strongly recommended that you use m2eclipse. And to use your Groovy projects with m2eclipse, you will need to install the Groovy-Eclipse configurator for m2eclipse. This feature is available any of the Groovy-Eclipse update sites (e.g., nightly, milestone, or release). Just go to your Eclipse update manager and add the Groovy-Eclipse update sites (if you haven't done so already). Select the Groovy-Eclipse M2E integration.

Release Builds

Eclipse levelDevelopment update site

...

...

...

...

3.

...

...

...

Development Builds

Eclipse levelDevelopment update site

...

...

...

...

3.

...

...

Where to find more information and ask questions

...