Skip to content

Commit dbfe2b6

Browse files
committed
GH-5746: Add Maven-integrated dependency update report script
Adds scripts/dependency-updates.py and a Maven profile so that the update status of all external dependencies can be checked with: mvn -N -P dependency-updates validate The script scans all module POMs, resolves versions from the root dependencyManagement, and queries repo1.maven.org/maven2 for the latest release version of each dependency via maven-metadata.xml. It prints two tables: 1. Version status, grouped into major updates, minor/patch updates, up-to-date, and unknown. 2. Dependencies available under different Maven coordinates, covering known coordinate renames such as Jackson 2.x → tools.jackson.* 3.x, Apache HttpComponents 4 → httpcomponents.client5/core5, and the Elasticsearch REST high-level client → co.elastic.clients. Artifacts merged into a successor (e.g. jackson-annotations absorbed into jackson-core in 3.x) are flagged as "(not found — possibly merged)" rather than shown as broken. Both tables include a Modules column listing which sub-modules declare each dependency. Developer documentation is added to site/content/documentation/developer/dependency-updates.md.
1 parent 3909341 commit dbfe2b6

4 files changed

Lines changed: 616 additions & 1 deletion

File tree

pom.xml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,44 @@
426426
</pluginManagement>
427427
</build>
428428
</profile>
429+
<profile>
430+
<!--
431+
Print a dependency-update report grouped by: major version updates,
432+
minor/patch updates, up-to-date, unknown (fetch failed), and
433+
current version unresolved (module-level BOM).
434+
Queries Maven Central, so an internet connection is required.
435+
Run only at the root level (non-recursive) to avoid repeating the report
436+
for every sub-module:
437+
438+
mvn -N -P dependency-updates validate
439+
-->
440+
<id>dependency-updates</id>
441+
<build>
442+
<plugins>
443+
<plugin>
444+
<groupId>org.codehaus.mojo</groupId>
445+
<artifactId>exec-maven-plugin</artifactId>
446+
<inherited>false</inherited>
447+
<executions>
448+
<execution>
449+
<id>dependency-updates</id>
450+
<phase>validate</phase>
451+
<goals>
452+
<goal>exec</goal>
453+
</goals>
454+
<configuration>
455+
<executable>python3</executable>
456+
<arguments>
457+
<argument>${project.basedir}/scripts/dependency-updates.py</argument>
458+
<argument>${project.basedir}</argument>
459+
</arguments>
460+
</configuration>
461+
</execution>
462+
</executions>
463+
</plugin>
464+
</plugins>
465+
</build>
466+
</profile>
429467
</profiles>
430468
<dependencyManagement>
431469
<dependencies>
@@ -1114,6 +1152,11 @@
11141152
<artifactId>maven-site-plugin</artifactId>
11151153
<version>4.0.0-M13</version>
11161154
</plugin>
1155+
<plugin>
1156+
<groupId>org.codehaus.mojo</groupId>
1157+
<artifactId>exec-maven-plugin</artifactId>
1158+
<version>3.6.2</version>
1159+
</plugin>
11171160
</plugins>
11181161
</pluginManagement>
11191162
<plugins>

0 commit comments

Comments
 (0)