Re: Building aggregate module using -pl option

2019-12-26 Thread Kypros Chrysanthou
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
>
>


Re: Building aggregate module using -pl option

2019-12-27 Thread Robert Scholte
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  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
>
>


Re: Building aggregate module using -pl option

2019-12-27 Thread Kypros Chrysanthou
Hi,

I do agree that this is an awkward setup (that not all sibling modules are
pointing to the same parent).
I also agree that this might be a bug or missed use-case.

What I was trying to do is create a Jenkins job that will only build
affected modules (which will be passed to -pl).
It could happen that these modules are aggregators (why not all sub-module
projects might define the aggregator as parent,
is an issue to be investigated separately).

I would expect to have a way (an explicit option, not necessarily the
default functionality) to build the sub-modules as well.
Basically a way to configure "mvn  -pl ." to be equivalent to "mvn
".

Regards,
Kypros Chrysanthou


On Fri, Dec 27, 2019 at 12:30 PM Robert Scholte 
wrote:

> 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  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
> >
> >
>


Re: Building aggregate module using -pl option

2019-12-30 Thread Jason Young
Does the Maven documentation actually say anywhere that the
project-submodule relationship and the parent-child relationship should be
in any way related? I don't see any reason that one should imply the other;
however, I gave up long ago on trying to have children that aren't
submodules of their parents because some plugins would not work as
documented in that case.

On Fri, Dec 27, 2019 at 5:59 AM Kypros Chrysanthou 
wrote:

> Hi,
>
> I do agree that this is an awkward setup (that not all sibling modules are
> pointing to the same parent).
> I also agree that this might be a bug or missed use-case.
>
> What I was trying to do is create a Jenkins job that will only build
> affected modules (which will be passed to -pl).
> It could happen that these modules are aggregators (why not all sub-module
> projects might define the aggregator as parent,
> is an issue to be investigated separately).
>
> I would expect to have a way (an explicit option, not necessarily the
> default functionality) to build the sub-modules as well.
> Basically a way to configure "mvn  -pl ." to be equivalent to "mvn
> ".
>
> Regards,
> Kypros Chrysanthou
>
>
> On Fri, Dec 27, 2019 at 12:30 PM Robert Scholte 
> wrote:
>
> > 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  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
> > >
> > >
> >
>


--


Re: Building aggregate module using -pl option

2019-12-30 Thread Kypros Chrysanthou
Hello,

On the contrary, Project Aggregation (multi-module) and Project Inheritance
(Parent-Child)
are assumed to be separate concepts as per the description in the Maven
documentation
(
https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Project_Inheritance_vs_Project_Aggregation
)
and in this example from Sonatype (Section 3.6.2,
https://books.sonatype.com/mvnref-book/reference/pom-relationships-sect-pom-best-practice.html
)

I believe that this might be a bug as Robert mentioned.
I opened the following issue for this:
https://issues.apache.org/jira/browse/MNG-6835?orderby=created+DESC%2C+priority+DESC%2C+updated+DESC

Regards,
Kypros Chrysanthou


On Mon, Dec 30, 2019 at 4:57 PM Jason Young 
wrote:

> Does the Maven documentation actually say anywhere that the
> project-submodule relationship and the parent-child relationship should be
> in any way related? I don't see any reason that one should imply the other;
> however, I gave up long ago on trying to have children that aren't
> submodules of their parents because some plugins would not work as
> documented in that case.
>
> On Fri, Dec 27, 2019 at 5:59 AM Kypros Chrysanthou 
> wrote:
>
> > Hi,
> >
> > I do agree that this is an awkward setup (that not all sibling modules
> are
> > pointing to the same parent).
> > I also agree that this might be a bug or missed use-case.
> >
> > What I was trying to do is create a Jenkins job that will only build
> > affected modules (which will be passed to -pl).
> > It could happen that these modules are aggregators (why not all
> sub-module
> > projects might define the aggregator as parent,
> > is an issue to be investigated separately).
> >
> > I would expect to have a way (an explicit option, not necessarily the
> > default functionality) to build the sub-modules as well.
> > Basically a way to configure "mvn  -pl ." to be equivalent to "mvn
> > ".
> >
> > Regards,
> > Kypros Chrysanthou
> >
> >
> > On Fri, Dec 27, 2019 at 12:30 PM Robert Scholte 
> > wrote:
> >
> > > 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  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
> > > >
> > > >
> > >
> >
>
>
> --
>