In the past there has been no issue updating a test and run it in IntelliJ. Now, even after a File->Invalidate Caches->Invalidate and Restart
an older version of the test runs.
Running mvn clean compile
before rerunning the tests in IntelliJ resolves the issue (mvn clean test
also works as expected). An attempt to compile the project in IntelliJ results in a java: package com.shared does not exist
. This is strange the project builds fine in Maven and IntelliJ does not catch any compile time errors with imports.
Could the error be related to the multi module project I recently created in Maven?
CodePudding user response:
File->Invalidate Caches->Invalidate and Restart
is not enough. Here are the steps to fix:
- Delete .idea folder
File -> Close Project
- Reopen the Project