Search code examples
mavencucumbercucumber-jvm

How to pass build number to maven-cucumber-reporting plugin


I run maven-cucumber-reporting plugin with this config and build number on the result report page is always equals 1.

        <plugin>
            <groupId>net.masterthought</groupId>
            <artifactId>maven-cucumber-reporting</artifactId>
            <version>0.0.6</version>
            <executions>
                <execution>
                    <id>execution</id>
                    <phase>verify</phase>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                    <configuration>
                         <projectName>${project.name}</projectName>
                         <outputDirectory>${project.build.directory}/cucumber-html-reports</outputDirectory>
                            <cucumberOutput>${project.build.directory}/cucumber.json</cucumberOutput>
                        <enableFlashCharts>false</enableFlashCharts>
                    </configuration>
                </execution>
            </executions>
        </plugin>

How to pass the build number, for example from maven?


Solution

  • In version 0.0.6 of plugin build number 1 was hardcoded. This commit fixed problem and now the build number is received from ${build.number} property or from parameter of plugin.