I got the following Maven module layout:
I manage all my submodule versions in the 'All' as managed dependencies. I reference those managed dependencies in the 'Deliverable-Build' module, to include them in the final zip archive.
The same dependency set needs to be referenced in the 'Dependency Report' module.
If the developer creates a new sub-module. He needs to manually put the new module into
It is easy to forget one of those, so is there a way to simplify this? eg by once defining a 'dependency group' and reusing it in those three locations?
You cannot combine dependencyManagement and dependency lists into one whole. For no. 2 and 3, you could create a pom containing all relevant dependencies and reference it, as described in
How to use POMs as a dependency in Maven?
Let me add two comments:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.