Actually it's simpler now, even on Windows. You don't need to run "gradlew
--continuous".
By curiosity, I tried to stop at CommunicationEventServices.groovy[489] with the complete (not Eclipse accepted) package name instead of
communication, nothing happened.
While still running in debug mode, I just changed the package name to
communication, the breakpoint worked :)
So Eclipse interprets dynamic Groovy changes, as it was in the past with "gradlew --continuous". I don't think the location is a problem as long as
Eclipse accepts the package name.
HTH
Le 30/04/2023 à 18:52, Jacques Le Roux a écrit :
I can answer my question by my own. What is described at
https://markmail.org/message/2grqu63yvfpvxzz6:
/<<I tried and it works. So here is the (simple) plan: /
/1. We move all Groovy scripts from /groovyScripts/ to /src/main/groovy/ //
//2. We add the necessary packages names//
//3. Devs can then open "gradlew --continuous" in a terminal and let it
like//
//that. It will continuously build on any changes in Gradle sourcesets /
/So, if you modify a Groovy scripts while running an OFBiz instance, the
changes//
//will be reflected in the instance and you can check possible syntax or
alike issues in the terminal running the continuous build. It's very fast
since//
//only changes have an impact on the build.>>/
no longer works with Win7 (and also old *nix versions)? You now need to set a
property:
https://stackoverflow.com/questions/62674182/how-can-i-enable-gradle-file-system-watching-persistently
I'll try that on Ubuntu 20.04 and Eclipse 23.03
Jacques
Le 29/04/2023 à 14:10, Jacques Le Roux a écrit :
Hi Daniel,
Do you know how are reacting dynamically changed Groovy scripts while you are
Debugging them, at least in Eclipse (I don't use Intellij).
The big advantage of minilang was its faculty to allow dynamic changes, like
Freemarker does. We have the same advantage with Groovy.
But I wonder for dynamically changed Groovy scripts while you are Debugging in
Eclipse.
For instance for Java it's sometimes allowed, but sometimes you need to reload
all :/
Jacques
Le 28/04/2023 à 12:30, Daniel Watford a écrit :
The reason for checking is that groovyScripts are loaded as independent
scripts and compiled at runtime by OFBiz (See
GroovyUtil#getScriptClassFromLocation), rather than being loaded from a
pre-compiled JAR.