From 4028226b4f4b440c8cc77fe01f53dfc9555c504f Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Thu, 23 Feb 2023 11:21:57 -0800 Subject: [PATCH] Fix 'spring-javaformat.apply.skip' property and use info logging The `spring-javaformat.format.skip` should have been `spring-javaformat.apply.skip` and logging that skip has occurred is better at 'INFO' level. Fixes gh-365 --- .../src/main/java/io/spring/format/maven/ApplyMojo.java | 4 ++-- .../src/main/java/io/spring/format/maven/ValidateMojo.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-javaformat-maven/spring-javaformat-maven-plugin/src/main/java/io/spring/format/maven/ApplyMojo.java b/spring-javaformat-maven/spring-javaformat-maven-plugin/src/main/java/io/spring/format/maven/ApplyMojo.java index 0514ed7e..abfece47 100644 --- a/spring-javaformat-maven/spring-javaformat-maven-plugin/src/main/java/io/spring/format/maven/ApplyMojo.java +++ b/spring-javaformat-maven/spring-javaformat-maven-plugin/src/main/java/io/spring/format/maven/ApplyMojo.java @@ -40,14 +40,14 @@ public class ApplyMojo extends FormatMojo { /** * Skip the execution. */ - @Parameter(property = "spring-javaformat.format.skip", defaultValue = "false") + @Parameter(property = "spring-javaformat.apply.skip", defaultValue = "false") private boolean skip; @Override protected void execute(List files, Charset encoding, String lineSeparator) throws MojoExecutionException, MojoFailureException { if (this.skip || skipGlobally()) { - getLog().debug("skipping format apply as per configuration."); + getLog().info("skipping format apply as per configuration."); return; } try { diff --git a/spring-javaformat-maven/spring-javaformat-maven-plugin/src/main/java/io/spring/format/maven/ValidateMojo.java b/spring-javaformat-maven/spring-javaformat-maven-plugin/src/main/java/io/spring/format/maven/ValidateMojo.java index 5d4c0e2c..7d124eac 100644 --- a/spring-javaformat-maven/spring-javaformat-maven-plugin/src/main/java/io/spring/format/maven/ValidateMojo.java +++ b/spring-javaformat-maven/spring-javaformat-maven-plugin/src/main/java/io/spring/format/maven/ValidateMojo.java @@ -47,7 +47,7 @@ public class ValidateMojo extends FormatMojo { protected void execute(List files, Charset encoding, String lineSeparator) throws MojoExecutionException, MojoFailureException { if (this.skip || skipGlobally()) { - getLog().debug("skipping format validate as per configuration."); + getLog().info("skipping format validate as per configuration."); return; } List problems = getFormatter().formatFiles(files, encoding, lineSeparator)