You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Peter Kahn <ci...@gmail.com> on 2007/05/04 15:16:20 UTC

A project with two parents, a reasonable idea or a bad idea?

Can someone let me know what's the common pattern for dealing with an
artifact that is really a child of two projects?  This kind of thing smells
like an opportunity for refactoring and I feel like I should break the
"child" artifact into multiple projects.

I'm trying to convert a few products to use maven as their build system they
both rely on a commons project, but each builds it slightly differently.
Here's the pseudo example
    - "Foo" and "Bar" both both depend on "commons."
    - Foo builds commons/src/commons and commons/src/foo.
    - Bar build commons/src/commons and commons/src/bar.

To me it looks like a straight forward refactoring case.
  Commons need to be split into commons-base, commons-foo and commons-bar
projects with the dependencies looking like this:
    -  Foo -> commons-foo -> commons-base
    -  Bar -> commons-bar -> commons-base
  or commons-foo and commons-bar could be named differently or moved into
Foo and Bar respectively.


Is this the right pattern or am I missing some maven nuance that would allow
for another way of arranging things?


-- 
Peter Kahn
citizenkahn@gmail.com
citizenkahn@jabber80.com, citizen_kahn@yahoo, pkahnpie1@AIM
http://analogoustendencies.blogspot.com/
Awareness - Intention - Action

Re: A project with two parents, a reasonable idea or a bad idea?

Posted by Wayne Fay <wa...@gmail.com>.
That is the refactoring I would expect, and the "correct" Maven
approach to the situation.

Wayne

On 5/4/07, Peter Kahn <ci...@gmail.com> wrote:
> Can someone let me know what's the common pattern for dealing with an
> artifact that is really a child of two projects?  This kind of thing smells
> like an opportunity for refactoring and I feel like I should break the
> "child" artifact into multiple projects.
>
> I'm trying to convert a few products to use maven as their build system they
> both rely on a commons project, but each builds it slightly differently.
> Here's the pseudo example
>     - "Foo" and "Bar" both both depend on "commons."
>     - Foo builds commons/src/commons and commons/src/foo.
>     - Bar build commons/src/commons and commons/src/bar.
>
> To me it looks like a straight forward refactoring case.
>   Commons need to be split into commons-base, commons-foo and commons-bar
> projects with the dependencies looking like this:
>     -  Foo -> commons-foo -> commons-base
>     -  Bar -> commons-bar -> commons-base
>   or commons-foo and commons-bar could be named differently or moved into
> Foo and Bar respectively.
>
>
> Is this the right pattern or am I missing some maven nuance that would allow
> for another way of arranging things?
>
>
> --
> Peter Kahn
> citizenkahn@gmail.com
> citizenkahn@jabber80.com, citizen_kahn@yahoo, pkahnpie1@AIM
> http://analogoustendencies.blogspot.com/
> Awareness - Intention - Action
>

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