You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by to...@gi-de.com on 2010/02/23 15:24:36 UTC

dependencyManagement and Manifest.MF issue

Hi, 

in our build, we have a module C with a dependeny to module B, having a 
dependency to module A in version A-4.0.14, but managed to version 
A-4.0.15.
Thus, this version and dependency is build into Manifest.MF of module C:

Class-Path: B-1.0.0-SNAPSHOT.jar A-4.0.15.jar

Later on, we pick up module C, and copy all dependencies of it into a 
directory structure - assuming, that a complete classpath will result.
When copying dependencies, not version A-4.0.15 is copied, but A-4.0.14 
(coming from module B´s dependencies).

=> We now have a runtime problem, because in Manifest.MF A-4.0.15 is 
stated, but A-4.0.14 was copied.

Any suggestions how to handle this?

Thanx, Torsten

Re: dependencyManagement and Manifest.MF issue

Posted by Jörg Schaible <jo...@gmx.de>.
Hi Torsten,
torsten.reinhard@gi-de.com wrote at Dienstag, 23. Februar 2010 15:24:

> Hi,
> 
> in our build, we have a module C with a dependeny to module B, having a
> dependency to module A in version A-4.0.14, but managed to version
> A-4.0.15.
> Thus, this version and dependency is build into Manifest.MF of module C:
> 
> Class-Path: B-1.0.0-SNAPSHOT.jar A-4.0.15.jar
> 
> Later on, we pick up module C, and copy all dependencies of it into a
> directory structure - assuming, that a complete classpath will result.
> When copying dependencies, not version A-4.0.15 is copied, but A-4.0.14
> (coming from module B´s dependencies).
> 
> => We now have a runtime problem, because in Manifest.MF A-4.0.15 is
> stated, but A-4.0.14 was copied.
> 
> Any suggestions how to handle this?

Use a dependencyManagement section in a shared parent POM where you define 
the versions of your direct and transitive deps. NOte, that such a parent 
POM does not have to be in the parent directory, but can be an artifact on 
its own right with own release cycle.

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org