Hmm. I added a new optional mojo "SetVersion" which you could use if you wanted to. However, what we are discussing now is to make the plugin by default overwrite the grails version with the maven version. I am fine with this, but in implementing it we have some decisions.
Currently at 'validate' phase, the plugin invokes MvnValidatePluginMojo which checks to see whether the grails version and maven version match. It borks if they dont. To get around this, I was executing my optional SetVersion before this.
But now that I look at having setVersion be executed every time, it doesnt make sense to me to have v'alidate' check and enforce versions at validate time. It could either ignore versions, or programatically update the grails project at this time itself, or it could invoke 'setversion' to do the job at this time too.
I'm all ears but I propose:
1. MvnValidateMojo doesnt bother checking versions any more.
2. SetVersion is added to default lifeycle to executed at 'process-sources' time to set grails version based on maven version
This is now available by including the "set-version" goal in your execution's goal list.