From 17c66b8824eef1c13837676716cf305740a830f0 Mon Sep 17 00:00:00 2001 From: Michael Osipov Date: Sun, 11 Jun 2017 20:31:57 +0000 Subject: [PATCH] Revert fix and IT changes for MCHECKSTYLE-314 The fix introduces another run of Checkstyle with default settings interfering with the one set in an execution. git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@1798404 13f79535-47bb-0310-9956-ffa450edef68 --- src/it/MCHECKSTYLE-214-basedir-resource/verify.groovy | 5 ++--- .../plugins/checkstyle/CheckstyleViolationCheckMojo.java | 2 -- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/it/MCHECKSTYLE-214-basedir-resource/verify.groovy b/src/it/MCHECKSTYLE-214-basedir-resource/verify.groovy index 9a195591..f73a735a 100644 --- a/src/it/MCHECKSTYLE-214-basedir-resource/verify.groovy +++ b/src/it/MCHECKSTYLE-214-basedir-resource/verify.groovy @@ -20,8 +20,7 @@ def buildLog = new File( basedir, 'build.log' ) // LICENSE.txt has 2 errors, src/main/resources/README.txt has 1 error -// MCHECKSTYLE-314 added 2 errors from target/checkstyle-header.txt -assert buildLog.text.contains( "[INFO] There are 5 errors reported by Checkstyle" ) +assert buildLog.text.contains( "[INFO] There are 3 errors reported by Checkstyle" ) def checkstyle = new XmlSlurper().parse( new File( basedir, "target/checkstyle-result.xml" ) ) -assert 3 == checkstyle.file.size() +assert 2 == checkstyle.file.size() diff --git a/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java b/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java index 1bc6c59d..eeed5c09 100644 --- a/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java +++ b/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java @@ -41,7 +41,6 @@ import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugin.descriptor.PluginDescriptor; import org.apache.maven.plugins.annotations.Component; -import org.apache.maven.plugins.annotations.Execute; import org.apache.maven.plugins.annotations.LifecyclePhase; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; @@ -74,7 +73,6 @@ */ @Mojo( name = "check", defaultPhase = LifecyclePhase.VERIFY, requiresDependencyResolution = ResolutionScope.TEST, threadSafe = true ) -@Execute( goal = "checkstyle" ) public class CheckstyleViolationCheckMojo extends AbstractMojo {