https://github.com/sciencesakura/codenarc-maven-plugin
A Maven plugin that integrates CodeNarc, a static analysis tool for Groovy code.
https://github.com/sciencesakura/codenarc-maven-plugin
codenarc maven-plugin
Last synced: 4 months ago
JSON representation
A Maven plugin that integrates CodeNarc, a static analysis tool for Groovy code.
- Host: GitHub
- URL: https://github.com/sciencesakura/codenarc-maven-plugin
- Owner: sciencesakura
- License: apache-2.0
- Created: 2026-02-28T18:52:19.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-03-01T09:23:37.000Z (4 months ago)
- Last Synced: 2026-03-01T13:08:24.044Z (4 months ago)
- Topics: codenarc, maven-plugin
- Language: Groovy
- Homepage: https://www.sciencesakura.com/codenarc-maven-plugin/
- Size: 406 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CodeNarc Maven Plugin
 [](https://maven-badges.sml.io/sonatype-central/com.sciencesakura/codenarc-maven-plugin)
A Maven plugin that integrates [CodeNarc](https://codenarc.org/), a static analysis tool for Groovy.
## Requirements
* Java 11+
* Maven 3.6.3+
## Installation and usage
The CodeNarc Maven Plugin is available on Maven Central. Add the `` element to your `pom.xml` as shown below:
```xml
...
com.sciencesakura
codenarc-maven-plugin
1.0.0
check
```
### Configuring rules
By default, the CodeNarc Maven Plugin looks for a ruleset file at `${project.basedir}/config/codenarc/codenarc.xml`. If the file does not exist, the plugin falls back to the built-in `rulesets/basic.xml` ruleset.
You can specify the ruleset by setting the `ruleset` parameter.
```xml
com.sciencesakura
codenarc-maven-plugin
1.0.0
rulesets/basic.xml,rulesets/groovyism.xml
${project.basedir}/my-codenarc-ruleset.xml
```
### Override CodeNarc version
You can override the CodeNarc version by adding a dependency to the `` element.
**CAUTION**: The CodeNarc Maven Plugin is built against Groovy 4. Make sure to use a compatible CodeNarc version (e.g., `x.x.x-groovy-4.x`).
```xml
com.sciencesakura
codenarc-maven-plugin
1.0.0
org.codenarc
CodeNarc
${codenarc.version}
```
### Other configurations
The following configuration parameters and their default values are available:
```xml
com.sciencesakura
codenarc-maven-plugin
1.0.0
**/*.groovy
${project.basedir}/config/codenarc/codenarc.xml
${project.build.directory}/CodeNarcXmlReport.xml
false
false
true
true
```
For more information, see the [Maven site](https://www.sciencesakura.com/codenarc-maven-plugin/plugin-info.html).
## Acknowledgments
* [gleclaire/codenarc-maven-plugin](https://github.com/gleclaire/codenarc-maven-plugin) - The original CodeNarc Maven Plugin.
## License
This plugin is licensed under the Apache License 2.0.
Copyright (c) 2026 sciencesakura.