IntelliJ Idea groovy.lang.GroovyRuntimeException: Conflicting module versions
<p>My maven builds are fine and able to run groovy from cli. However if I try to run my groovy class inside IntelliJ Idea (version 15 community edition), its gives me below error. </p>

<pre><code>Exception in thread "main" java.lang.ExceptionInInitializerError
at org.codehaus.groovy.runtime.InvokerHelper.&lt;clinit&gt;(InvokerHelper.java:61)
at groovy.lang.GroovyObjectSupport.&lt;init&gt;(GroovyObjectSupport.java:32)
at groovy.lang.Closure.&lt;init&gt;(Closure.java:219)
at groovy.lang.Closure.&lt;init&gt;(Closure.java:236)
at groovy.lang.Closure$1.&lt;init&gt;(Closure.java:203)
at groovy.lang.Closure.&lt;clinit&gt;(Closure.java:203)
at filter.App.&lt;clinit&gt;(App.groovy)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:122)
Caused by: groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-all is loaded in version 2.3.9 and you are trying to load version 2.4.5
    at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl$DefaultModuleListener.onModule(MetaClassRegistryImpl.java:509)
    at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromProperties(ExtensionModuleScanner.java:77)
    at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromMetaInf(ExtensionModuleScanner.java:71)
    at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanClasspathModules(ExtensionModuleScanner.java:53)
    at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.&lt;init&gt;(MetaClassRegistryImpl.java:110)
    at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.&lt;init&gt;(MetaClassRegistryImpl.java:71)
    at groovy.lang.GroovySystem.&lt;clinit&gt;(GroovySystem.java:33)
    ... 10 more
</code></pre>

<p>Not sure how to get rid of this. </p>

<p>This is my pom dependency. </p>

<pre><code>    &lt;dependency&gt;
        &lt;groupId&gt;org.codehaus.groovy&lt;/groupId&gt;
        &lt;artifactId&gt;groovy-all&lt;/artifactId&gt;
        &lt;version&gt;2.4.5&lt;/version&gt;
    &lt;/dependency&gt;
</code></pre>

<p>And I am using spring boot. </p>

<pre><code> &lt;parent&gt;
    &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
    &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
    &lt;version&gt;1.3.2.RELEASE&lt;/version&gt;
    &lt;relativePath&gt;&lt;/relativePath&gt;
&lt;/parent&gt;
</code></pre>

<p>This is my groovy version installed in system. </p>

<pre><code>Groovy Version: 2.4.5 JVM: 1.8.0_60 Vendor: Oracle Corporation OS: Linux
</code></pre>

<p>Please let me know if someone knows about this. </p>