I have some test code in Intellij Idea 2018, which has multiple pom files. When I run any testng annotated test, I get an error which says "no tests were found". It looks like the problem is due to this part of the exception stack trace:
As you can see, I don't have the same version for all the jars. I looked at all the poms in my project and did not find any place where all these dependencies are added. I was hoping to simply set the version number there. Should I simply add all dependencies in my parent pom file or do something else ?
How do I resolve this issue without harming the project ? How do I find out why these jars are not of the same version ?
In an ideal situation, your POM only lists the dependencies you need directly. If a dependency X is only part of the implementation detail of one of your dependencies Y and you include it as well, then you will be stuck with X if a newer version of Y drops the dependency on X. However, unfortunately, sometimes you have little choice...
As for the IntelliJ question, I don't use it so I can't help you with that.