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):
@Grab(group='org.codehaus.groovyfx', module='groovyfx', version='0.3.1')
import groovyx.javafx.GroovyFX
println GroovyFX.class.name
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:
Groovyc: unable to resolve class groovyx.javafx.GroovyFX
I was able to get this script working in the GroovyConsole without much problem and as expected....
I tried grabbing another randomly chosen dependency (turned out to be a Spring library) and it worked straight out:
@Grab(group='org.springframework', module='spring', version='2.5.6')
import org.springframework.jdbc.core.JdbcTemplate
println JdbcTemplate.class.name
I can see no good reason why the Spring library should work, but not the GroovyFX library!!!!
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/)
What can cause this weird and extremely frustrating problem??