I’m not sure how much it matters. But the version of Buildship I’m running is 3.1.4.v20191121-2249-s. I think the -s
on the end of the version string means Snapshot. I got that version by accepting an autoupdate that Eclipse prompted me for a couple days ago, if I recall correctly
I was able to reproduce that Module not found
error, @Graou74. But I was also able to recover from that by first running either the :eclipse
task beforehand or the :test
or :check
tasks (or their context menu equivalent: Run As Gradle Test
).
In this recording I start with pretty much a clean slate. You can observe where I delete the project and then reimport it…
Then I do the steps you did in your vid with Run As Gradle Test
. I also show the before and after of Gradle — Refresh Gradle Project
and running the :eclipse
task. Please pay close attention to the Eclipse Java Build Path in the recording. Compare what you see in the recording with what you see on your own machine.
You’ll observe that at first, there is only the JDK modules in the module path. Then after the :eclipse
task, all the declared depenencies are on the module path. Doing Run As Gradle Test
has the exact same effect of adding the dependencies to the module path.
I ran as a Gradle test a number of consecutive times in succession. And each time, it ran as expected. You’ll also see where I edited both Library.java
and LibraryTest.java
with success.
Then for good measure, I also ran the JavaFX class — both with Eclipse’s Run As Java Application
and from the Gradle Tasks
view with the :run
task. The error you will see on the first run is because I forgot to pass in the argument the application expects. After I remembered to do that: SUCCESS.
I’m stumped as to what the problem is, @Graou74. I hesitate to ask whether it might be something Mac related. Because that would come as a huge surprise to me. So I have to assume that it is an as-yet Unidentified Failure Occurring somewhere in mrJar.
One other thing you could try as a long shot— if you have the patience — is…
-
From the command line:
./gradlew --gradle-user-home=<a.different.folder> --refresh-dependencies test
- that will take a few minutes, because it will redownload the wrapper, its dependencies plus all the project’s dependencies
-
Close, delete and reimport your project into Eclipse
- before you reimport, delete the
.gradle
,build
and.settings
folders plus the.classpath
and.project
files (like I do in the recording) - when you reimport, use in the corresponding field of the import wizard, whatever folder you specified as
--gradle-user-home=<a.different.folder>
- before you reimport, delete the
I am committed to eventually figuring this out, @Graou74 so that you don’t have to.