Recently, I faced a problem with IntelliJ and java. I had to configure my project again since I reformat my computer.
I installed the IDE, imported my project, installed maven’s dependencies, and then. Crap! The jUnit tests weren’t working.
The compiler was throwing this error:
IDEA and TeamCity: java.lang.LinkageError “attempted duplicate class definition for name”
What!?
After cleaning, rebuilding, and deleting the cache for the IDE. Nothing was working. I went to the internet and I found a bug declared in the IntelliJ repo, 9 years ago!! Not so helping…
But don’t worry I figured out how to fix it.
There is an option in your IDE that will help you with this issue.
You must go to Preferences > Build, Execution, Deployment > Build Tools > Maven > Running tests and uncheck the three options. And voila!
See you guys!! Happy testing 🧪
Comments