Skip to content

Commit 218b9d3

Browse files
Merge pull request #80 from BorderTech/feature/enforcer-plugin
Enforcer Convergence and OWASP updates
2 parents 5955418 + f45aa9a commit 218b9d3

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Change log
22

33
## Release in-progress
4+
* Update OWASP plugin skip property default to use bt.qa.skip #79
5+
* Move enforcer convergence check into verify phase. Can be skipped using bt.convergence.check.skip=true property. #78
46
* Move versions-maven-plugin into a profile display-versions to allow projects to opt in or out #74
57
* Switch from travis-ci to GitHub Actions #75
68

README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ The qa-parent runs quality assurance checks on your java code using tools such a
9090
- the [Checkstyle plugin](https://maven.apache.org/plugins/maven-checkstyle-plugin) to check the code style used by the developers
9191
- the [PMD plugin](https://maven.apache.org/plugins/maven-pmd-plugin) for source code analysis
9292
- the [Spotbugs plugin](https://spotbugs.github.io/spotbugs-maven-plugin) that looks for bugs in Java programs using bug patterns
93-
94-
The qa-parent also runs:
9593
- the [OWASP plugin](https://jeremylong.github.io/DependencyCheck/dependency-check-maven/index.html) to check security vulnerabilities
9694
- the [Enforcer plugin](https://maven.apache.org/enforcer/maven-enforcer-plugin/) to check dependency convergence
95+
96+
The qa-parent also runs:
9797
- the [JaCoCo plugin](https://www.eclemma.org/jacoco/trunk/doc/maven.html) for code coverage reports
9898
- the [Surefire plugin](https://maven.apache.org/surefire/maven-surefire-plugin) for running unit tests
9999

@@ -107,6 +107,8 @@ The qa-parent provides a profile `quick-build` that for convenience skips all te
107107

108108
The qa-parent provides a profile `display-versions` that uses the [Version checker plugin](https://www.mojohaus.org/versions-maven-plugin/) to report project dependencies that have new versions.
109109

110+
Refer to [Version checker plugin](https://www.mojohaus.org/versions-maven-plugin/) for all override details.
111+
110112
### build-tools
111113

112114
This is primarily a shared resources module used by qa-parent and potentially other BorderTech maven modules.
@@ -136,13 +138,12 @@ Refer to the plugin sections below for basic override details:
136138
- [Spotbugs plugin](#spotbugs)
137139
- [OWASP plugin](#owasp)
138140
- [Enforcer plugin](#enforcer-plugin)
139-
- [Version checker plugin](#version-checker)
140141
- [JaCoCo plugin](#jacoco)
141142
- [Surefire plugin](#surefire)
142143

143-
#### Enable Static Analysis
144+
#### Enable Quality Checks
144145

145-
By default qa checks (i.e. Checkstyle, PMD and Spotbugs) do not run, you must enable them on a per-module basis or the project parent pom:
146+
By default qa checks (i.e. Checkstyle, PMD, Spotbugs, OWASP, Convergence Check) do not run, you must enable them on a per-module basis or the project parent pom:
146147

147148
``` xml
148149
<property>
@@ -342,11 +343,11 @@ Updating the OWASP vulnerability database can also be blocked by the PROXY block
342343

343344
Refer to [enforcer plugin](https://maven.apache.org/enforcer/maven-enforcer-plugin) for all override details.
344345

345-
##### Skip enforcer
346+
##### Skip enforcer convergence check
346347

347348
``` xml
348349
<property>
349-
<enforcer.skip>true</enforcer.skip>
350+
<bt.convergence.check.skip>true</bt.convergence.check.skip>
350351
</property>
351352
```
352353

@@ -357,9 +358,6 @@ Refer to [enforcer plugin](https://maven.apache.org/enforcer/maven-enforcer-plug
357358
<enforcer.fail>false</enforcer.fail>
358359
</property>
359360
```
360-
#### Version checker
361-
362-
Refer to [Version checker plugin](https://www.mojohaus.org/versions-maven-plugin/) for all override details.
363361

364362
#### JaCoCo
365363

qa-parent/pom.xml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
<pmd.skip>${bt.qa.skip}</pmd.skip>
2222
<cpd.skip>${bt.qa.skip}</cpd.skip>
2323
<spotbugs.skip>${bt.qa.skip}</spotbugs.skip>
24+
<dependency-check.skip>${bt.qa.skip}</dependency-check.skip>
25+
<bt.convergence.check.skip>${bt.qa.skip}</bt.convergence.check.skip>
2426

2527
<!--
2628
These plugin settings are set as properties instead of being included in the default configuration to make it easier for projects to override.
@@ -104,8 +106,8 @@
104106
<spotbugs.skip>true</spotbugs.skip>
105107
<!-- Skip OWASP -->
106108
<dependency-check.skip>true</dependency-check.skip>
107-
<!-- Skip enforcer -->
108-
<enforcer.skip>true</enforcer.skip>
109+
<!-- Skip convergence check -->
110+
<bt.convergence.check.skip>true</bt.convergence.check.skip>
109111
<!-- Skip javadoc -->
110112
<maven.javadoc.skip>true</maven.javadoc.skip>
111113
</properties>
@@ -343,20 +345,23 @@
343345
</executions>
344346
</plugin>
345347

346-
<!-- Enforcer - Dependency Convergence -->
348+
<!-- Verify: Enforcer check for Dependency Convergence -->
347349
<plugin>
348350
<groupId>org.apache.maven.plugins</groupId>
349351
<artifactId>maven-enforcer-plugin</artifactId>
350352
<executions>
351353
<execution>
352-
<id>enforcer</id>
354+
<id>enforcer-convergence-check</id>
355+
<phase>verify</phase>
353356
<goals>
354357
<goal>enforce</goal>
355358
</goals>
356359
<configuration>
357360
<rules>
358361
<dependencyConvergence />
359362
</rules>
363+
<!-- Use a different skip property to not override and skip the enforcer plugin in bordertech_parent. -->
364+
<skip>${bt.convergence.check.skip}</skip>
360365
</configuration>
361366
</execution>
362367
</executions>

0 commit comments

Comments
 (0)