Sören Chittka wrote:
> Hi,
> 
> currently I am in the process of building an
> inhouse-maven-repository for the company I am working at.
> While doing so I encountered the problem, that sometimes
> newer versions of dependencies do not only supersede their
> older version, but even
> other artifacts.
> 
> One example would be JAXP:
> On Java SE 5 JAXP 1.3 is provided, and I have to include a
> dependency to the StAX-API and an implementation for some
> applications (or libraries) that use this functionality.
> On Java SE 6 JAXP 1.4 is provided, which already includes the
> StAX-API and the reference implementation.
> 
> So what I would like to do is define a profile "JDK6" in a
> parent pom, with a dependencyManagement-section which tells Maven,
> that JAXP 1.4 is provided, which in turn should not only override
> JAXP 1.3 
> but also the defined version of the StAX-API and -implementation.
> 
> This pattern applies also to Jaxen, which from a specific
> version on includes the Saxpath-packages.
> 
> Is there any way to tell Maven to do what I described?

This is a long standing issue with no easy solution (MNG-177). Currently you 
will have to create such a profile for each artifact that uses the StaX-API 
directly and for artifacts that use it via transitive deps, you will have to 
use exclusions. The later can be declared in profiled dependencyManagement 
sections of an inherited POM. So, yes, it is possible, but there's a lot of 
individual POM management.

- Jörg

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

Reply via email to