maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Baptiste MATHUS <>
Subject Re: Maven Mulit Module Project as Dependency
Date Sun, 23 Jun 2013 19:08:46 GMT
+1, but you may want to also insist on using scope=import.

Because if you don't, for example, you won't test scope deps of that pom,


2013/6/23 Laird Nelson <>

> On Sun, Jun 23, 2013 at 6:51 AM, Baptiste MATHUS <>
> wrote:
> > One other way would be to define an additional module which would be of
> > type pom, and would serve as a dedicated import pom. That pom would
> simply
> > depend on the modules you want to provide.
> >
> I wanted to reiterate this point because there is no Maven documentation
> that reveals that this is possible, and it is one of the most powerful ways
> to put together a large, modular system.
> To be clear: a project of packaging type pom can be used as a regular old
> dependency.  Anything it depends on will be pulled in transitively.
> Among other things this means you can whip up a pom.xml that "fronts"
> complicated dependencies with custom exclusions and all the other bells and
> whistles, but then tell your development team to just depend on this
> "facade pom".  That frees you as well to change its makeup as underlying
> artifact versions change, bugs are fixed, dependencies are eliminated, etc.
>  It's effectively a way to version a subset of a pom independent of the
> rest of that pom (which some would argue should have been part of Maven in
> the first place).
> This may be clear to some, but it is certainly not clear to everyone and it
> deserves special mention.  It's powerful stuff.
> Best,
> Laird
> --

Baptiste <Batmat> MATHUS -
Sauvez un arbre,
Mangez un castor !

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message