Closed LorenzoBettini closed 4 years ago
That cycle is actually not an accident.
The buckpal-testdata
module provides some testdata factories to create instances of some domain classes that live in buckpal-application
. That means the testdata module needs to have access to the application module. In order to be able to use the testdata factories in tests, the application module needs to have access to it, too, but only in test scope.
This is a cycle, but at test time only. Gradle recognizes this. IntelliJ does, too (because it's using Gradle under the covers). It seems that Eclipse does not. You can import it in the IntelliJ Community edition if you want to explore it in an IDE. Sorry, I can't give you a better answer, but this problem is new to me. I might explore this in a blog post one day :).
I don't consider this cycle "bad form" because it provides a nice way of "exporting" test data factories to other modules
I can have Eclipse ignore the cycle error (turn it into a warning), so that I can go on. In any case, IMHO, a cycle is still a cycle and it sounds like a code smell. Maven would not allow that, Gradle might allow that, but it still sounds strange ;)
Hi
when trying to import the projects into Eclipse (with Buildship for Gradle) I had a few issues, when trying to simply import it with the wizard; when using the automatic project detector from a git repository I finally managed to have projects imported but I get this error on most projects:
Indeed in buckpal-application there's a
and in buckpal-testdata there's a
I'm a Maven user and I'm not familiar with Gradle at all, but the above actually looks like a cycle to me...
In general, is the project meant to be imported in an IDE such as Eclipse?