Changing port for Google App Engine while using grails

The context

I am using Google App Engine using the  Grails AppEngine plugin . The default port is 8080, but I needed to run it on a different port.

It was easy to figure out that Google App Engine supports running the development server on any configured port. But it took me some time to realize that [...]

Error: Appengine is already registered

The context:

I am using Google App Engine along with Grails AppEngine plugin. At some point I started getting an exception when I was trying to start my development server. The only thing I had done before I got the error was- I had switched from App Engine SDK  1.2.5 to 1.2.8.

The solution

The problem is that [...]