title: Change Grails' Groovy version
body: <p>How can I change the groovy version used by Grails 1.3.7 to groovy 1.7.9? </p>
  
  <p>I'm having this problem in a Grails 1.3.7 application in which every minute a Quartz process instantiates some 500 new objects like this:</p>
  
  <pre><code>class Foo{
   Bar bar
   Date d = new Date()
   int v
  }
  
  def f = new Foo(bar:b, v:value)
  </code></pre>
  
  <p>What I'm observing is that on each run, this is taking longer. At first, it takes a few nanoseconds, but by the time the application crashes with a PermGen out of memory error, this process takes, sometimes, more than 10 seconds... to instantiate an object!</p>
  
  <p>I've take a few Heap Dumps and found that a CallSiteClassLoader was taking an enormous amount memory from previously instated objects. After reading this <a href="http://groovy.329449.n5.nabble.com/Trying-to-debug-a-permgen-leak-what-is-this-Class-td3348106i40.html" rel="noreferrer">thread</a> I decided to directly change the groovy jar's in my WAR. Now the application is running smoothly as it should, and again, after a few Heap Dumps, there seem to be no memory leaks.</p>
  
  <p>But each WAR I generate, keeps coming with groovy 1.7.7 and I have to manually change it.</p>
  
  <p>Thanks!</p>