Skip to content

Commit

Permalink
Add "skip" property to MOJOs
Browse files Browse the repository at this point in the history
This fixes #59
  • Loading branch information
borisbrodski committed Jan 28, 2016
1 parent 41973e1 commit c674eaa
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ interface ArtifactClosure {
@Parameter()
private java.util.List<String> processSourceArtifacts = Collections.emptyList();

/**
* Set this to true to skip annotation processing.
*/
@Parameter(defaultValue = "false", property = "skipAnnotationProcessing")
protected boolean skip;

/**
* for execution synchronization
*/
Expand Down Expand Up @@ -337,6 +343,12 @@ private String buildCompileClasspath()
*/
public void execute() throws MojoExecutionException
{
if (skip)
{
getLog().info("skipped");
return;
}

if ("pom".equalsIgnoreCase(project.getPackaging())) // Issue 17
{
return;
Expand Down

0 comments on commit c674eaa

Please sign in to comment.