I have a grails app that has some run-scripts that I want to run in my build process. I’m using a build process with ant that does a bunch of things before it creates a war file.
However, the running of the script wants to connect to the database in the datasource file. So that fails. I want to be able to configure the datasource file so that it has a connection during the running of the app on dev, qa, staging and production servers. But I want it to ignore the connection definitions during running of special scripts on my build server.
What is the proper way to do this please?
The simplest thing to do would be to create a new environment that uses an in-memory database, e.g.
and then specify it when running the script: