Skip to content

Commit 5955418

Browse files
Merge pull request #77 from BorderTech/feature/version-plugin
Move versions-maven-plugin into an opt in profile
2 parents f1cbfb4 + a5be5d5 commit 5955418

File tree

4 files changed

+35
-21
lines changed

4 files changed

+35
-21
lines changed

.github/workflows/github-actions-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
restore-keys: ${{ runner.os }}-m2
2626

2727
- name: Build Test and Verify
28-
run: mvn -B -U clean install -Dmaven.javadoc.skip=true
28+
run: mvn -B -U clean install -Dmaven.javadoc.skip=true -Pdisplay-versions
2929

3030
- name: SonarCloud Scan
3131
run: |

CHANGELOG.md

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

33
## Release in-progress
4+
* Move versions-maven-plugin into a profile display-versions to allow projects to opt in or out #74
45
* Switch from travis-ci to GitHub Actions #75
56

67
## 1.0.17

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ The qa-parent runs quality assurance checks on your java code using tools such a
9494
The qa-parent also runs:
9595
- the [OWASP plugin](https://jeremylong.github.io/DependencyCheck/dependency-check-maven/index.html) to check security vulnerabilities
9696
- the [Enforcer plugin](https://maven.apache.org/enforcer/maven-enforcer-plugin/) to check dependency convergence
97-
- the [Version checker plugin](https://www.mojohaus.org/versions-maven-plugin/) to report project dependencies that have new versions
9897
- the [JaCoCo plugin](https://www.eclemma.org/jacoco/trunk/doc/maven.html) for code coverage reports
9998
- the [Surefire plugin](https://maven.apache.org/surefire/maven-surefire-plugin) for running unit tests
10099

@@ -104,6 +103,10 @@ The qa-parent inherits all of the release functionality from bordertech-parent.
104103

105104
The qa-parent provides a profile `quick-build` that for convenience skips all tests and QA. This is very useful when developing a project and a quick build of the project is required.
106105

106+
#### display-versions profile
107+
108+
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.
109+
107110
### build-tools
108111

109112
This is primarily a shared resources module used by qa-parent and potentially other BorderTech maven modules.

qa-parent/pom.xml

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
<bt.spotbugs.version>4.1.4</bt.spotbugs.version>
7878
<bt.findsecbugs.plugin.version>1.11.0</bt.findsecbugs.plugin.version>
7979
<bt.owasp.plugin.version>6.0.2</bt.owasp.plugin.version>
80+
<bt.versions.plugin>2.8.1</bt.versions.plugin>
8081

8182
</properties>
8283

@@ -109,6 +110,34 @@
109110
<maven.javadoc.skip>true</maven.javadoc.skip>
110111
</properties>
111112
</profile>
113+
114+
<!-- Profile to display new dependency versions in the build console. -->
115+
<!-- The versions plugin doesnot honor skip property on the display goals. As this can be an expensive process and cannot be skipped it is not included by default. -->
116+
<profile>
117+
<id>display-versions</id>
118+
<build>
119+
<plugins>
120+
<plugin>
121+
<groupId>org.codehaus.mojo</groupId>
122+
<artifactId>versions-maven-plugin</artifactId>
123+
<version>${bt.versions.plugin}</version>
124+
<executions>
125+
<execution>
126+
<id>display-version-updates</id>
127+
<phase>verify</phase>
128+
<goals>
129+
<goal>display-dependency-updates</goal>
130+
<goal>display-parent-updates</goal>
131+
<goal>display-plugin-updates</goal>
132+
<goal>display-property-updates</goal>
133+
</goals>
134+
</execution>
135+
</executions>
136+
</plugin>
137+
</plugins>
138+
</build>
139+
</profile>
140+
112141
</profiles>
113142

114143
<dependencyManagement>
@@ -333,25 +362,6 @@
333362
</executions>
334363
</plugin>
335364

336-
<!-- Display dependency versions -->
337-
<plugin>
338-
<groupId>org.codehaus.mojo</groupId>
339-
<artifactId>versions-maven-plugin</artifactId>
340-
<version>2.8.1</version>
341-
<executions>
342-
<execution>
343-
<id>display-version-updates</id>
344-
<phase>verify</phase>
345-
<goals>
346-
<goal>display-dependency-updates</goal>
347-
<goal>display-parent-updates</goal>
348-
<goal>display-plugin-updates</goal>
349-
<goal>display-property-updates</goal>
350-
</goals>
351-
</execution>
352-
</executions>
353-
</plugin>
354-
355365
</plugins>
356366
</build>
357367

0 commit comments

Comments
 (0)