Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added maven.frontend.failOnError and maven.test.failure.ignore support #553

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Expand Up @@ -4,7 +4,9 @@

### 1.4

* Add maven.frontend.failOnError and maven.test.failure.ignore flags to best manage integration-test

* Add failOnError and maven.test.failure.ignore flags to best manage integration-test


### 1.3

Expand Down
18 changes: 12 additions & 6 deletions README.md
Expand Up @@ -52,7 +52,9 @@ Include the plugin as a dependency in your Maven project. Change `LATEST_VERSION

## Usage

Have a look at the [example project](frontend-maven-plugin/src/it/example%20project),

Have a look at the [example project](frontend-maven-plugin/src/it/example%20project),

to see how it should be set up: https://github.com/eirslett/frontend-maven-plugin/blob/master/frontend-maven-plugin/src/it/example%20project/pom.xml

- [Installing node and npm](#installing-node-and-npm)
Expand Down Expand Up @@ -449,25 +451,29 @@ tag of an execution like this:

#### Ignoring Failure

**Ignoring failed tests:** If you want to ignore test failures in specific execution you can set that using the property `maven.test.failure.ignore` in configuration tag of an execution like this:
**Ignoring failed tests:** If you want to ignore test failures in specific execution you can set that using the property `testFailureIgnore` in configuration tag of an execution like this:

```xml
<configuration>
<maven.test.failure.ignore>true</maven.test.failure.ignore>

<testFailureIgnore>true</testFailureIgnore>

</configuration>
```

If you want to generally ignore tests run maven with the `-Dmaven.test.failure.ignore=true` flag, test/integration-test results will not stop the build.

**Ignoring other failures:** If you need to ignore other failures you can set that using the property `maven.frontend.failOnError` in configuration tag of an execution like this:
**Ignoring other failures:** If you need to ignore other failures you can set that using the property `failOnError` in configuration tag of an execution like this:

```xml
<configuration>
<maven.frontend.failOnError>true</maven.frontend.failOnError>

<failOnError>false</failOnError>

</configuration>
```

If you want to ignore all failures run maven with the `-Dmaven.frontend.failOnError=true` flag.
If you want to ignore all failures run maven with the `-DfailOnError=false` flag.

#### Skipping Execution

Expand Down
18 changes: 18 additions & 0 deletions appveyor.yml
@@ -0,0 +1,18 @@
version: '{build}'
environment:
MAVEN_VERSION: 3.3.9
matrix:
- JAVA_HOME: C:\Program Files\Java\jdk1.7.0
- JAVA_HOME: C:\Program Files\Java\jdk1.8.0
install:
- cmd: SET PATH=%JAVA_HOME%\bin;%PATH%;
- cmd: SET MAVEN_OPTS=-XX:MaxPermSize=1g -Xmx2g
- cmd: SET JAVA_OPTS=-XX:MaxPermSize=1g -Xmx2g
- cmd: mvn --version
- cmd: java -version
test_script:
- mvn test
build_script:
- mvn clean verify
cache:
- C:\Users\appveyor\.m2\ -> pom.xml
5 changes: 5 additions & 0 deletions frontend-maven-plugin/pom.xml
Expand Up @@ -8,6 +8,9 @@
<version>1.4-SNAPSHOT</version>
</parent>




<artifactId>frontend-maven-plugin</artifactId>
<packaging>maven-plugin</packaging>

Expand Down Expand Up @@ -114,6 +117,7 @@
</filterProperties>
</configuration>


<executions>
<execution>
<phase>integration-test</phase>
Expand All @@ -128,6 +132,7 @@
</plugins>
</build>


<profiles>
<profile>
<id>Skip tests</id>
Expand Down
6 changes: 3 additions & 3 deletions frontend-maven-plugin/src/it/example project/package.json
Expand Up @@ -26,9 +26,9 @@
},
"scripts": {
"prebuild": "npm install",
"pre-test": "echo pre-integration-test-success",
"test": "return 1",
"post-test": "echo post-integration-test-success",
"pre-test": "echo pre-integration-test-success",
"test": "return 1",
"post-test": "echo post-integration-test-success",
"build": "gulp"
}
}
1 change: 1 addition & 0 deletions frontend-maven-plugin/src/it/example project/pom.xml
Expand Up @@ -94,6 +94,7 @@
</configuration>
</execution>


<execution>
<id>javascript tests</id>
<goals>
Expand Down
2 changes: 1 addition & 1 deletion frontend-maven-plugin/src/it/yarn-integration/pom.xml
Expand Up @@ -41,7 +41,7 @@
<arguments>install</arguments>
</configuration>
</execution>

</executions>
</plugin>
</plugins>
Expand Down
Expand Up @@ -29,6 +29,6 @@ protected boolean skipExecution() {

@Override
public void execute(FrontendPluginFactory factory) throws TaskRunnerException {
factory.getKarmaRunner().execute("start " + karmaConfPath, environmentVariables);
factory.getKarmaRunner().execute("start " + karmaConfPath, environmentVariables);
}
}