On Tue, Feb 5, 2013 at 9:29 AM, Laird Nelson <[email protected]> wrote:

> On Tue, Feb 5, 2013 at 6:10 AM, Matthew Adams <[email protected]
> >wrote:
>
> > What I was looking
> > for was a way to define a new artifact in a pom that, if used in a
> > consuming artifact's <dependencies>, would include all of the
> dependencies
> > in the referenced artifact.
>
> Hello; you can do this today by simply declaring a "normal" dependency on
> an artifact of type pom.
> [snip]
> You should not feel like you missed something; this is not really explained
> well anywhere.  You kind of have to infer it from other parts of the Maven
> documentation.
>
> Sheesh.  Maybe it's worth documenting that explicitly.  For whatever
reason, after reading the import documentation, I wouldn't
have thought to just add <type>pom</type> to my convenience pom.


> There are several side effects to doing things this way, which may or may
> not matter to you.
>
> First, the dependencies are "one level down"--that is, you didn't include
> your pom artifact's dependencies directly, you included them transitively.
>  This might have a bearing on what versions of a given dependency "win" in
> a complex inherited pom scenario.
>
> Ack.


> Second, I'm just frankly not sure how (or if) the
> dependencyManagementsection in the pom-as-dependency will work, if at
> all.
>
> That's ok.  Maybe I'll just remove the project/dependencyManagement
section entirely and only use project/dependencies.


> I hope this helps.
>
> Mos' def'!  Thanks!

-- 
mailto:[email protected] <[email protected]>
skype:matthewadams12
googletalk:[email protected]
http://matthewadams.me
http://www.linkedin.com/in/matthewadams

Reply via email to