You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by de...@apache.org on 2013/06/12 22:13:25 UTC
svn commit: r1492405 -
/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleViolationCheckMojo.java
Author: dennisl
Date: Wed Jun 12 20:13:24 2013
New Revision: 1492405
URL: http://svn.apache.org/r1492405
Log:
[MCHECKSTYLE-192] Properties files are only processed in the report, but not in the mojo
Modified:
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleViolationCheckMojo.java
Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleViolationCheckMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleViolationCheckMojo.java?rev=1492405&r1=1492404&r2=1492405&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleViolationCheckMojo.java (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleViolationCheckMojo.java Wed Jun 12 20:13:24 2013
@@ -23,6 +23,7 @@ import com.puppycrawl.tools.checkstyle.D
import com.puppycrawl.tools.checkstyle.XMLLogger;
import com.puppycrawl.tools.checkstyle.api.AuditListener;
import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
+import org.apache.maven.model.Resource;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
@@ -46,6 +47,7 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.Reader;
+import java.util.List;
/**
* Perform a violation check against the last Checkstyle run to see if there are
@@ -127,6 +129,14 @@ public class CheckstyleViolationCheckMoj
private boolean logViolationsToConsole;
/**
+ * Specifies the location of the resources to be used for Checkstyle.
+ *
+ * @since 2.11
+ */
+ @Parameter( defaultValue = "${project.resources}", readonly = true )
+ protected List<Resource> resources;
+
+ /**
* <p>
* Specifies the location of the XML configuration to use.
* </p>
@@ -355,7 +365,7 @@ public class CheckstyleViolationCheckMoj
request.setConsoleListener( getConsoleListener() ).setConsoleOutput( consoleOutput )
.setExcludes( excludes ).setFailsOnError( failsOnError ).setIncludes( includes )
.setIncludeTestSourceDirectory( includeTestSourceDirectory ).setListener( getListener() )
- .setLog( getLog() ).setProject( project ).setSourceDirectory( sourceDirectory )
+ .setLog( getLog() ).setProject( project ).setSourceDirectory( sourceDirectory ).setResources( resources )
.setStringOutputStream( stringOutputStream ).setSuppressionsLocation( suppressionsLocation )
.setTestSourceDirectory( testSourceDirectory ).setConfigLocation( configLocation )
.setPropertyExpansion( propertyExpansion ).setHeaderLocation( headerLocation )