Skip to content

Commit

Permalink
Auto-skip plugin execution on pom projects (#43)
Browse files Browse the repository at this point in the history
Addresses #41
  • Loading branch information
sormuras authored and malaporte committed Jan 7, 2019
1 parent 1b99d9a commit 90efaf4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/java/com/coveo/AbstractFMT.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ public abstract class AbstractFMT extends AbstractMojo {
)
private File testSourceDirectory;

@Parameter(
defaultValue = "${project.packaging}",
required = true
)
private String packaging;

@Parameter(property = "additionalSourceDirectories")
private File[] additionalSourceDirectories;

Expand Down Expand Up @@ -72,6 +78,10 @@ public void execute() throws MojoExecutionException, MojoFailureException {
getLog().info("Skipping format check");
return;
}
if ("pom".equals(packaging)) {
getLog().info("Skipping format check: project uses 'pom' packaging");
return;
}
if (skipSortingImports) {
getLog().info("Skipping sorting imports");
}
Expand Down

0 comments on commit 90efaf4

Please sign in to comment.