Skip to content

Commit

Permalink
Revert #572
Browse files Browse the repository at this point in the history
  • Loading branch information
eirslett committed Jul 18, 2017
1 parent f95d441 commit e3a5acb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 22 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Expand Up @@ -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
Expand Down
Expand Up @@ -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()) {
Expand All @@ -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);
Expand Down

0 comments on commit e3a5acb

Please sign in to comment.