i have a project with the following structure:
Master (pom)
|_Project A (pom)
|_Project A1 (jar)
Project Master manages the version of dependency xyz. The project A1 uses this dependency, but the build is broken, it complains about dependency xyz version, that its missing. Any ideas on how to propagate that version? Any help appreciated.
A very old question, but I still find it relevant, as the same thing happened to me recently. My problem was that I hadn't rebuilt Project A (the child). After rebuilding it, Project A1 (grandchild) could be successfully built, and it's now using the dependency version from the dependencyManagement section in Master (parent).
You've given very little information about your project. It sounds like what you want is for Master to have a <dependencyManagement> that sets a version for xyz, and then specify the <dependency> in Project A1 without a version, letting it be dependency-managed by the declaration in Master. All you need for that is for Project A's parent to be Master and Project A1's master to be Project A. And of course, Project A mustn't interfere with the dependency management of artifact xyz. Then just add the <dependencyManagement> and <dependency> appropriately. If you think you're doing that, and it's not working, show some POMs that demonstrate your problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With