Hi,
On 17.06.22 02:27, David Karr wrote:
Sorry, can you clarify exactly what you mean by that?
Usually you have something in your pom file to use the spring boot
dependencies:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.3.12.RELEASE</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
That means by default you will use the junit-jupiter version which is
defined by the spring-boot-dependencies.
If you like to overwrite that you have to define the junit-bom before
the spring boot dependencies like this:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.8.2</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.3.12.RELEASE</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
After using this in your parent pom all of the junit jupiter
dependencies have to be in version 5.8.2....
Furthermore if you check the dependency tree via
mvn dependency:tree
you should check which version of the maven-dependency-plugin you are
using? (Most recent one?)...
PS.: The version of spring boot which is used is already out of support
(https://spring.io/projects/spring-boot#support).
Kind regards
Karl Heinz Marbaise
On Thu, Jun 16, 2022 at 4:14 PM Karl Heinz Marbaise <khmarba...@gmx.de>
wrote:
Hi,
It's important to define the junit-bom import before the
spring-boot-dependencies import part in dependencyManagement which assumes
you don't use spring-boot-parent?
Kind regards
Karl Heinz Marbaise
On 16.06.22 23:54, David Karr wrote:
We have a bunch of services running Spring Boot 2.3.12, which by default
uses junit-platform 1.6.3 and junit-jupiter 5.6.3.
We are trying to instead use junit-platform 1.8.2 and junit-jupiter
5.8.2.
All the artifacts and versions we need are in junit-bom-5.8.2.
We want to control this in our parent pom(s), as we have dozens of
similar
services all using the same parent pom.
I thought I had this working, but now it appears it's not, and I'm not
sure
what I'm missing.
At one time I had thought all I had to do was include junit-bom v5.8.2 in
the "dependencies" list in the parent pom, but that never worked. For
lack
of any other solution, I simply pasted the contents of the "dependencies"
list from junit-bom-5.8.2 into the "dependencies" list of my parent pom.
At one point, I thought this was working.
Today, I'm looking at one service that uses that parent pom, but for some
reason it's not getting the newer versions of the artifacts, it's still
getting 1.6.3 and 5.6.3. I'm looking at both "mvn dependency:tree" and
the
"Dependency Hierarchy" view in Eclipse. I'm not completely certain how
to
interpret what I'm seeing.
The first thing I want to know is what is the best way to do this sort of
thing. I find it hard to believe pasting the entire contents of the bom
that I want into the parent pom was the right way to do it, but I
couldn't
get it to work any other way, and now it's not working anyway.
I can provide more details of specific poms and parent poms, but I wanted
to see if there was a simple solution first.
I am basically aware of the difference between "dependencyManagement" and
"dependencies" in a parent pom.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org