Search code examples
mavenintellij-ideaspockgmavenplus

Code change in Spock spec is not recognised in Idea


I have a simple PoC of a Spock integration with maven.

The problem I face is that when I modify code in Spock spec and run it in idea then change is not picked up and the old code is executed. I need to call mvn verify in order to reflect the change.

When I modify the production code though - change is reflected and test don't pass in Idea.

My sample project:

https://github.com/kkocel/spockarticle

Is there a way to enable code change detection in Idea or am I missing some configuration?


Solution

  • You need to install the gmavenplus-intellij-plugin or manually add the groovy directory as test-source-root. Furthermore, the gmaven plus in your pom is outdated.