Pages

Sunday, April 5, 2015

Grails 3 Released. Setting up -javaagent

Grails 3 was released just recently and with all the new stuff it looks really-really-really awesome release! (Really hope that Grails will find the new home now). The two key changes for me are 1) moving to Gradle instead of Gant, and 2) building on top of Spring Boot. NOw it looks like it's basically the Gradle project with custom conventions that are derived from Grails 2.x.

For the first time, it feels like Grails is not a toy framework any more :)

What's not that cool (my own very subjective opinion), is the introduction of application.yml. It's almost impossible to modify it without reading the documentation. Even XML version of it (yes!) would have been more practical.

There are many other nice things added - go look for yourself.

Setting up a -javaagent argument for Grails 3

My personal interest with any new framework or server is usually related to the projects I'm working with. Thus, the first thing I wanted to check is how could I set up a -javaagent for Grails 3 application. Turns out, it's not as simple as you would expect.

Thanks to @bsideup, here's the snippet that you'd have to add to build.gradle file to setup a -javaagent argument, given that the agent JAR is located somewhere in file system:

In the example above, xrebel.jar is the agent package that is located somewhere in my file system. One can use the absolute path just fine in there.

Here's the another snippet, with DSL-style:

With this, I can confirm, that XRebel works with Grails 3 :)

No comments:

Disqus for Code Impossible