Whenever I run my projects JUnit test (using JUnit 5 with Java 9 and Eclipse Oxygen 1.a) I encounter the problem that eclipse can\'t find any tests.
Answers so far did not adress the problem of sharing code with other people who don't necessarily use Eclipse. Here is one proposition. The key is to use a maven profile to solve the Eclipse Case.
It assumes you have defined a property junit5.version in your pom like:
UTF-8
5.1.1
then in the profiles section add the following:
eclipse
org.junit.jupiter
junit-jupiter-engine
org.junit.platform
junit-platform-launcher
org.junit.jupiter
junit-jupiter-engine
${junit5.version}
test
org.junit.platform
junit-platform-launcher
1.1.1
test
All you have to do after this is to select the profile in your local Eclipse: Right click on your project and select Maven > Select Maven Profiles... (or hit Ctrl + Alt + P), and then check the "eclipse" profile we just created.
With that you are done. Your Eclipse will run Junit 5 tests as expected, but the configuration you added won't pollute other builds or other IDE