devoverflow
devoverflow

Reputation: 39

Which version of maven-surefire-plugin is compatible with spring-boot 3.3

Getting this error:

Error: class missing: org/apache/maven/plugin/surefire/log/api/ConsoleLogger

I tried other versions of surefire plugin 3.0.0-M5 but it did not work either, getting same error

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-surefire-plugin</artifactId>
  <version>3.2.5</version>
  <dependencies>
    <dependency>
      <groupId>org.junit.platform</groupId>
      <artifactId>junit-paltform-surefire-provider</artifactId>
      <version>1.1.0</version>
    </dependency>
  </dependencies>
</plugin>

Upvotes: 1

Views: 3905

Answers (2)

devoverflow
devoverflow

Reputation: 39

Replacing junit-platform dependency with junit-jupiter-api resolves this issue

<groupId>org.junit.jupiter<groupId>
<artifactId>junit-jupiter-api<artifactId>
<version>5.10.2</version>

Upvotes: 0

Mr. Polywhirl
Mr. Polywhirl

Reputation: 48713

The spring-boot-dependencies-3.3.0.pom, prefers the following versions:

  • maven-compiler-plugin:3.13.0
  • maven-surefire-plugin:3.2.5

Reference

<properties>
  <!-- ... -->
  <maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
  <maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
  <!-- ... -->
</properties>

Note: Looks like you have a typo here:

junit-paltform-surefire-provider 
      ^^^^^^^^

Upvotes: 1

Related Questions