title: How to use JUnit 5.2 BOM in Maven dependency?
body: <p>According to the newly released v. 5.2 of JUnit, there is now a BOM:</p>
  
  <blockquote>
    <p>JUnit BOM: To ease dependency management using Maven or Gradle, a Bill of Materials POM is now provided under the org.junit:junit-bom:5.2.0 Maven coordinates.</p>
  </blockquote>
  
  <p>As a starting point, currently my POM looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;com.bosspanda.tmp&lt;/groupId&gt;
      &lt;version&gt;0.1-SNAPSHOT&lt;/version&gt;
  
      &lt;artifactId&gt;tmp&lt;/artifactId&gt;
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
          &lt;maven.compiler.source&gt;10&lt;/maven.compiler.source&gt;
          &lt;maven.compiler.target&gt;10&lt;/maven.compiler.target&gt;
          &lt;java.version&gt;10&lt;/java.version&gt;
          &lt;junit.version&gt;4.12&lt;/junit.version&gt;
          &lt;junit.jupiter.version&gt;5.2.0&lt;/junit.jupiter.version&gt;
          &lt;junit.vintage.version&gt;5.2.0&lt;/junit.vintage.version&gt;
          &lt;junit.platform.version&gt;1.2.0&lt;/junit.platform.version&gt;
      &lt;/properties&gt;
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.junit.jupiter&lt;/groupId&gt;
                  &lt;artifactId&gt;junit-jupiter-api&lt;/artifactId&gt;
                  &lt;version&gt;${junit.jupiter.version}&lt;/version&gt;
                  &lt;scope&gt;test&lt;/scope&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.junit.jupiter&lt;/groupId&gt;
                  &lt;artifactId&gt;junit-jupiter-engine&lt;/artifactId&gt;
                  &lt;version&gt;${junit.jupiter.version}&lt;/version&gt;
                  &lt;scope&gt;test&lt;/scope&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.junit.jupiter&lt;/groupId&gt;
                  &lt;artifactId&gt;junit-jupiter-params&lt;/artifactId&gt;
                  &lt;version&gt;${junit.jupiter.version}&lt;/version&gt;
                  &lt;scope&gt;test&lt;/scope&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.junit.vintage&lt;/groupId&gt;
                  &lt;artifactId&gt;junit-vintage-engine&lt;/artifactId&gt;
                  &lt;version&gt;${junit.vintage.version}&lt;/version&gt;
                  &lt;scope&gt;test&lt;/scope&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;junit&lt;/groupId&gt;
                  &lt;artifactId&gt;junit&lt;/artifactId&gt;
                  &lt;version&gt;${junit.version}&lt;/version&gt;
                  &lt;scope&gt;test&lt;/scope&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>If I understand this BOM release note above correctly, it is a simplification of this junit <code>&lt;dependency&gt;</code> tags into a single BOM dependency.</p>
  
  <p>However, I have stark troubles integrating it into my project's pom.xml. After having a look at the linked resource (<a href="https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies" rel="noreferrer">https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Importing_Dependencies</a>) I came to the conclusion that I have to replace the distinct dependencies with a single:</p>
  
  <pre><code>&lt;dependencyManagement&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit-bom&lt;/artifactId&gt;
              &lt;version&gt;5.2.0&lt;/version&gt;
              &lt;type&gt;pom&lt;/type&gt;
              &lt;scope&gt;import&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/dependencyManagement&gt;
  </code></pre>
  
  <p>But with this in place IntelliJ IDEA (v. 2018.1.3 Ultimate x64, Maven v. 3.5.3, target JDK 10.0.1) does not seem to know what the <code>&lt;dependencyManagement&gt;</code> tag is and does not parse its content. No modules are registered in the project structure.<br>
  But also if I remove the <code>&lt;dependencyManagement&gt;</code> tag, the BOM does not get loaded by IDEA.<br>
  I also tried adding the maven coordinates of the BOM via IDEA by using the maven plugin, but while it finds the distinct junit packages, it does not find the BOM and cannot download anything from org.junit:junit-bom:5.2.0 </p>
  
  <p>How do I add this BOM file to my pom dependency?<br>
  Thank you!</p>