You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2021/11/21 02:39:42 UTC
[maven-checkstyle-plugin] branch MCHECKSTYLE-393v2 updated (ba6330e -> 0a65a6a)
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a change to branch MCHECKSTYLE-393v2
in repository https://gitbox.apache.org/repos/asf/maven-checkstyle-plugin.git.
discard ba6330e [MCHECKSTYLE-393] update doxia to 1.9.2
add 4fede6d Bump animal-sniffer-maven-plugin from 1.19 to 1.20
add e0b01ad Run ITs on Java 16
add 6d229a7 [MCHECKSTYLE-399] Upgrade Checkstyle to 8.41.1
add 2f45933 [MCHECKSTYLE-99] <includeTestSourceDirectory> should use default test
add 846155a [MCHECKSTYLE-401] - NullPointerException in Violation class
add b04086d Merge pull request #47 from stevenschenk/master
add 5d9af05 update CI url
new 0a65a6a [MCHECKSTYLE-393] update doxia to 1.9.2
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 (ba6330e)
\
N -- N -- N refs/heads/MCHECKSTYLE-393v2 (0a65a6a)
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 1 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:
Jenkinsfile | 2 +-
README.md | 8 +-
pom.xml | 13 +---
.../invoker.properties | 0
.../pom.xml | 38 ++++++----
.../src/main/java/com/example/App.java | 0
.../src/test/java/com/example/AppTest.java | 0
.../verify.groovy | 6 +-
.../invoker.properties | 0
src/it/{MCHECKSTYLE-129 => MCHECKSTYLE-99}/pom.xml | 37 ++++++----
.../src/main/java/com/example/App.java | 0
.../src/test/java/com/example/AppTest.java | 0
.../verify.groovy | 6 +-
.../checkstyle/AbstractCheckstyleReport.java | 85 ++++++++++++++++------
.../checkstyle/CheckstyleReportGenerator.java | 55 +++++++++++++-
.../apache/maven/plugins/checkstyle/Violation.java | 4 +-
.../checkstyle/exec/DefaultCheckstyleExecutor.java | 80 --------------------
.../maven/plugins/checkstyle/ViolationTest.java} | 12 ++-
src/test/plugin-configs/custom-plugin-config.xml | 1 +
.../dep-resolution-exception-plugin-config.xml | 1 +
.../plugin-configs/fail-on-error-plugin-config.xml | 1 +
src/test/plugin-configs/min-plugin-config.xml | 1 +
src/test/plugin-configs/multi-plugin-config.xml | 1 +
src/test/plugin-configs/no-files-plugin-config.xml | 1 +
src/test/plugin-configs/no-rules-plugin-config.xml | 1 +
.../plugin-configs/no-severity-plugin-config.xml | 1 +
.../plugin-configs/no-source-plugin-config.xml | 1 +
.../test-source-directory-plugin-config.xml | 1 +
src/test/plugin-configs/useFile-plugin-config.xml | 1 +
29 files changed, 200 insertions(+), 157 deletions(-)
copy src/it/{checkstyle-goal => MCHECKSTYLE-99-custom-xref-test-location}/invoker.properties (100%)
copy src/it/{MCHECKSTYLE-129 => MCHECKSTYLE-99-custom-xref-test-location}/pom.xml (66%)
copy src/it/{MCHECKSTYLE-129 => MCHECKSTYLE-99-custom-xref-test-location}/src/main/java/com/example/App.java (100%)
copy src/it/{MCHECKSTYLE-129 => MCHECKSTYLE-99-custom-xref-test-location}/src/test/java/com/example/AppTest.java (100%)
copy src/it/{MCHECKSTYLE-222-resources => MCHECKSTYLE-99-custom-xref-test-location}/verify.groovy (76%)
copy src/it/{checkstyle-goal => MCHECKSTYLE-99}/invoker.properties (100%)
copy src/it/{MCHECKSTYLE-129 => MCHECKSTYLE-99}/pom.xml (67%)
copy src/it/{MCHECKSTYLE-129 => MCHECKSTYLE-99}/src/main/java/com/example/App.java (100%)
copy src/it/{MCHECKSTYLE-129 => MCHECKSTYLE-99}/src/test/java/com/example/AppTest.java (100%)
copy src/it/{MCHECKSTYLE-222-resources => MCHECKSTYLE-99}/verify.groovy (77%)
copy src/{it/MCHECKSTYLE-338/omitignoredmodules-true/src/main/java/org/apache/maven/plugins/checkstyle/TestTrue.java => test/java/org/apache/maven/plugins/checkstyle/ViolationTest.java} (74%)
[maven-checkstyle-plugin] 01/01: [MCHECKSTYLE-393] update doxia to 1.9.2
Posted by sl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch MCHECKSTYLE-393v2
in repository https://gitbox.apache.org/repos/asf/maven-checkstyle-plugin.git
commit 0a65a6ae8f41d2443815e72f2f49149ebaaa09ff
Author: User <Us...@host.docker.internal>
AuthorDate: Mon Apr 5 14:54:59 2021 +0200
[MCHECKSTYLE-393] update doxia to 1.9.2
Closes #46
---
pom.xml | 48 ++++++++--------------
src/it/checkstyle-goal/verify.groovy | 2 +-
.../checkstyle/CheckstyleReportGenerator.java | 2 +-
.../plugins/checkstyle/CheckstyleReportTest.java | 13 +++---
4 files changed, 28 insertions(+), 37 deletions(-)
diff --git a/pom.xml b/pom.xml
index 90dc78d..6786c0d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -65,9 +65,9 @@ under the License.
<properties>
<!-- Because Checkstyle 7+ requires Java 8 -->
<javaVersion>8</javaVersion>
- <mavenVersion>3.0</mavenVersion>
+ <mavenVersion>3.1.1</mavenVersion>
<checkstyleVersion>8.41.1</checkstyleVersion>
- <doxiaVersion>1.4</doxiaVersion>
+ <doxiaVersion>1.9.2</doxiaVersion>
<sitePluginVersion>3.9.1</sitePluginVersion>
<surefire.version>2.22.2</surefire.version>
<project.build.outputTimestamp>2021-01-23T22:30:12Z</project.build.outputTimestamp>
@@ -116,51 +116,39 @@ under the License.
<!-- shared -->
<dependency>
<groupId>org.apache.maven.reporting</groupId>
- <artifactId>maven-reporting-api</artifactId>
- <version>3.0</version>
- </dependency>
- <dependency>
- <groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
- <version>2.3</version>
+ <version>3.0.0</version>
<exclusions>
- <exclusion>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-project</artifactId>
+ <exclusion>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
- <!-- doxia -->
+ <!-- shared to help doxia work with the old version of maven -->
<dependency>
- <groupId>org.apache.maven.doxia</groupId>
- <artifactId>doxia-sink-api</artifactId>
- <version>${doxiaVersion}</version>
+ <groupId>org.eclipse.sisu</groupId>
+ <artifactId>org.eclipse.sisu.plexus</artifactId>
+ <version>0.1.1</version>
</dependency>
<dependency>
- <groupId>org.apache.maven.doxia</groupId>
- <artifactId>doxia-decoration-model</artifactId>
- <version>${doxiaVersion}</version>
+ <groupId>org.sonatype.sisu</groupId>
+ <artifactId>sisu-guice</artifactId>
+ <version>3.2.5</version>
+ <classifier>no_aop</classifier>
</dependency>
+
+ <!-- doxia -->
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-site-renderer</artifactId>
<version>${doxiaVersion}</version>
- <exclusions>
- <exclusion>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-component-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-container-default</artifactId>
- </exclusion>
- </exclusions>
</dependency>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-integration-tools</artifactId>
- <version>1.6</version>
+ <version>${doxiaVersion}</version>
</dependency>
<!-- plexus -->
@@ -227,7 +215,7 @@ under the License.
<dependency>
<groupId>org.apache.maven.plugin-testing</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
- <version>2.1</version>
+ <version>3.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/src/it/checkstyle-goal/verify.groovy b/src/it/checkstyle-goal/verify.groovy
index 38d7683..c560d47 100644
--- a/src/it/checkstyle-goal/verify.groovy
+++ b/src/it/checkstyle-goal/verify.groovy
@@ -37,6 +37,6 @@ assert item != null
assert item.title.text().startsWith('File: 1,')
def html = new File( basedir, 'target/site/checkstyle.html' ).text;
-assert html.contains( '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />' );
+assert html.contains( '<meta charset="UTF-8" />' );
return true;
\ No newline at end of file
diff --git a/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleReportGenerator.java b/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleReportGenerator.java
index 4f97b48..a05abf1 100644
--- a/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleReportGenerator.java
+++ b/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleReportGenerator.java
@@ -27,8 +27,8 @@ import java.util.List;
import java.util.ResourceBundle;
import org.apache.maven.doxia.sink.Sink;
-import org.apache.maven.doxia.sink.SinkEventAttributeSet;
import org.apache.maven.doxia.sink.SinkEventAttributes;
+import org.apache.maven.doxia.sink.impl.SinkEventAttributeSet;
import org.apache.maven.doxia.tools.SiteTool;
import org.apache.maven.plugin.logging.Log;
import org.apache.maven.plugin.logging.SystemStreamLog;
diff --git a/src/test/java/org/apache/maven/plugins/checkstyle/CheckstyleReportTest.java b/src/test/java/org/apache/maven/plugins/checkstyle/CheckstyleReportTest.java
index 956375f..81ec866 100644
--- a/src/test/java/org/apache/maven/plugins/checkstyle/CheckstyleReportTest.java
+++ b/src/test/java/org/apache/maven/plugins/checkstyle/CheckstyleReportTest.java
@@ -215,7 +215,7 @@ public class CheckstyleReportTest
String htmlString = FileUtils.fileRead( outputHtml );
boolean searchHeaderFound =
- ( htmlString.indexOf( "<h2>" + bundle.getString( "report.checkstyle.rules" ) ) > 0 );
+ htmlString.contains( getHtmlHeader( bundle.getString( "report.checkstyle.rules" ) ) );
Boolean rules = (Boolean) getVariableValueFromObject( mojo, "enableRulesSummary" );
if (rules)
{
@@ -226,8 +226,7 @@ public class CheckstyleReportTest
assertFalse( "Test for Rules Summary", searchHeaderFound );
}
- searchHeaderFound =
- ( htmlString.indexOf( "<h2>" + bundle.getString( "report.checkstyle.summary" ) ) > 0 );
+ searchHeaderFound = htmlString.contains( getHtmlHeader( bundle.getString( "report.checkstyle.summary" ) ) );
Boolean severity = (Boolean) getVariableValueFromObject( mojo, "enableSeveritySummary" );
if (severity)
{
@@ -238,8 +237,7 @@ public class CheckstyleReportTest
assertFalse( "Test for Severity Summary", searchHeaderFound );
}
- searchHeaderFound =
- ( htmlString.indexOf( "<h2>" + bundle.getString( "report.checkstyle.files" ) ) > 0 );
+ searchHeaderFound = htmlString.contains( getHtmlHeader( bundle.getString( "report.checkstyle.files" ) ) );
Boolean files = (Boolean) getVariableValueFromObject( mojo, "enableFilesSummary" );
if (files)
{
@@ -253,6 +251,11 @@ public class CheckstyleReportTest
return outputHtml;
}
+ private static String getHtmlHeader( String s )
+ {
+ return ">" + s + "</h2>";
+ }
+
/**
* Renderer the sink from the report mojo.
*