Repository: cucumber/cucumber-jvm

Issue #148: Better error message for HTML formatter problems
Created: 2012-01-18T09:36:25Z
If the html formatter doesn't have an output directory (or if the directory doesn't exist, or is a regular file) then a confusing error message is issued.
See https://groups.google.com/forum/#!topic/cukes/6O11kiH1GRs

Duplicate issue #269: HTMLFormatter Constructor arguments invalid in RC21
Created: 2012-03-20T09:42:14Z
I try and run our suite of tests which use the HTMLFormatter output and the following exception is thrown.
Exception in thread "main" cucumber.runtime.CucumberException: class cucumber.formatter.HTMLFormatter must have a single-argument constructor that takes one of the following: [interface java.lang.Appendable, class java.io.File]
        at cucumber.formatter.FormatterConverter.instantiate(FormatterConverter.java:75)
        at cucumber.formatter.FormatterConverter.convert(FormatterConverter.java:49)
        at cucumber.formatter.FormatterConverter.convert(FormatterConverter.java:21)
        at com.beust.jcommander.JCommander.convertToList(JCommander.java:1183)
        at com.beust.jcommander.JCommander.convertValue(JCommander.java:1156)
        at com.beust.jcommander.JCommander.convertValue(JCommander.java:1078)
        at com.beust.jcommander.ParameterDescription.addValue(ParameterDescription.java:233)
        at com.beust.jcommander.ParameterDescription.addValue(ParameterDescription.java:200)
        at com.beust.jcommander.JCommander.processFixedArity(JCommander.java:740)
        at com.beust.jcommander.JCommander.parseValues(JCommander.java:622)
        at com.beust.jcommander.JCommander.parse(JCommander.java:274)
        at com.beust.jcommander.JCommander.parse(JCommander.java:257)
        at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:49)
        at cucumber.cli.Main.run(Main.java:18)
        at cucumber.cli.Main.main(Main.java:14)

We run from the maven exec plugin with the following config:
<plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.2.1</version>
            <executions>
              <execution>
                <phase>integration-test</phase>
                <goals>
                  <goal>exec</goal>
                </goals>
                <configuration>
                  <executable>java</executable>
                  <arguments>
                    <argument>-Denv=${env}</argument>
                    <argument>-classpath</argument>
                    <classpath />
                    <argument>cucumber.cli.Main</argument>
                    <argument>${project.basedir}/target/classes/features/released</argument>
                    <argument>--glue</argument>
                    <argument>com.project.test.acceptance</argument>
                    <argument>--format</argument>
                    <argument>pretty</argument>
                    <argument>--format</argument>
                    <argument>html</argument>
                    <argument>--out</argument>
                    <argument>${project.basedir}/target</argument>
                    <argument>--tags</argument>
                    <argument>~@wip</argument>
                    <argument>--tags</argument>
                    <argument>~@broken</argument>
                    <argument>--tags</argument>
                    <argument>~@broken-${env}</argument>
                    <argument>--tags</argument>
                    <argument>~@ignore</argument>
                    <argument>--tags</argument>
                    <argument>~@deferred</argument>
                    <argument>--tags</argument>
                    <argument>~@sprint1</argument>
                    <argument>--tags</argument>
                    <argument>~@sprint2</argument>
                    <argument>--tags</argument>
                    <argument>~@sprint3</argument>
                    <argument>--tags</argument>
                    <argument>~@sprint4</argument>
                  </arguments>
                </configuration>
              </execution>
            </executions>
          </plugin>

Closing comment (2012-03-20T10:52:45Z): Related to #148