You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Oleg Estekhin <ol...@gmail.com> on 2011/04/13 20:15:11 UTC

aggregator module includes its own parent as a sub-module

Hi

Is it bad for the aggregator module to include its own parent as a 
sub-module?

I want to split aggregating and inheritance to allow the "parent" pom to be 
reused outside of that project, but the project still needs the 
"aggregator". There are (at least) two options:

1) treat the "parent" module as a separate project with its own release 
cycle.
Probably the most correct option.

2) include the "parent" module as part of the project, something like:
pom.xml // "aggregator"
+ module-a/pom.xml
+ module-n/pom.xml
...
+parent/pom.xml // "parent"

Of course, the "aggregator" will reference all modules, and all modules, 
including the "aggregator", will reference the "parent" using the correct 
relative path, but, as I understand, in order to be the part of the release 
process the "parent" should be included as a sub-module in the "aggregator", 
which leads to both "parent"-is parent of-"aggregator" and 
"aggregator"-contains-"parent" relations at the same time.

Simple tests show that maven will accept such a project without any errors 
or even warnings, but I would like to know whether this kind of circular 
"parent"-"aggregator" dependency is bad.
Any opinions why this should not be done?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: aggregator module includes its own parent as a sub-module

Posted by Andreas Sewe <se...@st.informatik.tu-darmstadt.de>.
Hi Oleg:

> Simple tests show that maven will accept such a project without any 
> errors or even warnings, but I would like to know whether this kind of 
> circular "parent"-"aggregator" dependency is bad.
> Any opinions why this should not be done?

Not when it comes to the build itself, not. When it comes to site 
generation, however, expect "inconsistencies" between the modules menu 
and the breadcrumbs. The former will show the parent as a module of the 
aggregator while the latter will show a trail like parent > aggregator. 
While technically correct (from a Maven point of view), this is probably 
something your site's users won't expect. (I have raised an issue about 
this: <http://jira.codehaus.org/browse/MSITE-582>.)

Just something to keep in mind.

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org