Skip to content

Commit 05dfea4

Browse files
authored
Merge branch 'master' into greenkeeper/initial
2 parents 7dd7d35 + 2a96fcd commit 05dfea4

21 files changed

+2844
-198
lines changed

.mvn/wrapper/maven-wrapper.jar

47.2 KB
Binary file not shown.

.mvn/wrapper/maven-wrapper.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.2/apache-maven-3.5.2-bin.zip

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@
772772
| [[email protected]](https://github.com/camacho/markdown-magic-install-command#readme) | Print install command for markdown file | 1.3.1 | MIT | dev |
773773
| [[email protected]](https://github.com/camacho/markdown-magic-package-scripts#readme) | Print list of scripts in package.json with descriptions | 1.2.1 | MIT | dev |
774774
| [[email protected]](https://github.com/nodesecurity/nsp#readme) | The Node Security (nodesecurity.io) command line interface | 3.1.0 | Apache-2.0 | dev |
775-
| [snyk@1.48.1](https://github.com/snyk/snyk#readme) | snyk library and cli utility | 1.48.1 | Apache-2.0 | dev |
775+
| [snyk@1.49.1](https://github.com/snyk/snyk#readme) | snyk library and cli utility | 1.48.1 | Apache-2.0 | dev |
776776
| [[email protected]](https://github.com/conventional-changelog/standard-version#readme) | replacement for `npm version` with automatic CHANGELOG generation | 4.2.0 | ISC | dev |
777777
<!-- AUTO-GENERATED-CONTENT:START (DEPENDENCYTABLE:dev=true) -->
778778
<!-- AUTO-GENERATED-CONTENT:END -->

README.md

Lines changed: 67 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# `maven-code-quality-pom`
2+
23
> Enforce and report code quality with JUnit, JaCoCo, Hamcrest, FindBugs, PMD, CodeNarc, Checkstyle (Google), Enforcer, Duplicate-Finder, JDepend, and more with this Maven POM.
34
45
[![License][license-badge-image]][license-url]
@@ -12,28 +13,27 @@
1213
[![Greenkeeper badge](https://badges.greenkeeper.io/gregswindle/maven-code-quality-pom.svg?style=flat-square)](https://greenkeeper.io/)
1314

1415
## Table of contents
16+
1517
<!-- ⛔️ AUTO-GENERATED-CONTENT:START (TOC:excludeText=Table of contents) -->
1618
- [1. Overview](#1-overview)
1719
- [2. Prerequisite software](#2-prerequisite-software)
1820
- [3. Installation](#3-installation)
19-
- [4. Configuration](#4-configuration)
20-
- [5. Usage](#5-usage)
21-
* [5.1. Generate site files](#51-generate-site-files)
22-
* [5.2. Launch the site on a Jetty web server](#52-launch-the-site-on-a-jetty-web-server)
23-
* [5.3. Export reports to SonarCloud.io](#53-export-reports-to-sonarcloudio)
24-
* [5.4. Run quality checks](#54-run-quality-checks)
25-
+ [5.4.1. `mvn enforcer:display-info`](#541-mvn-enforcerdisplay-info)
26-
+ [5.4.2. `mvn enforcer:display-info`](#542-mvn-enforcerdisplay-info)
27-
+ [5.4.3. `mvn site`](#543-mvn-site)
28-
+ [5.4.4. `mvn checkstyle:check`](#544-mvn-checkstylecheck)
29-
+ [5.4.5. `mvn duplicate-finder:check`](#545-mvn-duplicate-findercheck)
30-
+ [5.4.6. `mvn findbugs:check`](#546-mvn-findbugscheck)
31-
+ [5.4.7. `mvn pmd:check`](#547-mvn-pmdcheck)
32-
+ [5.4.8. `mvn pmd:cpd-check`](#548-mvn-pmdcpd-check)
33-
- [6. Security](#6-security)
34-
- [7. Semantic version and `CHANGELOG`](#7-semantic-version-and-changelog)
35-
- [8. Contributing to `maven-code-quality-pom`](#8-contributing-to-maven-code-quality-pom)
36-
- [9. License](#9-license)
21+
- [4. Usage](#4-usage)
22+
* [4.1. Run unit tests, evaluate complexity, and check coverage](#41-run-unit-tests-evaluate-complexity-and-check-coverage)
23+
* [4.2. Generate site files](#42-generate-site-files)
24+
* [4.3. Run quality checks](#43-run-quality-checks)
25+
+ [4.3.1. `mvn fmt:check`](#431-mvn-fmtcheck)
26+
+ [4.3.2. `mvn enforcer:display-info`](#432-mvn-enforcerdisplay-info)
27+
+ [4.3.3. `mvn site`](#433-mvn-site)
28+
+ [4.3.4. `mvn checkstyle:check`](#434-mvn-checkstylecheck)
29+
+ [4.3.5. `mvn duplicate-finder:check`](#435-mvn-duplicate-findercheck)
30+
+ [4.3.6. `mvn findbugs:check`](#436-mvn-findbugscheck)
31+
+ [4.3.7. `mvn pmd:check`](#437-mvn-pmdcheck)
32+
+ [4.3.8. `mvn pmd:cpd-check`](#438-mvn-pmdcpd-check)
33+
* [4.3. Export reports to SonarCloud.io](#43-export-reports-to-sonarcloudio)
34+
- [5. Semantic version and `CHANGELOG`](#5-semantic-version-and-changelog)
35+
- [6. Contributing to `maven-code-quality-pom`](#6-contributing-to-maven-code-quality-pom)
36+
- [7. License](#7-license)
3737
<!-- ⛔️ AUTO-GENERATED-CONTENT:END -->
3838

3939

@@ -46,7 +46,7 @@ Enforce and report code quality with:
4646
1. **Duplicate-Finder** ([`duplicate-finder-maven-plugin`](https://github.com/basepom/duplicate-finder-maven-plugin))
4747
1. **Enforcer** ([`maven-enforcer-plugin`](http://maven.apache.org/enforcer/maven-enforcer-plugin/))
4848
1. **FindBugs** ([`findbugs-maven-plugin`](http://gleclaire.github.io/findbugs-maven-plugin/))
49-
1. **Hamcrest** ([`hamcrest-junit`](https://github.com/hamcrest/hamcrest-junit))
49+
1. **fmt-maven-plugin** formats your code using [`google-java-format`](https://github.com/google/google-java-format), which follows [Google's code styleguide](https://google.github.io/styleguide/javaguide.html) ([`fmt-maven-plugin`](https://github.com/coveo/fmt-maven-plugin))
5050
1. **JDepend** ([`jdepend-maven-plugin`](http://mojo.codehaus.org/jdepend-maven-plugin))
5151
1. **JUnit** ([`junit5`](http://junit.org/junit5/) with [`junit4`](http://junit.org/junit4/) backwards compatibility)
5252
1. **JaCoCo** ([`jacoco-maven-plugin`](http://www.eclemma.org/jacoco/trunk/doc/maven.html))
@@ -60,8 +60,8 @@ and more with this Maven POM.
6060
The **purpose of the project** is to use the Maven Site Plugin to:
6161

6262
1. Use the Maven Site Plugin to generate meaningful test and quality reporting artifacts
63-
2. Enforce test coverage thresholds and code standards
64-
3. Prevent source code that does not conform to standards from being merged into `master`.
63+
1. Enforce test coverage thresholds and code standards
64+
1. Prevent source code that does not conform to standards from being merged into `master`.
6565

6666
## 2. Prerequisite software
6767

@@ -73,8 +73,8 @@ The **purpose of the project** is to use the Maven Site Plugin to:
7373
`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.
7474

7575
1. **Java<sup>:tm:</sup> EE 8 SDK:** Either
76-
* [`oracle64-1.8.x1`][java-jdk-dl-url] or
77-
* [`openjdk:8-jdk-alpine`](https://github.com/docker-library/openjdk/blob/b4f29ba829765552239bd18f272fcdaf09eca259/8-jdk/alpine/Dockerfile)
76+
- [`oracle64-1.8.x1`][java-jdk-dl-url] or
77+
- [`openjdk:8-jdk-alpine`](https://github.com/docker-library/openjdk/blob/b4f29ba829765552239bd18f272fcdaf09eca259/8-jdk/alpine/Dockerfile)
7878

7979
1. [**Maven**][maven-dl-url]
8080
1. [**Node.js**][nodejs-url], which includes the [node package manager (**npm**)][npmjs-url].
@@ -102,13 +102,15 @@ The **purpose of the project** is to use the Maven Site Plugin to:
102102
$ npm install
103103
```
104104

105-
## 4. Configuration
105+
## 4. Usage
106106

107-
TBD.
107+
### 4.1. Run unit tests, evaluate complexity, and check coverage
108108

109-
## 5. Usage
109+
```bash
110+
$ mvn test verify
111+
```
110112

111-
### 5.1. Generate site files
113+
### 4.2. Generate site files
112114

113115
To build the Maven reports site, open a Terminal and run:
114116

@@ -118,96 +120,81 @@ $ mvn site
118120

119121
Then open `maven-code-quality-pom/target/site/index.html` in a Web browser.
120122

121-
### 5.2. Launch the site on a Jetty web server
122-
123-
Open a Terminal and run:
124-
125-
```bash
126-
$ mvn site:run
127-
```
128-
129-
Then open http://localhost:8080 in a browser.
123+
### 4.3. Run quality checks
130124

131-
### 5.3. Export reports to SonarCloud.io
132-
[![SonarCloud logo][sonar-cloud-icon]][sonar-cloud-url]
125+
- #### 4.3.1. `mvn fmt:check`
133126

134-
> **Before you connect to SonarCloud, you need:**
135-
>
136-
> * An active account on https://sonarcloud.io
137-
> * To set the `ENVIRONMENT` variable `$SONAR_TOKEN`
138-
>
139-
> [See "Using SonarCloud with Travis CI"](https://docs.travis-ci.com/user/sonarcloud) for details.
127+
> Formats all src/ and test/ Java code according to the Google Java style guide.
140128
141-
Open a Terminal and run:
129+
> :information_source: `mvn fmt:format` runs with every build.
142130
143-
```bash
144-
$ mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar
145-
```
131+
- #### 4.3.2. `mvn enforcer:display-info`
146132

147-
> [View reports on SonarCloud](https://sonarcloud.io/dashboard?id=gregswindle-github).
133+
> Executes the defined enforcer-rules once per module and displays the current platform information
148134
149-
### 5.4. Run quality checks
135+
- #### 4.3.3. `mvn site`
150136

151-
* #### 5.4.1. `mvn enforcer:display-info`
137+
> Generates the site for a single project.
152138
153-
> Executes the defined enforcer-rules once per module.
139+
- #### 4.3.4. `mvn checkstyle:check`
154140

141+
> Performs Checkstyle analysis and outputs violations or a count of violations to the console, potentially failing the build.
155142
156-
* #### 5.4.2. `mvn enforcer:display-info`
143+
- #### 4.3.5. `mvn duplicate-finder:check`
157144

158-
> Displays the current platform information
145+
> Finds duplicate classes/resources on the classpath.
159146
160-
* #### 5.4.3. `mvn site`
147+
- #### 4.3.6. `mvn findbugs:check`
161148

162-
> Generates the site for a single project.
149+
> Identify defect (bug) patterns in your Java source code.
163150
164-
* #### 5.4.4. `mvn checkstyle:check`
151+
- #### 4.3.7. `mvn pmd:check`
165152

166-
> Performs Checkstyle analysis and outputs violations or a count of violations to the console, potentially failing the build.
153+
> Fail the build if there were any PMD violations in the source code.
167154
168-
* #### 5.4.5. `mvn duplicate-finder:check`
155+
- #### 4.3.8. `mvn pmd:cpd-check`
169156

170-
> Finds duplicate classes/resources on the classpath.
157+
> Fail the build if there were any CPD violations in the source code.
171158
159+
### 4.3. Export reports to SonarCloud.io
160+
[![SonarCloud logo][sonar-cloud-icon]][sonar-cloud-url]
172161

173-
* #### 5.4.6. `mvn findbugs:check`
174-
175-
> Identify defect (bug) patterns in your Java source code.
176-
177-
* #### 5.4.7. `mvn pmd:check`
178-
179-
> Fail the build if there were any PMD violations in the source code.
180-
181-
182-
* #### 5.4.8. `mvn pmd:cpd-check`
183-
184-
> Fail the build if there were any CPD violations in the source code.
162+
> **Before you connect to SonarCloud, you need:**
163+
>
164+
> - An active account on https://sonarcloud.io
165+
> - To set the `ENVIRONMENT` variable `$SONAR_TOKEN`
166+
>
167+
> [See "Using SonarCloud with Travis CI"](https://docs.travis-ci.com/user/sonarcloud) for details.
185168
169+
Open a Terminal and run:
186170

187-
## 6. Security
171+
```bash
172+
$ mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar
173+
```
188174

189-
_Highlight important security issues/concerns in this section._
175+
> [View reports on SonarCloud](https://sonarcloud.io/dashboard?id=gregswindle-github).
190176
191-
## 7. Semantic version and `CHANGELOG`
177+
## 5. Semantic version and `CHANGELOG`
192178

193179
The latest version of `maven-code-quality-pom` is `0.0.1-SNAPSHOT`. View the [`CHANGELOG`][changelog-url] for details.
194180

195-
## 8. Contributing to `maven-code-quality-pom`
181+
## 6. Contributing to `maven-code-quality-pom`
182+
196183
> [![Learn how to make a Pull Request with free training][prs-welcome-badge-image]][prs-welcome-url]
197184
>
198185
> We welcome contributors with [Pull Requests][prs-welcome-url]!
199186
200-
**[Read Contributing to `maven-code-quality-pom` to get started.][contributing-url]**
187+
**[:four_leaf_clover: Read Contributing to `maven-code-quality-pom` to get started. :four_leaf_clover:][contributing-url]**
201188

202189
Contributions in the form of GitHub pull requests are welcome. Before embarking on a significant change, please adhere to the following guidelines:
203190

204191
1. Read the [Code of Conduct][code-of-conduct-url].
205192
1. Create an issue to discuss the proposed change and ensure that it is likely to be merged:
206-
* [Report a defect][issues-new-defect-url] (aka "bug")
207-
* [Request a new feature][issues-new-feat-url]
193+
- [Report a defect][issues-new-defect-url] (aka "bug")
194+
- [Request a new feature][issues-new-feat-url]
208195
1. Follow [Contributing to `maven-code-quality-pom`][contributing-url]'s coding conventions and Git workflow if you're willing and able to program (or want to learn how).
209196

210-
## 9. License
197+
## 7. License
211198

212199
[MIT][license-url] © [Greg Swindle][author-url].
213200

@@ -255,6 +242,3 @@ Contributions in the form of GitHub pull requests are welcome. Before embarking
255242
[travis-url]: https://travis-ci.org/gregswindle/maven-code-quality-pom
256243
[versioneye-badge-image]: https://www.versioneye.com/user/projects/5a012f2f2de28c58f8c7a10f/badge.svg?style=flat-square
257244
[versioneye-url]: https://www.versioneye.com/user/projects/5a012f2f2de28c58f8c7a10f
258-
259-
260-
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.jpy.wang%2Fgregswindle%2Fmaven-code-quality-pom.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.jpy.wang%2Fgregswindle%2Fmaven-code-quality-pom?ref=badge_large)

0 commit comments

Comments
 (0)