Enforce and report code quality with JUnit, JaCoCo, Hamcrest, FindBugs, PMD, CodeNarc, Checkstyle (Google), Enforcer, Duplicate-Finder, JDepend, and more with this Maven POM.
MIT License
maven-code-quality-pom
Enforce and report code quality with JUnit, JaCoCo, Hamcrest, FindBugs, PMD, CodeNarc, Checkstyle (Google), Enforcer, Duplicate-Finder, JDepend, and more with this Maven POM.
CHANGELOG
maven-code-quality-pom
Enforce and report code quality with:
maven-checkstyle-plugin
)codenarc-maven-plugin
)duplicate-finder-maven-plugin
)maven-enforcer-plugin
)findbugs-maven-plugin
)google-java-format
, which follows Google's code styleguide (fmt-maven-plugin
)jdepend-maven-plugin
)junit5
with junit4
backwards compatibility)jacoco-maven-plugin
)maven-pmd-plugin
)maven-site-plugin
)and more with this Maven POM.
The purpose of the project is to use the Maven Site Plugin to:
master
.maven-code-quality-pom
is written in Java, which must be installed prior to use. maven-code-quality-pom
manages Java dependencies with Maven and NPM for JavaScript dependencies.
Java™️ EE 8 SDK: Either
Node.js, which includes the node package manager (npm).
💡 If you're working on macOS, we recommend installing or updating software with Homebrew.
$ git clone https://github.com/gregswindle/maven-code-quality-pom.git
$ cd maven-code-quality-pom
$ mvn clean install -DskipTests=true -Dmaven.javadocs.skip=true -B -V
$ npm install
$ mvn test verify
To build the Maven reports site, open a Terminal and run:
$ mvn site
Then open maven-code-quality-pom/target/site/index.html
in a Web browser.
mvn fmt:check
Formats all src/ and test/ Java code according to the Google Java style guide.
ℹ️
mvn fmt:format
runs with every build.
mvn enforcer:display-info
Executes the defined enforcer-rules once per module and displays the current platform information
mvn site
Generates the site for a single project.
mvn checkstyle:check
Performs Checkstyle analysis and outputs violations or a count of violations to the console, potentially failing the build.
mvn duplicate-finder:check
Finds duplicate classes/resources on the classpath.
mvn findbugs:check
Identify defect (bug) patterns in your Java source code.
mvn pmd:check
Fail the build if there were any PMD violations in the source code.
mvn pmd:cpd-check
Fail the build if there were any CPD violations in the source code.
Before you connect to SonarCloud, you need:
- An active account on https://sonarcloud.io
- To set the
ENVIRONMENT
variable$SONAR_TOKEN
See "Using SonarCloud with Travis CI" for details.
Open a Terminal and run:
$ mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar
CHANGELOG
The latest version of maven-code-quality-pom
is 0.0.1-SNAPSHOT
. View the CHANGELOG
for details.
maven-code-quality-pom
We welcome contributors with Pull Requests!
🍀 Read Contributing to maven-code-quality-pom
to get started. 🍀
Contributions in the form of GitHub pull requests are welcome. Before embarking on a significant change, please adhere to the following guidelines:
maven-code-quality-pom
's coding conventions and Git workflow if you're willing and able to program (or want to learn how).