Michael McCallum wrote:
On Mon, 23 Jun 2008 11:20:40 Ralph Goers wrote:
Why aren't you using dependencyManagement instead of the technique shown
below?
Good question, please refute/correct/flame if/where possible
1) there was no way to use dependencyManagement with deps when I adopted the
technique. This works now with pom depedencies i think but I'm not certain it
provides all the benefits.
I believe it should work now.
2) because and i might be wrong but dependencyManagement messes with the
version defined up the chain when what I want is a localised enforcement, its
important to isolate the dependency and apply exclusions and version
restrictions to guarantee that I get consistent resolution.
What do you mean "up the chain"? dependencyManagement should behave as
if you specified the version wherever it is encountered in an actual
dependency. So managed dependencies specified in one part of a
dependency tree should only affect other parts of the tree in the same
way they would with the fully specified dependency.
3) also because i actually use jars for the composites/constraints so that the
poms and pom properties end up in my aggregations - they are single merged
together... reasons are OT - so i can unravel what actually ended up in the
jar if needed.
I have no idea how this is a benefit. Probably just me not understanding
something.
4) is it possible to use version ranges in dependencyManagement? I was
thinking not but have not tried recently. Once you get a reasonable set of
constrained external depdencies you naturally want to define them in terms of
each other to reduce overhead and to ensure better consistency
As far as I know version ranges should work just fine. I haven't tried
it because I don't use them. I don't know what you mean by defining
dependencies "in terms of each other". Do you mean versions 1.1-1.1.5 of
Project A can use versions 1.0-1.x of Project B? This works until you
start throwing in Project C, D, E, F, etc which also have dependencies.
At some point understanding what is really compatible with what is
extremely difficult.
Ralph
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]