JUnit 5 Setup in IntelliJ, Eclipse, Maven, and Gradle

How to set up JUnit 5 so tests run in IntelliJ, Eclipse, Maven, Gradle or, if all else fails, via JUnit 4 or on the command line.
How to set up JUnit 5 so tests run in IntelliJ, Eclipse, Maven, Gradle or, if all else fails, via JUnit 4 or on the command line.
For a new project I decided to use Gradle. Here’s how I set it up with the incubating maven-publish plugin to publish snapshots to Sonatype’s repository.