Skip to content

Instantly share code, notes, and snippets.

@caisback
Last active September 13, 2022 12:13
Show Gist options
  • Save caisback/fe224a921ff89bf89d9d313485b0e97a to your computer and use it in GitHub Desktop.
Save caisback/fe224a921ff89bf89d9d313485b0e97a to your computer and use it in GitHub Desktop.
mvn clean install - java.lang.ClassNotFoundException: org.apache.maven.plugin.surefire.log.api.ConsoleLogger
  • Problem: Issue when running mvn clean install,java.lang.ClassNotFoundException: org.apache.maven.plugin.surefire.log.api.ConsoleLogger

  • Resolution: Open pom.xml

    • From:
      </dependencies>
      <repositories>
      
    • To:
         <dependency>
            <groupId>org.apache.maven.surefire</groupId>
            <artifactId>surefire-logger-api</artifactId>
            <version>2.21.0</version>
            <!-- to get around bug https://github.com/junit-team/junit5/issues/1367 -->
            <scope>test</scope>
            <optional>true</optional>
          </dependency>
        <dependency>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.21.0</version>
        </dependency>
      </dependencies>
      <repositories>
      
    • and
      • From:
          </plugins>
        </build>
      <profiles>
      
      • To:
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.21.0</version>
          </plugin>
        </plugins>
      </build>
      <profiles>
      
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment