Skip to content
Advertisement

Maven archetype: org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test failed.: NullPointerException

On Ubuntu Server 18.04, I created a skeleton Maven project as follows, and am just trying to get it to compile.

JavaScript

Running mvn compile is fine. But running mvn test fails with error

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test (default-test) on project my-app: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test failed.: NullPointerException -> [Help 1]

Two questions:

  1. What could be causing this?

  2. As I understand it, archetype:generate is an official plugin that helps creating template Maven projects. Are there alternative ways to easily create skeleton Maven projects?


Full stacktrace

JavaScript

Advertisement

Answer

Your problem is caused by this bug in maven-surefire : bugzilla.redhat.com/show_bug.cgi?id=1572708

Updating the version to maven-surefire-2.21.0-1 or above should fix your problem

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement