Previously, if you are using Eclipse with the plugin m2e, here is explained how to configure Eclipse in order to use Tomcat with it:
tomcat-maven-plugin: Server returned HTTP response code: 403
Now, we need a proper settings.xml in the C:\Users\user.m2 with the same user and password than tomcat-users.xml. Then, we need to have our pom.xml configurated as follow:
<!-- The next server must be the same than the one in settings.xml (at C:\Users\user\.m2): -->
The next command get the configuration values of our database from datasource.groovy - production environmnent:
To get the values from the development environment, the commands are the next:
Note1: if we not add -DskipTests (to no running tests before to deploying), and some test fail, it won't deploy.
Note2: in eclipse (with the plugin m2e for maven installed), you have to type these commands in the next field:
Run - Run Configurations - Maven Build - Goals
Do not forget to create an empty web.xml under src/main/webapp/WEB-INF!
I think the key part is binding the Grails plugin to the maven-war phase. You should accept your own answer as it's a good reference for the correct config for the grails plugin.