groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keegan Witt <keeganw...@gmail.com>
Subject Re: Using Groovy with JavaFX
Date Sun, 04 Jun 2017 17:15:24 GMT
For the benefit of those reading the list: I responded to the related
GMavenPlus issue <https://github.com/groovy/GMavenPlus/issues/75> that was
raised.

-Keegan


On Fri, Jun 2, 2017 at 1:44 PM, dewful <dewful@gmail.com> wrote:

> Hi -
>
> I am new to the Groovy community.
>
> I am using Maven 3.3.9 + Spock Testing Framework + GMavenPlus (1.5) +
> Groovy
> 2.4 + JavaFX with Java8 on OSX 11.10. I'm trying to get mvn test to execute
> successfully, but the groovy tests I have are not finding the javafx
> classes. The errors are like:
>
> java.lang.ClassNotFoundException: javafx.scene.control.MenuBar
>
> I believe the issue I'm having is due to java8 now by default includes the
> javafx jar on the classpath
> (/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/
> Home/jre/lib/ext
> on OSX, which is below java home), it isn't an external dependency in
> maven.
> However, when running groovy with javafx, groovy doesn't seem to have the
> javafx jar on its path.
>
> Other projects like https://github.com/groovyfx-project/groovyfx seem to
> need groovy to specifically specify the jar on the command line using '-cp
> '. Also, in gradle I found what I think is a similar bug:
> https://stackoverflow.com/questions/32570973/gradle-groovy-
> compilation-cannot-find-javafx-classes-in-tests.
>
> Groovy seems to say that jars added in a ~/.groovy/lib folder will be added
> to the classpath, although putting the jfxrt.jar in there didn't seem to
> have an effect.
>
> The main question is whats the best way to get groovy to find the javafx
> dependency jars so mvn test can succeed? Any suggestions on where maven
> would need this?
>
> Thank you!
>
>
>
> --
> View this message in context: http://groovy.329449.n5.nabble
> .com/Using-Groovy-with-JavaFX-tp5741460.html
> Sent from the Groovy Users mailing list archive at Nabble.com.
>

Mime
View raw message