While using Enforcer plugin and DependencyCheck plugin together in the same build, I found an issue with transitive dependencies, specifically the "commons-lang3" version used by Enforcer is older, and breaks DependencyCheck.
To address, I forced the Enforcer plugin to use an updated commons-lang3 version, 3.15.0.
The example used may the the root of this issue: pulling in "enforcer" rather than "build-enforcer" plugin in settings.gradle changes the classpath for other plugins, so the conflicting versions of commons-lang3 becomes apparent.
While using Enforcer plugin and DependencyCheck plugin together in the same build, I found an issue with transitive dependencies, specifically the "commons-lang3" version used by Enforcer is older, and breaks DependencyCheck.
See https://github.com/kordamp/enforcer-gradle-plugin/issues/17#issuecomment-2271201919 and following comments for more details.
To address, I forced the Enforcer plugin to use an updated commons-lang3 version, 3.15.0. The example used may the the root of this issue: pulling in "enforcer" rather than "build-enforcer" plugin in
settings.gradle
changes the classpath for other plugins, so the conflicting versions of commons-lang3 becomes apparent.