Try to add a depednencyManagement section to your POM where you define the 
proper version *and* declare the dep additionally in your list of dependencies.

Ecker Severin wrote on Wednesday, March 28, 2007 5:09 PM:

> Hi,
> 
> I've tried to use exclusions on every dependency I had, no
> success. I've run my build with -X which told me that
> basically dozens of indirectly included dependencies (mostly
> axis and the like) use junit 3.8.1.
> 
> I doubt that bloating my pom file with all possible
> dependencies on the build path trying to set exclusions is
> the way to go. And I wouldn't like to be forced to go back to
> junit 3.8 just because of this dependency issues.
> 
> Does somebody have any further suggestions?
> 
> Thanks and cheers,
> Severin
> 
> Ps.: are there any dates yet for maven 2.0.6?
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Andrew Williams [mailto:[EMAIL PROTECTED]
> Gesendet: Mittwoch, 28. März 2007 12:21
> An: Maven Users List
> Betreff: Re: AW: AW: Dependency version ignored
> 
> use mvn -X which will show you why the dependency is being overridden.
> 
> Andy
> 
> On 28 Mar 2007, at 09:54, Ecker Severin wrote:
> 
>> Hi Andy,
>> 
>> thanks for the answer but this doesn't help in any way.
>> Any other suggestions? Can't I just somehow override previous
>> versions or tell maven to just use the dependencies that I DO
>> declare for the project? After all, the dependency plugin figures
>> out the correct version, why doesn't the compiler plugin do so?
>> 
>> Thanks in advance.
>> Cheers,
>> Severin
>> 
>> 
>> -----Ursprüngliche Nachricht-----
>> Von: Andrew Williams [mailto:[EMAIL PROTECTED]
>> Gesendet: Dienstag, 27. März 2007 14:35
>> An: Maven Users List
>> Betreff: Re: AW: Dependency version ignored
>> 
>> use an <exclusion> on the xmlbeans dependency to stop junit from
>> being used? in 2.0.6 dependencyManagement should sort this.
>> 
>> Andy
>> 
>> On 27 Mar 2007, at 08:07, Ecker Severin wrote:
>> 
>>> I'm trying once again...
>>> 
>>> ----
>>> 
>>> I'm not sure whether I'm not using dependencies correctly or this
>>> is a bug, but the situation is as follows:
>>> 
>>> I have a junit 4.1 dependency in my project (and also xmlbeans).
>>> Now xmlbeans happens to have a dependency on junit 3.8.
>>> 
>>> The problem is that my project uses junit 4 annotations BUT maven
>>> simply ignores my dependency and is totally content with junit3.8
>>> on the classpath. Needless to say that the compilation fails.
>>> 
>>> The funny thing though is if I run dependency:resolve immediately
>>> prior to compiler:testCompile it works just fine. (I suppose
>>> because xmlbeans is not used in the testCompile run).
>>> 
>>> I'd appreciate any help on this.
>>> 
>>> Thanks in advance,
>>> Severin
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

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

Reply via email to