Backport the fix for Maven 3.9.2 warnings to 5.0.x branch

Describe the release details (required)

There is issue #615 that is fixed in 6.0.0.

Is it possible to backport the fix #616 to the 5.0.x branch (e.g. with Release 5.0.1)?

The reason for this request is that git-commit-id-maven-plugin 5.0.0 is used by Spring Boot 3.1.x release that happened not long time ago, and in the near future will not be updated to git-commit-id-maven-plugin 6.0.0 because it's a major version change.

See spring-projects/spring-boot#35605 for the context.