title: How to grab a dependency and make it work with IntelliJ project?
body: <p>I am trying to start a GroovyFX project within IntelliJ 12.
  However, I have not been able to get IntelliJ to compile and run the following simple script (for reproducing the problem in the simplest manner possible):</p>
  
  <pre><code>@Grab(group='org.codehaus.groovyfx', module='groovyfx', version='0.3.1')
  import groovyx.javafx.GroovyFX
  println GroovyFX.class.name
  </code></pre>
  
  <p>I used IntelliJ's support for Grape's Grab to add groovyfx as a dependency of my module (the jar is shown under "External Libraries" and the editor does not complain that the class is missing after that!) but still, when I run the script, it throws an error:</p>
  
  <blockquote>
    <p>Groovyc: unable to resolve class groovyx.javafx.GroovyFX</p>
  </blockquote>
  
  <p>I was able to get this script working in the GroovyConsole without much problem and as expected....</p>
  
  <p>I tried grabbing another randomly chosen dependency (turned out to be a Spring library) and it worked straight out:</p>
  
  <pre><code>@Grab(group='org.springframework', module='spring', version='2.5.6')
  import org.springframework.jdbc.core.JdbcTemplate
  println JdbcTemplate.class.name
  </code></pre>
  
  <p>I can see no good reason why the Spring library should work, but not the GroovyFX library!!!!</p>
  
  <p>I even double checked that the GroovyFx library had been actually downloaded, and it is there where it should be (under {user.home}/.groovy/grapes/{group}/{module}/jars/)</p>
  
  <p>What can cause this weird and extremely frustrating problem??</p>