diff --git a/CHANGELOG.md b/CHANGELOG.md index b4addd86e..b24916d2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ Last public release: [![Maven Central](https://maven-badges.herokuapp.com/maven- ## Changelog +### 1.5 + +* Revert support for the maven.frontend.failOnError flag ([#572](https://github.com/eirslett/frontend-maven-plugin/pull/572)), due to +the major regression described in [#613](https://github.com/eirslett/frontend-maven-plugin/issues/613). +failOnError-like behavior can be implemented by ignoring exit codes; +`npm run mytask` from the maven plugin, and `"scripts": { "mytask": "runstuff || exit 0"` in package.json + ### 1.4 * Add maven.frontend.failOnError and maven.test.failure.ignore flags to best manage integration-test diff --git a/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/AbstractFrontendMojo.java b/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/AbstractFrontendMojo.java index e02c0bfda..2644835bf 100644 --- a/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/AbstractFrontendMojo.java +++ b/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/AbstractFrontendMojo.java @@ -81,27 +81,6 @@ private boolean isTestingPhase() { */ protected abstract boolean skipExecution(); - /** - * Whether to raise an error or a failure if the execution fails. If unset, execution will fail if not in a testing - * phase. - * - * @since 1.4 - * @see #isTestingPhase() - */ - @Parameter(property = "failOnError") - protected Boolean failOnError; - - /** - * @since 1.4 - * @see #failOnError - */ - protected boolean isFailOnError() { - if (failOnError == null) { - failOnError = !isTestingPhase(); - } - return failOnError; - } - @Override public void execute() throws MojoFailureException { if (testFailureIgnore && !isTestingPhase()) { @@ -115,7 +94,7 @@ public void execute() throws MojoFailureException { execute(new FrontendPluginFactory(workingDirectory, installDirectory, new RepositoryCacheResolver(repositorySystemSession))); } catch (TaskRunnerException e) { - if (!isFailOnError() || testFailureIgnore && isTestingPhase()) { + if (testFailureIgnore && isTestingPhase()) { getLog().error("There are test failures.\nFailed to run task: " + e.getMessage(), e); } else { throw new MojoFailureException("Failed to run task", e);