---- Simon Kitching <[EMAIL PROTECTED]> schrieb:
> I've never really understood why the dependencyManagement section is useful 
> at all.

Just to clarify: I meant using it to define lib versions for child poms, with 
simple stuff like.
  <dependency>
    <groupid>..
    <artifactid>...
    <version>...
  </dependency>

Obviously the ability to define default *configurations* of plugins that child 
modules can reference is very useful.

I guess one valid use for simple version declaration is to ensure that when you 
plan to release a product with version X of a lib, then that exact version is 
used when running the unit tests of every module, rather than just the "minimum 
required version" for that module. Of course for this to be effective, I 
believe the version tags need to be explicit version declarations using 
<version>[2.2]</version> otherwise you are not guaranteed to get that version 
anyway. And if exact versions are forced in the parent pom, it becomes pretty 
useless for release to public repositories.

I have proposed earlier a mechanism for "dumping" the resolved dependencies of 
a module to an external file, and a mechanism for forcing dependency resolution 
to use exact versions from an external file. This could then be used during 
release to solve the above issue; first dump exact dependencies for the 
artifact you want to release and inspect them to make sure they are what you 
expect. Then run the release plugin passing this file as an argument, which 
forces each module in the tree to build and test against exactly those versions.

Regards,
Simon

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to