Problem running a groovy script as part of a maven project
Hi,
I'm using EAP Build 10762 and have problems running a groovy script from a maven project. It happens when the script uses dependencies from the pom.xml file. The message is "unable to resolve class...".
It works fine in IDEA 8.1.3.
Anybody experiencing a similar problem?
Thanks
Please sign in to leave a comment.
Are these references green in the code, e.g. are the maven dependencies
resolved correctly in IDEA's module structure?
Yes. Dependencies are resolved correctly.
Does the problem occur while compiling or while running the script? If
the latter, could you please paste the whole console content here?
C:\Outils\sdlc\sun\jdk1.6.0_13\bin\java -Dtools.jar=C:\Outils\sdlc\sun\jdk1.6.0_13\lib\tools.jar "-Dgroovy.home=C:\Documents and Settings\synlebs\.m2\repository\org\codehaus\groovy\groovy-all\1.6.4" -Dgroovy.starter.conf=C:\Outils\sdlc\IntelliJIDEA9\plugins\Groovy\lib\groovy-starter.conf -Didea.launcher.port=7533 -Didea.launcher.bin.path=C:\Outils\sdlc\IntelliJIDEA9\bin -Dfile.encoding=windows-1252 -classpath "C:\Documents and Settings\synlebs\.m2\repository\org\codehaus\groovy\groovy-all\1.6.4\groovy-all-1.6.4.jar;C:\Outils\sdlc\IntelliJIDEA9\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.groovy.tools.GroovyStarter --conf C:\Outils\sdlc\IntelliJIDEA9\plugins\Groovy\lib\groovy-starter.conf --classpath "C:\ws\groovy_scripts\target\classes;C:\Documents and Settings\synlebs\.m2\repository\com\oracle\ojdbc14\10.2.0.4.0\ojdbc14-10.2.0.4.0.jar;C:\Documents and Settings\synlebs\.m2\repository\junit\junit\3.8.2\junit-3.8.2.jar;C:\Documents and Settings\synlebs\.m2\repository\org\apache\ant\ant\1.7.1\ant-1.7.1.jar;C:\Documents and Settings\synlebs\.m2\repository\org\apache\ant\ant-launcher\1.7.1\ant-launcher-1.7.1.jar;C:\Documents and Settings\synlebs\.m2\repository\jline\jline\0.9.94\jline-0.9.94.jar;C:\Documents and Settings\synlebs\.m2\repository\com\uc4\uccall3\6.00A904-101\uccall3-6.00A904-101.jar;C:\Documents and Settings\synlebs\.m2\repository\joda-time\joda-time\1.4\joda-time-1.4.jar" --main groovy.ui.GroovyMain C:\ws\groovy_scripts\src\main\groovy\ca\optinf\groovyscripts\Test.groovy
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, C:\ws\groovy_scripts\src\main\groovy\ca\optinf\groovyscripts\Test.groovy: 2: unable to resolve class org.joda.time.DateTime
@ line 2, column 1.
import org.joda.time.DateTime
^
C:\ws\groovy_scripts\src\main\groovy\ca\optinf\groovyscripts\Test.groovy: 3: unable to resolve class org.joda.time.LocalDate
@ line 3, column 1.
import org.joda.time.LocalDate
^
C:\ws\groovy_scripts\src\main\groovy\ca\optinf\groovyscripts\Test.groovy: 4: unable to resolve class org.joda.time.format.DateTimeFormat
@ line 4, column 1.
import org.joda.time.format.DateTimeFormat
^
C:\ws\groovy_scripts\src\main\groovy\ca\optinf\groovyscripts\Test.groovy: 8: unable to resolve class org.joda.time.DateTime
@ line 8, column 37.
LocalDate localDate = new LocalDate(dt)
^
C:\ws\groovy_scripts\src\main\groovy\ca\optinf\groovyscripts\Test.groovy: 9: unable to resolve class org.joda.time.LocalDate
@ line 9, column 9.
println localDate
^
5 errors
Process finished with exit code 1
Should be fixed in next EAP
Thank you very much.
I meant builds numbered > 10781