You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "schl3sch (via GitHub)" <gi...@apache.org> on 2025/05/13 12:35:26 UTC
[I] Using Google Java Conventions causes failure [maven-checkstyle-plugin]
schl3sch opened a new issue, #176:
URL: https://github.com/apache/maven-checkstyle-plugin/issues/176
### Affected version
3.6.0
### Bug description
When I use the [google_checks.xml](https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml) template as config file with the maven-checkstyle-plugin, the mvn checkstyle:checkstyle command fails, while with [sun_checks.xml](https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/sun_checks.xml) template everything works fine.
pom.xml:
```XML
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<configLocation>google_checks.xml</configLocation>
<outputDirectory>checkstyle</outputDirectory>
</configuration>
</plugin>
```
output:
```bash
mvn checkstyle:checkstyle
[INFO] Scanning for projects...
[INFO]
[INFO] --------< test.project >---------
[INFO] Building 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-checkstyle-plugin:3.6.0:checkstyle (default-cli) @ test.project ---
[INFO] Rendering content with org.apache.maven.skins:maven-fluido-skin:jar:2.0.0-M9 skin
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.980 s
[INFO] Finished at: 2025-05-13T14:19:00+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.6.0:checkstyle (default-cli) on project test.project: An error has occurred in Checkstyle report generation.: Failed during checkstyle configuration: cannot initialize module SuppressWithNearbyTextFilter - Unable to instantiate 'SuppressWithNearbyTextFilter' class, it is also not possible to instantiate it as .SuppressWithNearbyTextFilter, SuppressWithNearbyTextFilterCheck, .SuppressWithNearbyTextFilterCheck. Please recheck that class name is specified as canonical name or read how to configure short name usage https://checkstyle.org/config.html#Packages. Please also recheck that provided ClassLoader to Checker is configured correctly. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Using Google Java Conventions XML Config causes failure [maven-checkstyle-plugin]
Posted by "schl3sch (via GitHub)" <gi...@apache.org>.
schl3sch closed issue #176: Using Google Java Conventions XML Config causes failure
URL: https://github.com/apache/maven-checkstyle-plugin/issues/176
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Using Google Java Conventions XML Config causes failure [maven-checkstyle-plugin]
Posted by "schl3sch (via GitHub)" <gi...@apache.org>.
schl3sch commented on issue #176:
URL: https://github.com/apache/maven-checkstyle-plugin/issues/176#issuecomment-2896934983
Thank you, now it works as intended.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Using Google Java Conventions XML Config causes failure [maven-checkstyle-plugin]
Posted by "schl3sch (via GitHub)" <gi...@apache.org>.
schl3sch closed issue #176: Using Google Java Conventions XML Config causes failure
URL: https://github.com/apache/maven-checkstyle-plugin/issues/176
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Using Google Java Conventions XML Config causes failure [maven-checkstyle-plugin]
Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on issue #176:
URL: https://github.com/apache/maven-checkstyle-plugin/issues/176#issuecomment-2896902672
Can you try as described at:
https://maven.apache.org/plugins/maven-checkstyle-plugin/examples/upgrading-checkstyle.html
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Using Google Java Conventions XML Config causes failure [maven-checkstyle-plugin]
Posted by "schl3sch (via GitHub)" <gi...@apache.org>.
schl3sch commented on issue #176:
URL: https://github.com/apache/maven-checkstyle-plugin/issues/176#issuecomment-2896548298
Now I embedded
```XML
<properties>
<checkstyleVersion>10.23.0</checkstyleVersion>
</properties>
```
and it still fails.
An error has occurred in Checkstyle report generation.: Failed during checkstyle configuration: cannot initialize module SuppressWithNearbyTextFilter - Unable to instantiate 'SuppressWithNearbyTextFilter' class, it is also not possible to instantiate it as .SuppressWithNearbyTextFilter, SuppressWithNearbyTextFilterCheck, .SuppressWithNearbyTextFilterCheck. Please recheck that class name is specified as canonical name or read how to configure short name usage https://checkstyle.org/config.html#Packages. Please also recheck that provided ClassLoader to Checker is configured correctly. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Using Google Java Conventions XML Config causes failure [maven-checkstyle-plugin]
Posted by "schl3sch (via GitHub)" <gi...@apache.org>.
schl3sch commented on issue #176:
URL: https://github.com/apache/maven-checkstyle-plugin/issues/176#issuecomment-2889599041
Thank you!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org