I am using Grails framework (3.3.x and 3.2.x) and all grails applications is always producing some strange compile error, while application is always compile fine with gradle and internal eclipse compiler. So I can run an app as regular spring boot app and debug it. The issue is if I have some gradle sub-project then any project that depends on it will be not compiled at all by internal eclipse compiler, so will be not runnable and I can not debug it, while gradle still can compile and run it.
I am using:
Eclipse Oxygen.3a Release (4.7.3a)
Groovy-Eclipse 3.1.0.xx-201808241936-e47
You can easily create sample app with sdkman or use attached one below:
- Install sdkman:
curl -s "https://get.sdkman.io" | bash
- Source or open new shell:
source "$HOME/.sdkman/bin/sdkman-init.sh"
- Install grails:
sdk i grails
- Create sample app in some folder (grails-example):
grails create-app --profile web --inplace
Import it into eclipse and add gradle nature, you will get:
The project was not built since its build path is incomplete. Cannot find the class file for grails.testing.services.ServiceUnitTest$Trait$FieldHelper$1. Fix the build path then try building this project
Based on source you can get different variations of this error referencing different classes from grail, like:
The project was not built since its build path is incomplete. Cannot find the class file for grails.artefact.Controller$Trait$FieldHelper$1. Fix the build path then try building this project
While project is actually compile fine and running.
grails-sample.zip
I am using Grails framework (3.3.x and 3.2.x) and all grails applications is always producing some strange compile error, while application is always compile fine with gradle and internal eclipse compiler. So I can run an app as regular spring boot app and debug it. The issue is if I have some gradle sub-project then any project that depends on it will be not compiled at all by internal eclipse compiler, so will be not runnable and I can not debug it, while gradle still can compile and run it.
I am using:
Eclipse Oxygen.3a Release (4.7.3a)
Groovy-Eclipse 3.1.0.xx-201808241936-e47
You can easily create sample app with sdkman or use attached one below:
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk i grails
grails create-app --profile web --inplace
Import it into eclipse and add gradle nature, you will get:
Based on source you can get different variations of this error referencing different classes from grail, like:
While project is actually compile fine and running.
grails-sample.zip