From 84269c1dd64026bf5e279795007c7df5078e2098 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 26 May 2017 22:31:23 +0100 Subject: [PATCH] plugin: AbstractCheckMojo: minor tidy-up --- .../ruleset/plugin/AbstractCheckMojo.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java b/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java index 46bc726..946b893 100644 --- a/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java +++ b/plugin/src/main/java/net/kemitix/checkstyle/ruleset/plugin/AbstractCheckMojo.java @@ -48,6 +48,8 @@ abstract class AbstractCheckMojo extends AbstractMojo { private static final String KEMITIX_ARTIFACTID = "kemitix-checkstyle-ruleset"; + private final CheckstyleExecutor checkstyleExecutor; + @Setter @Parameter(defaultValue = "${project}", readonly = true) private MavenProject mavenProject; @@ -58,14 +60,17 @@ abstract class AbstractCheckMojo extends AbstractMojo { @Setter @Parameter(defaultValue = "${localRepository}", readonly = true, required = true) - private ArtifactRepository artifactRepository = null; + private ArtifactRepository artifactRepository; @Setter @Component - private BuildPluginManager pluginManager = null; - - private final CheckstyleExecutor checkstyleExecutor; + private BuildPluginManager pluginManager; + /** + * Create a check mojo. + * + * @param checkstyleExecutor the executor to invoke the checkstyle plugin + */ AbstractCheckMojo(final CheckstyleExecutor checkstyleExecutor) { this.checkstyleExecutor = checkstyleExecutor; checkstyleExecutor.setLog(getLog());