Hi, I've stripped some dependencies and all the repositories to keep the pom as simple and short as possible:
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>mygroup</groupId> <artifactId>myart</artifactId> <packaging>jar</packaging> <version>1.0</version> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>xmlbeans-maven-plugin</artifactId> <executions> <execution> <goals> <goal>xmlbeans</goal> </goals> <phase>generate-sources</phase> </execution> </executions> </plugin> <plugin> <groupId>org.apache.axis2</groupId> <artifactId>axis2-wsdl2code-maven-plugin</artifactId> <version>PATCHED</version> <executions> <execution> <goals> <goal>wsdl2code</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.0</version> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin> </plugins> </build> <dependencyManagement> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.1</version> </dependency> </dependencies> </dependencyManagement> <dependencies> <dependency> <groupId>org.apache.axis2</groupId> <artifactId>axis2-kernel</artifactId> <version>SNAPSHOT</version> <scope>compile</scope> <exclusions> <exclusion> <groupId>junit</groupId> <artifactId>junit</artifactId> </exclusion> </exclusion> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.1</version> </dependency> </dependencies> </project> As I've already said, running it once results in junit 3.8.1 being used for test compilation which fails (I'm using junit4). Running a compile/test.. a 2nd time without a clean succeeds. Running dependency:resolve succeeds even after a clean run. I've tried with and without exclusions, with and without dependencyManagement, with and without moving the dependencies into the plugin configurations... no change Cheers, Severin ------------- Severin Ecker Business Unit Information Management Smart Systems Division Austrian Research Centers GmbH - ARC 2444 Seibersdorf T: +43(0) 50550 - 3122 M: +43(0) 664 60780 3122 F: +43(0) 50550 - 2813 mailto:[EMAIL PROTECTED] http://www.smart-systems.at -----Ursprüngliche Nachricht----- Von: Brian E. Fox [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 03. April 2007 14:41 An: Maven Users List Betreff: RE: Dependency version ignored Can you give an example? -----Original Message----- From: Ecker Severin [mailto:[EMAIL PROTECTED] Sent: Monday, April 02, 2007 7:59 AM To: Maven Users List Subject: AW: Dependency version ignored Hi, I've just tried maven 2.0.6 with and without dependencyManagement, exclusions, no change. Versions simply are ignored even though the dependency plugin resolves correctly. Someone any more ideas? 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]