EclipseLink Weaving
I have a Spring Boot 1.5.x project, leveraging EclipseLink via Spring Data. I now need to consume some of the features, like @Query annotated repository methods and @EntityGraphs that require Weaving.
I created a Gradle task to execute static weaving, and made it finalize the classes step. This works perfectly when running tests entirely inside Gradle, but IntelliJ still throws the error that indicates unwoven classes when I run Junit tests.
Things I've tried:
delegate build/run to gradle in Settings.
Mark the Gradle task After Build/After Sync/After Rebuild
Add the gradle task to the Before Launch of my test
Add a gradle task to compileJava and weave to the Before Launch of my test
Things that allow the test to pass:
Run a gradle Build that includes gradle-managed tests
comment out all weaving-dependent annotations & methods
How can I ensure IntelliJ is using the woven classes, allowing me to run & debug individual test methods?
Given my deployment target, I prefer static weaving, but would use dynamic weaving in a pinch..I can't find any working examples of that with Intellij however.
only says to add the weaving task to Before Launch, but as above, that doesn't make the tests run correctly, even if I see my gradle task run in the build window.
Please sign in to leave a comment.
Delegating the build and run to Gradle should work. If it doesn't work, please report at https://youtrack.jetbrains.com/issues/IDEA with a small sample project to reproduce.