You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2011/08/03 10:17:27 UTC
svn commit: r1153384 - in /maven/plugins/trunk/maven-checkstyle-plugin: ./
src/it/MCHECKSTYLE-163/ src/it/MCHECKSTYLE-163/src/
src/it/MCHECKSTYLE-163/src/test/ src/it/MCHECKSTYLE-163/src/test/java/
src/it/MCHECKSTYLE-163/src/test/java/sample/ src/main/...
Author: olamy
Date: Wed Aug 3 08:17:25 2011
New Revision: 1153384
URL: http://svn.apache.org/viewvc?rev=1153384&view=rev
Log:
[MCHECKSTYLE-163] Test classpath resolution fails in mvn check:check when includeTestSourceDirectory = true
Submitted by Chris Whelan
Added:
maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/
maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/invoker.properties (with props)
maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/pom.xml (with props)
maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/sample.checkstyle
maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/src/
maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/src/test/
maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/src/test/java/
maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/src/test/java/sample/
maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/src/test/java/sample/Example.java (with props)
Modified:
maven/plugins/trunk/maven-checkstyle-plugin/pom.xml
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleViolationCheckMojo.java
Modified: maven/plugins/trunk/maven-checkstyle-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/pom.xml?rev=1153384&r1=1153383&r2=1153384&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/pom.xml Wed Aug 3 08:17:25 2011
@@ -205,7 +205,7 @@ under the License.
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>3.8.2</version>
+ <version>4.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/invoker.properties?rev=1153384&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/invoker.properties (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/invoker.properties Wed Aug 3 08:17:25 2011
@@ -0,0 +1 @@
+invoker.goals=verify
Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/invoker.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/invoker.properties
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/pom.xml?rev=1153384&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/pom.xml (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/pom.xml Wed Aug 3 08:17:25 2011
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>sample</groupId>
+ <artifactId>sample</artifactId>
+ <packaging>pom</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <name>Example project</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>@pom.version@</version>
+ <configuration>
+ <includes>**/*.*</includes>
+ <configLocation>sample.checkstyle</configLocation>
+ <includeTestSourceDirectory>true</includeTestSourceDirectory>
+ <consoleOutput>true</consoleOutput>
+ <logViolationsToConsole>true</logViolationsToConsole>
+ <failOnViolation>true</failOnViolation>
+ <failsOnError>true</failsOnError>
+ <violationSeverity>info</violationSeverity>
+ <maxAllowedViolations>4</maxAllowedViolations>
+ </configuration>
+ <executions>
+ <execution>
+ <id>checkstyle-verify</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>checkstyle</goal>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/sample.checkstyle
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/sample.checkstyle?rev=1153384&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/sample.checkstyle (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/sample.checkstyle Wed Aug 3 08:17:25 2011
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
+<module name="Checker">
+ <property name="severity" value="warning"/>
+ <module name="TreeWalker">
+ <property name="cacheFile" value="target/cachefile"/>
+ <module name="RedundantThrows"/>
+ </module>
+</module>
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/src/test/java/sample/Example.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/src/test/java/sample/Example.java?rev=1153384&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/src/test/java/sample/Example.java (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/src/test/java/sample/Example.java Wed Aug 3 08:17:25 2011
@@ -0,0 +1,14 @@
+package sample;
+
+import org.junit.runners.model.InitializationError;
+
+public class Example {
+
+ public void shouldTriggerRedundantThrows() throws InitializationError, Exception {}
+
+ public void shouldNotTriggerRedundantThrows() throws InitializationError {}
+
+ public void workingRedundantThrowsExample() throws IllegalArgumentException, Exception {}
+
+ public void workingDoesNotTriggerRedundantThrowsExample() throws IllegalArgumentException {}
+}
\ No newline at end of file
Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/src/test/java/sample/Example.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-checkstyle-plugin/src/it/MCHECKSTYLE-163/src/test/java/sample/Example.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
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=1153384&r1=1153383&r2=1153384&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 Aug 3 08:17:25 2011
@@ -52,7 +52,7 @@ import com.puppycrawl.tools.checkstyle.a
* @version $Id$
* @goal check
* @phase verify
- * @requiresDependencyResolution compile
+ * @requiresDependencyResolution test
* @threadSafe
*/
public class CheckstyleViolationCheckMojo