[MCHECKSTYLE-387] emit a warning when using an old version of checkstyle.
Signed-off-by: Benjamin Marwell <bmarwell@apache.org>
diff --git a/src/main/java/org/apache/maven/plugins/checkstyle/exec/DefaultCheckstyleExecutor.java b/src/main/java/org/apache/maven/plugins/checkstyle/exec/DefaultCheckstyleExecutor.java
index 4481506..94a01e0 100644
--- a/src/main/java/org/apache/maven/plugins/checkstyle/exec/DefaultCheckstyleExecutor.java
+++ b/src/main/java/org/apache/maven/plugins/checkstyle/exec/DefaultCheckstyleExecutor.java
@@ -313,6 +313,13 @@
try
{
checker.setClassLoader( projectClassLoader );
+ /*
+ * MCHECKSTYLE-387: If the previous method call was successful, emit a warning that the user is using
+ * an old version of checkstyle.
+ */
+ getLogger().warn( "Old version of checkstyle detected. Consider updating to >= v8.30" );
+ getLogger().warn( "For more information see: "
+ + "https://maven.apache.org/plugins/maven-checkstyle-plugin/examples/upgrading-checkstyle.html" );
}
catch ( NoSuchMethodError ignored )
{