Grails application with ws-client on AWS Elastic Beanstalk

If you happen to have a grails project to deploy on Amazon AWS Elastic Beanstalk, and your project depends on ws-client, you may experience a few issues, which I am documenting here.

Please note that there is nothing new here, as the information is already available on the Internet, and I am reposting here for ease of use.

Elastic beanstalk comes with a jre, which is not enough if you need to compile from a wsdl, so you need to install a jdk.

Find the installed jdk:

Remove it:

Download the jdk (reportedly the sun jdk works better than the openjdk, but I hadn’t issues so far). I haven’t been able to use a jdk7, javac failing with a source/release target conflict.

Install the jdk:

There you go.