You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by eo...@apache.org on 2019/05/01 08:22:06 UTC

[maven-checkstyle-plugin] branch MCHECKSTYLE-353 updated (023ed0c -> 6abad1c)

This is an automated email from the ASF dual-hosted git repository.

eolivelli pushed a change to branch MCHECKSTYLE-353
in repository https://gitbox.apache.org/repos/asf/maven-checkstyle-plugin.git.


 discard 023ed0c  [MCHECKSTYLE-163] Add integration test
 discard fac5e0f  [MCHECKSTYLE-54] Add integration test
 discard a0c39f5  [MCHECKSTYLE-353] - Don't resolve any dependencies
     add 0edb5d5  [MCHECKSTYLE-54] Add integration test
     new f39761f  [MCHECKSTYLE-163] Add integration test
     new 6abad1c  [MCHECKSTYLE-353] - Don't resolve any dependencies

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (023ed0c)
            \
             N -- N -- N   refs/heads/MCHECKSTYLE-353 (6abad1c)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:


[maven-checkstyle-plugin] 01/02: [MCHECKSTYLE-163] Add integration test

Posted by eo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

eolivelli pushed a commit to branch MCHECKSTYLE-353
in repository https://gitbox.apache.org/repos/asf/maven-checkstyle-plugin.git

commit f39761f54bdef9254eb82c224a84bc89fcec941f
Author: Zoran Regvart <zr...@apache.org>
AuthorDate: Thu Jan 31 13:11:28 2019 +0100

    [MCHECKSTYLE-163] Add integration test
---
 src/it/MCHECKSTYLE-163/checkstyle.xml              | 29 ++++++++++++
 src/it/MCHECKSTYLE-163/invoker.properties          | 18 +++++++
 src/it/MCHECKSTYLE-163/pom.xml                     | 55 ++++++++++++++++++++++
 .../checkstyle/mcheckstyle163/Mcheckstyle163.java  | 38 +++++++++++++++
 4 files changed, 140 insertions(+)

diff --git a/src/it/MCHECKSTYLE-163/checkstyle.xml b/src/it/MCHECKSTYLE-163/checkstyle.xml
new file mode 100644
index 0000000..96e0366
--- /dev/null
+++ b/src/it/MCHECKSTYLE-163/checkstyle.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<!DOCTYPE module PUBLIC
+          "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
+          "https://checkstyle.org/dtds/configuration_1_3.dtd">
+<module name="Checker">
+  <property name="severity" value="warning"/>
+  <module name="TreeWalker">
+    <module name="IllegalThrows"/>
+  </module>
+</module>
diff --git a/src/it/MCHECKSTYLE-163/invoker.properties b/src/it/MCHECKSTYLE-163/invoker.properties
new file mode 100644
index 0000000..7b2ec5e
--- /dev/null
+++ b/src/it/MCHECKSTYLE-163/invoker.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+invoker.goals=clean checkstyle:check
diff --git a/src/it/MCHECKSTYLE-163/pom.xml b/src/it/MCHECKSTYLE-163/pom.xml
new file mode 100644
index 0000000..02fccdb
--- /dev/null
+++ b/src/it/MCHECKSTYLE-163/pom.xml
@@ -0,0 +1,55 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<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>org.apache.maven.plugins.checkstyle</groupId>
+  <artifactId>mcheckstyle-163</artifactId>
+  <version>1.0</version>
+  <url>https://issues.apache.org/jira/browse/MCHECKSTYLE-163</url>
+  <description>Test classpath resolution fails in mvn check:check when includeTestSourceDirectory = true</description>
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+  <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>@project.version@</version>
+        <configuration>
+          <configLocation>checkstyle.xml</configLocation>
+          <includeTestSourceDirectory>true</includeTestSourceDirectory>
+          <failsOnError>true</failsOnError>
+          <violationSeverity>info</violationSeverity>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/src/it/MCHECKSTYLE-163/src/test/java/org/apache/maven/plugins/checkstyle/mcheckstyle163/Mcheckstyle163.java b/src/it/MCHECKSTYLE-163/src/test/java/org/apache/maven/plugins/checkstyle/mcheckstyle163/Mcheckstyle163.java
new file mode 100644
index 0000000..2fa525d
--- /dev/null
+++ b/src/it/MCHECKSTYLE-163/src/test/java/org/apache/maven/plugins/checkstyle/mcheckstyle163/Mcheckstyle163.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.maven.plugins.checkstyle.mcheckstyle163;
+
+import org.junit.runners.model.InitializationError;
+
+public class Mcheckstyle163 {
+
+    public void shouldNotTriggerRedundantThrows() throws InitializationError {
+    }
+
+    public void shouldTriggerRedundantThrows() throws InitializationError, Exception {
+    }
+
+    public void workingDoesNotTriggerRedundantThrowsExample() throws IllegalArgumentException {
+    }
+
+    public void workingRedundantThrowsExample() throws IllegalArgumentException, Exception {
+    }
+
+}


[maven-checkstyle-plugin] 02/02: [MCHECKSTYLE-353] - Don't resolve any dependencies

Posted by eo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

eolivelli pushed a commit to branch MCHECKSTYLE-353
in repository https://gitbox.apache.org/repos/asf/maven-checkstyle-plugin.git

commit 6abad1cb750244899c6e3b45a7a8bb49fba954db
Author: Zoran Regvart <zr...@apache.org>
AuthorDate: Mon May 7 15:33:07 2018 +0200

    [MCHECKSTYLE-353] - Don't resolve any dependencies
    
    Not sure why resolving dependencies is needed for running Checkstyle, it
    does slow down the build considerably. For Apache Camel this makes a
    ten fold difference from ~20mins to ~2mins for running
    `mvn checkstyle:check`.
    
    Seems this was introduced with MCHECKSTYLE-163 but subsequently
    integration test was removed in MCHECKSTYLE-272 (#42).
---
 .../apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 b9b8e0e..9131b52 100644
--- a/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java
+++ b/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java
@@ -73,7 +73,7 @@ import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
  * @author <a href="mailto:joakim@erdfelt.net">Joakim Erdfelt</a>
  * @version $Id$
  */
-@Mojo( name = "check", defaultPhase = LifecyclePhase.VERIFY, requiresDependencyResolution = ResolutionScope.TEST,
+@Mojo( name = "check", defaultPhase = LifecyclePhase.VERIFY, requiresDependencyResolution = ResolutionScope.NONE,
        threadSafe = true )
 public class CheckstyleViolationCheckMojo
     extends AbstractMojo