I've made a Maven plugin. The problem is even throwing MojoExecutionException (or MojoFailureException) will not stop build procedure! Is any other configuration required?
@Mojo( name = "something") public class CoffeescriptMojo extends AbstractMojo { public void execute() throws MojoExecutionException, MojoFailureException { new MojoExecutionException("Error not raise!"); } } Usage:
<groupId>my.sample</groupId> <artifactId>sample</artifactId> <version>1.1-SNAPSHOT</version> <executions> <execution> <phase>compile</phase> <goals> <goal>something</goal> </goals> </execution> </executions>
--fail-at-end?mvn clean installand gettingBuild successful