trivago / cluecumber

Clear and concise reporting for the Cucumber BDD JSON format.

Home Page:https://www.softwaretester.blog

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update Mojo description to so maven project (pom.xml) is not needed

pdjohe opened this issue · comments

The plugin does not require a maven project. If for example, we have a lot of archived cucumber json objects, it should be possible to simply run something like this:

mvn com.trivago.rta:cluecumber-report-plugin:2.8.1:reporting -Dreporting.sourceJsonReportDirectory=./test-reports -Dreporting.generatedHtmlReportDirectory=./test-reports/cluecumber

If this directory does not have a pom.xml, this error is raised:

[ERROR] Failed to execute goal com.trivago.rta:cluecumber-report-plugin:2.7.1:reporting (default-cli): Goal requires a project to execute but there is no POM in this directory (...). Please verify you invoked Maven from the correct directory. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.trivago.rta:cluecumber-report-plugin:2.7.1:reporting (default-cli): Goal requires a project to execute but there is no POM in this directory (...). Please verify you invoked Maven from the correct directory.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:181)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
  

This could be allowed by simply added 'requiresProject = false' to the CluecumberReportPlugin since the plugin does not require a project strictly speaking:

@Mojo(name = "reporting", requiresProject = false)
public final class CluecumberReportPlugin extends PropertyCollector {

It gives a more flexibility to the plugin.

Will be changed in 2.8.1