My colleague and I had the same problem today. We manually fixed it using basically this process:
- Clean all projects without starting a new build.
- Exit eclipse.
- Add/edit the project configuration files below.
- Start eclipse.
- Refresh project.
- Enable Project->Build Automatically.
Here are the files to add/edit:
.project : Add this line to the
<natures>
element:<nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
.classpath : Add this line:
<classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/>
.settings/org.eclipse.jdt.groovy.core.prefs : New file:
eclipse.preferences.version=1 groovy.compiler.level=-1
Note that the target project was already a java project. To add this stuff to a plain or other non-java project, you might also need to add the following:
.project :
<buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> </natures>
.classpath : Copy from one of your java projects and edit appropriately. Here's a default .classpath file:
<?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="output" path="bin"/> </classpath>