Developer's Diary
Software development, with Terry Ebdon
|
I've been using Gradle for at least 18 months, with no great problem. It's a nice app. It seems to get quite confused when running Grails though. I often find that zapping the Gradle JVM, and allowing it to be recreated, solves weird start up failures with the grailsw run-app
command. I'm reluctant to disable the Gradle daemon as it's a brute force approach that applies to all projects, and it's only been a problem with my prototype Grails app. I suspect I will need to disable the daemon. For the moment I'm killing the thing, as needed, via a script.
The Java jps
command lists the Java instances, giving the name and process ID.
I need to kill the correct process. A perfect task for my favourite mini-language, awk.
Notice that I'm writing the kill command to a file, and not executing it from awk. I was getting odd behaviour with gawk and it wasn't worth the effort of debugging for a quick script. The script reads the output of jps and generates a kill file. The whole thing is wrapped in a command script:
10-JUN-2020 👈 Top of page 👉 12-JUN-2020
© 2020 Terry Ebdon.
Find me coding on GitHub, networking on LinkedIn, answering questions on Stack Exchange and hanging out on twitter.