Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

For background on how to use the maven integration, see Groovy-Eclipse compiler plugin for Maven.  This page describes how to get started with development on the project.

Getting started

Clone the git repo:

 

The interesting components are in the /extras folder. There are several projects located here:

Icon

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).
  • 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.

The are 2 maven artifacts required for compilation of groovy code in maven: groovy-eclipse-compiler and groovy-eclipse-batch.  The first is just a thin wrapper around the compiler, and the second contains all of the files required to build. It is a bunch of Eclipse and Groovy-Eclipse jars unzipped and recombined into an uber-jar.

Note on versioning

Icon

Historically, version numbers for both artifacts use a -01, -02, etc as a suffix. This is because groovy-eclipse-compiler versions track groovy-eclipse releases, but sometimes off-cycle releases are required.  Similarly, groovy-eclipse-batch follows Groovy compiler releases

Deploying groovy-eclipse-compiler

To be placed in ~/.m2 folder

Release deploy:

  1. Ensure that you have write privileges to the maven repos on codehaus (Guillaume should be able to help you there)
  2. Copy the settings-sample.xml from the repo into your ~/.m2 folder and add your user/pass
  3. Ensure that the version qualifier has no -SNAPSHOT
  4. Run from root of git repo: mvn deploy --no-plugin-updates -Pcodehaus-release -P test -f extras/groovy-eclipse-compiler/pom.xml 

Snapshot deploy

  1. As above
     
  2. As above
  3. Ensure version qualifier is -SNAPSHOT
  4. Run mvn deploy -f extras/groovy-eclipse-compiler/pom.xml 

Deploying groovy-eclipse-batch

  1. Import this project into your eclipse: extras/groovy-eclipse-batch-builder
  2. Open build.properties of the project
  3. Update the version number(s)
  4. Uncomment only one of the do-xx-build options
  5. Update the jar.dest, eclipse.install.plugins, git.repo.loc, groovy.deploy.username, groovy.deploy.password properties to something that makes sense for your system
  6. Run `ant extract-create-install` and then run the groovy-eclipse-compiler-tests to make sure passes
  7. Run ant extract-create-publish to push to maven central (actually, pushes to codehaus releases area, which is synced with maven central). (May need to run this on the command line) Remember, there are no snapshots here, only releases 

This build process assumes that there is an existing Eclipse installation around and that the groovy-eclipse projects have been imported into a workspace and compile successfully.  The build process will be copying class files from the bin folders of the projects.

Integration tests

The groovy-eclipse-compiler-tests project contains regression tests. This project contains a set of sample projects that invoke the compiler in different ways.  Run these often, even though they don’t test everything.  It would be nice to merge this project with the groovy-eclipse-compiler project, but this hasn't happened yet.

To run the integrations tests:

The groovy-eclipse-maven-tests project is just a play area where I try new things out.

Unit Tests

There are none. The person who is responsible for this should be sacked...oh wait, that was me.

Maven Archetype

There is also a groovy-eclipse-compiler archetype, but it hasn’t been maintained in a looooong time. The project is groovy-eclipse-quickstart. It would be good to move this project into the groovy-eclipse-compiler project.

  • No labels