Skip to content

Building Maven Batch Compiler

Kris De Volder edited this page Jul 10, 2014 · 28 revisions

This page details how to build and deploy the groovy-eclipse maven batch compiler. The old version of this information is here

The Artifacts

Groovy Eclipse batch compiler consists of two artifacts published to a maven repo (maven central / codehaus).

  • groovy-eclipse-compiler: a wrapper allowing using the greclipse compiler from maven
  • groovy-eclipse-batch: the actual groovy eclipse compiler (parts of it, packaged in a giant jar).

Maven Settings

You will need write access to the maven repos on codehaus. Guillaume should be able to help you there. Use your codehaus credentials to fill in the template below and place a copy of it into ~/.m2/settings.xml.

<!-- This is a sample settings.xml file for publishing maven artifacts to the codehaus maven repos -->
<!-- This should go in your ~/.m2 directory -->
<settings xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                  http://maven.apache.org/xsd/settings-1.0.0.xsd">
 <servers>
  <server>
    <id>codehaus.org</id>
    <username>USER_NAME</username>
    <password>PASSWORD</password>
  </server>
  <server>
    <id>codehaus-nexus-snapshots</id>
    <username>USER_NAME</username>
    <password>PASSWORD</password>
  </server>
  <server>
    <id>codehaus-nexus-staging</id>
    <username>USER_NAME</username>
    <password>PASSWORD</password>
  </server>
 </servers>
</settings>

Setting up an Eclipse Workspace

The build process is a bit clunky. It relies on having a Eclipse workspace setup in which you successfully compiled Greclipse. The build will collect and jar-up compiled .class files from your workspace. See the project (README.md)[https://github.com/groovy/groovy-eclipse/blob/master/README.md] for instructions on getting a workspace setup.

Once you have that setup, you the interesting components are in the 'extras' folder. You may want to import them into your workspace as well at this point.

  • 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). groovy-eclipse-compiler-tests : integration tests for the groovy-eclipse-compiler groovy-eclipse-quickstart : Archetype project for groovy-eclipse-compiler. Not maintained. 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.

Updating To a New Version of Groovy

Prerequisite: first the Groovy Eclipse Compiler itself has to be update. The process for doing this is documented [here](Updating the groovy in groovy eclipse).

Clone this wiki locally