I'm using cucumber-jvm (v 1.0.0.RC2-SNAPSHOT). I attempted to use the 'html' format by updating my POM file with
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<classpathScope>test</classpathScope>
<mainClass>cucumber.cli.Main</mainClass>
<arguments>
<argument>--format</argument>
<argument>html</argument>
<argument>--glue</argument>
<argument>org.stag.stepdefs</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
And, it produces the following exception. Am I doing something wrong here? I suspect I am.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: java.io.IOException: Stream closed
at gherkin.formatter.NiceAppendable.close(NiceAppendable.java:62)
at cucumber.formatter.HTMLFormatter.close(HTMLFormatter.java:105)
at cucumber.cli.Main.run(Main.java:77)
at cucumber.cli.Main.main(Main.java:62)
... 6 more
Caused by: java.io.IOException: Stream closed
at java.io.BufferedWriter.ensureOpen(BufferedWriter.java:98)
at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:108)
at java.io.BufferedWriter.flush(BufferedWriter.java:235)
at gherkin.formatter.NiceAppendable.close(NiceAppendable.java:56)
... 9 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------