Skip to content

Commit ceeede8

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 0652a4c commit ceeede8

3 files changed

Lines changed: 526 additions & 0 deletions

File tree

pom.xml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,42 @@
424424
</pluginManagement>
425425
</build>
426426
</profile>
427+
<profile>
428+
<!--
429+
Print a dependency-update report grouped by major / minor+patch / up-to-date.
430+
Queries Maven Central, so an internet connection is required.
431+
Run only at the root level (non-recursive) to avoid repeating the report
432+
for every sub-module:
433+
434+
mvn -N -P dependency-updates validate
435+
-->
436+
<id>dependency-updates</id>
437+
<build>
438+
<plugins>
439+
<plugin>
440+
<groupId>org.codehaus.mojo</groupId>
441+
<artifactId>exec-maven-plugin</artifactId>
442+
<version>3.5.0</version>
443+
<executions>
444+
<execution>
445+
<id>dependency-updates</id>
446+
<phase>validate</phase>
447+
<goals>
448+
<goal>exec</goal>
449+
</goals>
450+
<configuration>
451+
<executable>python3</executable>
452+
<arguments>
453+
<argument>${project.basedir}/scripts/dependency-updates.py</argument>
454+
<argument>${project.basedir}</argument>
455+
</arguments>
456+
</configuration>
457+
</execution>
458+
</executions>
459+
</plugin>
460+
</plugins>
461+
</build>
462+
</profile>
427463
</profiles>
428464
<dependencyManagement>
429465
<dependencies>

0 commit comments

Comments
 (0)