Dependency management bleeds into the BOM
The top level POM file contains a dependencyManagement block that specifies managed dependencies (mostly testing dependencies) that are intended to be enforced on submodules within the AWS SDK build. However, because that POM is a parent for the aws-sdk-java-bom package, those managed dependencies become transitively managed by projects that import the BOM package into their base poms.
Normally users aren't aware of this issue, but if one uses the Hubspot dependency management plugin, a warning is issued when trying to override the version of a managed dependency outside of a dependencyManagement block. The workaround is to add the dependency to the dependencyManagement section and override the version there, but these dependencies shouldn't be managed by the BOM in the first place.
There are two possible solutions for this here. Both involve creating a separate POM project to contain the managed dependencies that are currently in the top-level POM. The least intrusive option would require that all the submodules add the dependency management POM as an import dependency. A more DRY, but more intrusive change would make this dependency management the new parent POM for all submodules except the BOM module.
I agree with your statement that these dependencies shouldn't be managed by the BOM. Instead of creating a separate POM project with the managed dependencies, I can add the version info inside aws-java-sdk-core module which already depends on these managed dependencies.
Thanks works for me. Thanks!
Fixed in v1.11.27 https://aws.amazon.com/releasenotes/Java/7936175848690180