2

I need to set up my Eclipse IDE again and unlike when I first set it up I have issues with the Groovy software. I would need the Groovy compiler version 2.4, but can only select between 2.5, 3.0 or 4.0. I used the same location as last time: https://dist.springsource.org/release/GRECLIPSE/e4.16

Also I tried other location which unfortunately don't work properly. I have the Eclipse version 2020-06. Can anyone tell me what I do wrong this time or which configuration to adapt?

Thank you.

emilles
  • 1,104
  • 7
  • 14
  • 2
    Any reason you're not using the current release, 2020-12? Also, it looks intentional: https://github.com/groovy/groovy-eclipse/issues/1183#issuecomment-710073882 – nitind Jan 08 '21 at 15:31
  • 1
    Newer versions require at least Java 11, but I am working with Java 8. Thanks for the link. It helped. Since they just released Groovy 4.0. I needed to point out the older release with following update site: https://dist.springsource.org/release/GRECLIPSE/3.9.0/e4.16 – llocalhorst Jan 09 '21 at 13:49

1 Answers1

0

Download "Eclipse IDE for Java Developers" (2020-09 a.k.a 4.17) from https://www.eclipse.org/downloads/packages/release/2020-09/r

Note: The first link on the page gets you the Oomph installer which WILL NOT WORK. Use one of the links below. If there is "inst" anywhere in the name of the file you downloaded, try again.

The reason why Oomph breaks GRECLIPSE is that it will add an update site which will try to install the latest 4.x GRECLIPSE -> fail.

Unpack the archive somewhere.

Go to Help -> Install New Software.

Add this update site: https://dist.springsource.org/release/GRECLIPSE/3.9.0/e4.17

(Using the marketplace will leave you with GRECLIPSE 4.x)

Always select the main package and Maven support if you need it.

Click Next.

Make sure that it tries to install 3.9.0 and nothing else.

Click Next & Finish until it installs.

--- old instructions for reference ---

You will need to download Eclipse Photon from here

https://www.eclipse.org/downloads/packages/release/photon/r

and then Groovy Feature 3.5.0.v201909291357-e48-RELEASE add this update site:

https://dist.springsource.org/release/GRECLIPSE/e4.8

What you should see when you do this correctly

All the versions of Eclipse after this one don't support Groovy 2.4 anymore.

I've tried to do this with Oomph but that way, I always ended up with Groovy Feature 4.1.

My solution then was to create another workspace for all my Groovy 2.4 projects (Jenkins Pipelines, mostly).

Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820
  • You can use a newer eclipse version if you use the 3.9.0 release of groovy-eclipse, which is the last to include support for Groovy 2.4. – emilles Jul 05 '21 at 15:38
  • @emilles Unfortunately not because p2 will then install plugin version 4.1 (even when I install 3.9), even when all update sites but the one from springsource are disabled / removed. My guess is that Oomph caches the latest version and since OSGi has the rule "latest version is always best". Also, when installing 3.9, there is no option to add a 2.4 compiler. Only 2.5 and 3.0 are listed. When you start Eclipse with 3.9, 2.4 is not selectable in the prefs, so it's not built in either. – Aaron Digulla Jul 08 '21 at 17:49
  • Users that don't use Oomph will not have the issue you describe about bundle caching. 3.9 release does not have separate Groovy Compiler 2.4 feature because it is included as part of main feature. I can't speak to what you have installed, only what I know the update sites offer. – emilles Jul 09 '21 at 02:27
  • @emilles I spent roughly one day to collect the instructions above. That was the only combination I could get to work. If you have instructions how to achieve the same with a newer version of Eclipse, please post another answer. – Aaron Digulla Jul 12 '21 at 21:49