title: Cucumber-JVM 3 - Allure 2 Test Report with Maven
body: <p>At this point with the recent release of <code>cucumber-jvm 3.x.x</code>, there does not seem to be a viable tutorial out there except for the older <code>1.x.x</code> (<a href="https://docs.qameta.io/allure/#_cucumber_jvm" rel="nofollow noreferrer">docs</a>).</p>
  
  <p>I am unsure which one to use?</p>
  
  <ul>
  <li><a href="https://github.com/allure-framework/allure-java" rel="nofollow noreferrer">allure-java</a> (which appears to have <code>allure-cucumber3-jvm</code>)</li>
  <li><a href="https://github.com/allure-framework/allure-maven" rel="nofollow noreferrer">allure-maven</a></li>
  </ul>
  
  <p><strong>Expected Result:</strong></p>
  
  <p>To generate an Allure2 test report in <code>target/</code> or <code>target/site</code> with Cucumber-JVM 3 using Maven after running <code>mvn test</code> or <code>mvn verify</code>.</p>
  
  <p>A working <code>pom.xml</code> and <code>@CucumberOptions</code> are sought after. Thanks!</p>
  
  <hr>
  
  <h2>Update: (2018-08-31)</h2>
  
  <p><strong>pom.xml</strong></p>
  
  <pre><code>&lt;properties&gt;
      &lt;!-- Project --&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;app.name&gt;Simply Do - Balance Projector&lt;/app.name&gt;
      &lt;!-- Maven --&gt;
      &lt;timestamp&gt;${maven.build.timestamp}&lt;/timestamp&gt;
      &lt;maven.build.timestamp.format&gt;yyyyMMdd'T'HHmmss'Z'&lt;/maven.build.timestamp.format&gt;
      &lt;!-- Allure Test Report --&gt;
      &lt;aspectj.version&gt;1.9.1&lt;/aspectj.version&gt;
      &lt;!-- Core Dependencies --&gt;
      &lt;selenium.version&gt;3.14.0&lt;/selenium.version&gt;
      &lt;ngwebdriver.version&gt;1.1.4&lt;/ngwebdriver.version&gt;
      &lt;cucumber.version&gt;3.0.2&lt;/cucumber.version&gt;
      &lt;java.version&gt;1.8&lt;/java.version&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      &lt;!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-server --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
          &lt;artifactId&gt;selenium-server&lt;/artifactId&gt;
          &lt;version&gt;${selenium.version}&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/com.paulhammant/ngwebdriver --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.paulhammant&lt;/groupId&gt;
          &lt;artifactId&gt;ngwebdriver&lt;/artifactId&gt;
          &lt;version&gt;${ngwebdriver.version}&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-junit --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;io.cucumber&lt;/groupId&gt;
          &lt;artifactId&gt;cucumber-junit&lt;/artifactId&gt;
          &lt;version&gt;${cucumber.version}&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-picocontainer --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;io.cucumber&lt;/groupId&gt;
          &lt;artifactId&gt;cucumber-picocontainer&lt;/artifactId&gt;
          &lt;version&gt;${cucumber.version}&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/org.assertj/assertj-core --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.assertj&lt;/groupId&gt;
          &lt;artifactId&gt;assertj-core&lt;/artifactId&gt;
          &lt;version&gt;3.11.0&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-slf4j-impl --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
          &lt;artifactId&gt;log4j-slf4j-impl&lt;/artifactId&gt;
          &lt;version&gt;2.11.1&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/io.qameta.allure/allure-cucumber3-jvm --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;io.qameta.allure&lt;/groupId&gt;
          &lt;artifactId&gt;allure-cucumber3-jvm&lt;/artifactId&gt;
          &lt;version&gt;2.7.0&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/com.itextpdf/itextpdf --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.itextpdf&lt;/groupId&gt;
          &lt;artifactId&gt;itextpdf&lt;/artifactId&gt;
          &lt;version&gt;5.5.13&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.poi&lt;/groupId&gt;
          &lt;artifactId&gt;poi-ooxml&lt;/artifactId&gt;
          &lt;version&gt;3.17&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/com.codoid.products/fillo --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.codoid.products&lt;/groupId&gt;
          &lt;artifactId&gt;fillo&lt;/artifactId&gt;
          &lt;version&gt;1.18&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-site-plugin --&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-site-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.7.1&lt;/version&gt;
          &lt;/plugin&gt;
          &lt;!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-project-info-reports-plugin --&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-project-info-reports-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.0.0&lt;/version&gt;
          &lt;/plugin&gt;
          &lt;!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-jar-plugin --&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.1.0&lt;/version&gt;
              &lt;!-- Ignore src/main in JAR packaging --&gt;
              &lt;configuration&gt;
                  &lt;classesDirectory&gt;src&lt;/classesDirectory&gt;
                  &lt;excludes&gt;
                      &lt;exclude&gt;main&lt;/exclude&gt;
                  &lt;/excludes&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin --&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.8.0&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;source&gt;${java.version}&lt;/source&gt;
                  &lt;target&gt;${java.version}&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-surefire-plugin --&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.22.0&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;includes&gt;
                      &lt;include&gt;**/RunCukesTest.java&lt;/include&gt;
                  &lt;/includes&gt;
                  &lt;testFailureIgnore&gt;true&lt;/testFailureIgnore&gt;
                  &lt;reportsDirectory&gt;${project.build.directory}/test-output/${timestamp}&lt;/reportsDirectory&gt;
                  &lt;argLine&gt;
                      -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
                  &lt;/argLine&gt;
              &lt;/configuration&gt;
              &lt;dependencies&gt;
                  &lt;!-- https://mvnrepository.com/artifact/org.aspectj/aspectjweaver --&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;org.aspectj&lt;/groupId&gt;
                      &lt;artifactId&gt;aspectjweaver&lt;/artifactId&gt;
                      &lt;version&gt;${aspectj.version}&lt;/version&gt;
                  &lt;/dependency&gt;
              &lt;/dependencies&gt;
          &lt;/plugin&gt;
          &lt;!-- https://mvnrepository.com/artifact/io.qameta.allure/allure-maven --&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;io.qameta.allure&lt;/groupId&gt;
              &lt;artifactId&gt;allure-maven&lt;/artifactId&gt;
              &lt;version&gt;2.9&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;reportVersion&gt;2.7.0&lt;/reportVersion&gt;
                  &lt;allureDownloadUrl&gt;https://github.com/allure-framework/allure2/releases/download/2.7.0/allure-2.7.0.zip&lt;/allureDownloadUrl&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;!-- https://mvnrepository.com/artifact/net.masterthought/maven-cucumber-reporting --&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;net.masterthought&lt;/groupId&gt;
              &lt;artifactId&gt;maven-cucumber-reporting&lt;/artifactId&gt;
              &lt;version&gt;3.20.0&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;execution&lt;/id&gt;
                      &lt;phase&gt;verify&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;generate&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;projectName&gt;${app.name}&lt;/projectName&gt;
                          &lt;outputDirectory&gt;${project.build.directory}&lt;/outputDirectory&gt;
                          &lt;jsonFiles&gt;
                              &lt;param&gt;**/cucumber-report.json&lt;/param&gt;
                          &lt;/jsonFiles&gt;
                          &lt;classificationFiles&gt;
                              &lt;param&gt;**/classifications/*.properties&lt;/param&gt;
                          &lt;/classificationFiles&gt;
                          &lt;parallelTesting&gt;false&lt;/parallelTesting&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p><strong>Build Log:</strong></p>
  
  <p><a href="https://pastebin.com/cuB9xCb7" rel="nofollow noreferrer">pastebin</a></p>