aherbert commented on issue #47: [numbers] support JUnit 5 tests
URL: https://github.com/apache/commons-numbers/pull/47#issuecomment-499024886
 
 
   I think the recommended way is to use the JUnit [Bill of 
Materials](https://junit.org/junit5/docs/current/user-guide/#dependency-metadata-junit-bom)
 which contains all the versions which work together:
   
   ```
     <dependencyManagement>
         <dependency>
           <groupId>org.junit</groupId>
           <artifactId>junit-bom</artifactId>
           <!-- define this in properties -->
           <version>${numbers.junit.bom.version}</version>
           <scope>import</scope>
           <type>pom</type>
         </dependency>
       </dependencies>
     </dependencyManagement>
   
     <!-- Include what you require without version numbers. 
          They are all in the BOM. -->
     <dependencies>
       <dependency>
         <groupId>org.junit.jupiter</groupId>
         <artifactId>junit-jupiter</artifactId>
         <scope>test</scope>
       </dependency>
       <!-- For IDE support --> 
       <dependency>
         <groupId>org.junit.platform</groupId>
         <artifactId>junit-platform-launcher</artifactId>
         <scope>test</scope>
       </dependency>
       <!-- For JUnit 4 support --> 
       <dependency>
         <groupId>org.junit.platform</groupId>
         <artifactId>junit-platform-runner</artifactId>
         <scope>test</scope>
       </dependency>
       <dependency>
         <groupId>org.junit.vintage</groupId>
         <artifactId>junit-vintage-engine</artifactId>
         <scope>test</scope>
       </dependency>
     </dependencies>
   
   ```
   
   You can see what it bundles on Maven repository 
[org.junit:junit-bom:5.4.2](https://mvnrepository.com/artifact/org.junit/junit-bom/5.4.2).
   
   I am not sure how it works with the legacy junit 4 dependency. I would try 
deleting that from the POM and just trying with the vintage engine dependency.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to