Josh K
Josh K

Reputation: 28893

Grails Compile Event

When running under grails run-app is there a way to run a script if any file(s) are recompiling?

I want to run a custom script when any file has been changed and is being recompiled. The eventCompileStart only runs when building a war.

Upvotes: 0

Views: 1474

Answers (1)

Gregg
Gregg

Reputation: 35904

I'm running grails 1.3.7. I created an _Events.groovy file in grails-app/scripts. It contains the following:

eventCompileStart = { kind ->
  println "Triggered ${kind}"
}

The first time I did a grails run-app I got the output. I then left the application running, and created a new Domain. Again, I got the output. It does not only execute on grails war.

Upvotes: 2

Related Questions