diff --git a/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/MojoUtils.java b/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/MojoUtils.java index fba6e29ad..dab3f82c8 100644 --- a/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/MojoUtils.java +++ b/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/MojoUtils.java @@ -24,7 +24,8 @@ class MojoUtils { private static final Logger LOGGER = LoggerFactory.getLogger(MojoUtils.class); static MojoFailureException toMojoFailureException(E e) { - return new MojoFailureException(e.getMessage() + ": " + e.getCause().getMessage(), e); + String causeMessage = e.getCause() != null ? ": " + e.getCause().getMessage() : ""; + return new MojoFailureException(e.getMessage() + causeMessage, e); } static ProxyConfig getProxyConfig(MavenSession mavenSession, SettingsDecrypter decrypter) {