Skip to content

Commit

Permalink
Implement <skip> configuration element for maven plugin, with default…
Browse files Browse the repository at this point in the history
… value of maven.test.skip
  • Loading branch information
nealeoc authored and aslakhellesoy committed Oct 3, 2010
1 parent 180dda3 commit 2887394
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ public class CucumberMojo extends AbstractJRubyMojo {
*/
protected boolean installGems = false;

/**
* Set this to 'true' to skip running features.
*
* @parameter expression="${maven.test.skip}"
*/
private boolean skip;

/**
* Will cause the project build to look successful, rather than fail, even if there are Cucumber test failures.
* This can be useful on a continuous integration server, if your only option to be able to collect output files,
Expand Down Expand Up @@ -67,6 +74,11 @@ public void execute() throws MojoExecutionException {
}
}

if (skip) {
getLog().info("Cucumber Features are skipped");
return;
}

CucumberTask cucumber = cucumber(allCucumberArgs());
try {
cucumber.execute();
Expand Down

0 comments on commit 2887394

Please sign in to comment.