In our project there is a requirement like force all user to use mvn for running the grails application. So I have a task assigned for it like disable the run-app support or override run-app command so when other guy try to run application using grails runApp it will show some message and should exit. Can any body help please.
Asked
Active
Viewed 223 times
1
-
2duplicate ? http://stackoverflow.com/questions/16774820/grails-app-only-use-maven-to-run-drop-support-for-grails – Kamil Mikolajczyk May 28 '13 at 10:56
1 Answers
2
HI I resolved it by doing following step:
I created _Events.groovy by executing "grails create-script _Events". By doing this it will create _Events.groovy in scripts directory and in eventCompileStart I have written following code and it works fine for me.
eventCompileStart = {
if( BuildSettingsHolder.settings.grailsHome){
println"""
*********************************************************
* "grails run-app" support is disabled *
* *
* Try to run "mvn clean grails:run-app" *
* *
*********************************************************
"""
System.exit(0)
}
}
I hope it will help some one.

user9873999
- 311
- 3
- 15