maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laird Nelson <ljnel...@gmail.com>
Subject Re: Adding dependency management to parent pom causes errors
Date Tue, 11 Feb 2014 23:47:32 GMT
On Tue, Feb 11, 2014 at 12:18 AM, geoffh <hartnell_g@yahoo.co.uk> wrote:

> In attempting to identify the cause, I started by just adding dependency
>
management to my parent pom
> Simply adding
> <dependencyManagement>
> </dependencyManagement>
> around the dependencies in my parent pom, causes dependencies not be
> resolved
>

I'm not sure why the developers chose the words "dependency management" to
identify the particular XML section in question.  It's very confusing.

Think of the <dependencyManagement> section as serving two purposes.

First, and foremost, it is template information.  If a given real
<dependency> somewhere else omits a piece of information, then that piece
of information is taken (if possible) from the <dependencyManagement>
section.

Second, which is really an outgrowth of the first, it constrains the
versions of transitive dependencies that might be pulled in from somewhere
else.  I say this is an outgrowth of the first concern, because strictly
speaking your project never mentions a transitive dependency, so that
"piece of information" is missing just like, say, a version string.

Note as well that the stuff in the <dependencyManagement> section can be
made up.  That is, you can put dependency management elements in there that
don't actually pick out any dependencies in the world.  See my earlier
point about this being a template area.

Putting this all together, it still follows that you have to have *real*
dependencies defined.  If you simply wrap your "real" dependencies with
<dependencyManagement></dependencyManagement>, that is clearly not going to
work: you've now specified a template, but nothing that the template will
be merged into.

The compilation error you're talking about looks like something more
substantial than a bad dependency--you're getting a compiler error from
within javac itself.

I noticed that "-gwt" showed up in some of your artifact names; perhaps
something with GWT is not playing nice.

Hope something in here helps.

Best,
Laird

-- 
http://about.me/lairdnelson

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