diff --git a/htmlSanityCheck-maven-plugin/src/main/java/org/aim42/htmlsanitycheck/maven/HtmlSanityCheckMojo.java b/htmlSanityCheck-maven-plugin/src/main/java/org/aim42/htmlsanitycheck/maven/HtmlSanityCheckMojo.java index 67397620..a143995a 100644 --- a/htmlSanityCheck-maven-plugin/src/main/java/org/aim42/htmlsanitycheck/maven/HtmlSanityCheckMojo.java +++ b/htmlSanityCheck-maven-plugin/src/main/java/org/aim42/htmlsanitycheck/maven/HtmlSanityCheckMojo.java @@ -194,17 +194,12 @@ static PerRunResults performChekcs(Configuration myConfig) throws MojoExecutionE // tag::maven-plugin-implementation[] public void execute() throws MojoExecutionException { - logBuildParameter(); - - // Setup configuration - Configuration myConfig = setupConfiguration(); - - execute(myConfig); - + execute(setupConfiguration()); } void execute(Configuration myConfig) throws MojoExecutionException { // Check if configuration is valid + logBuildParameter(myConfig); try { myConfig.validate(); } catch (MisconfigurationException e) { @@ -245,15 +240,15 @@ void createoutputDirs(File dir, String failMessage) throws MojoExecutionExceptio } - void logBuildParameter() { + void logBuildParameter(Configuration myConfig) { // Log build parameters getLog().info(String.join("", Collections.nCopies(70, "="))); getLog().info("Parameters given to sanityCheck plugin from Maven buildfile..."); - getLog().info("Files to check : " + sourceDocuments); - getLog().info("Source directory: " + sourceDir); - getLog().info("Results dir : " + checkingResultsDir); - getLog().info("JUnit dir : " + junitResultsDir); - getLog().info("Fail on errors : " + failOnErrors); + getLog().info("Files to check : " + myConfig.getSourceDocuments()); + getLog().info("Source directory: " + myConfig.getSourceDir()); + getLog().info("Results dir : " + myConfig.getCheckingResultsDir()); + getLog().info("JUnit dir : " + myConfig.getJunitResultsDir()); + getLog().info("Fail on errors : " + myConfig.getFailOnErrors()); } protected Configuration setupConfiguration() {