Hi, apart from the awkward project setup (moduleC not pointing to the same parent), it looks like a potential bug to me. What Maven does is looking for the dependencies of the listed projects. You're pointing to the root pom, which has only a dependency on junit, not on any of the multimodule projects. Next it will look more modules that use any of the listed projects. ModuleA and ModuleB have a parent pointing to the root.
The missing step seems to be that their dependencies should be respected too. In general you would use -pl to point to an artifact providing project, not an aggregator, but it might be useful. So -pl ModuleA or -pl ModuleB or -pl ModuleC all work as expected. thanks, Robert On 27-12-2019 08:25:42, Kypros Chrysanthou <chkyp...@gmail.com> wrote: Hello, I'm sorry for double-posting. I had created the other issue through the "Start new thread" option in the Pony Mail! page and I thought it got dropped somehow. If you would be so kind as to look into this, please use the thread titled "Building multi-module project using -pl": https://lists.apache.org/thread.html/5590fe115ea792f86c114744efa7f1edf1b2988d0f231249098b95f4%40%3Cusers.maven.apache.org%3E Kind regards, Kypros Chrysanthou On Thu, Dec 26, 2019 at 6:36 PM Kypros Chrysanthou wrote: > Hello, > > I am trying to build an a aggregate module using the -pl option but I > don't seem to be able to configure the build to pick up the sub-modules > when they are not child projects. > > When a sub-module is a child project it can be picked up using the -amd > option. > > I created a dummy project for this at > https://github.com/chkypros/aggregation > > My assumption is that the sub-modules should have been picked up when > using the -am option but this doesn't seem to be the case. > > Any advice/thought about why this is so or what I'm thinking wrong would > be greatly appreciated. > > Kind regards, > Kypros > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >