You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Ecker Severin <Se...@arcs.ac.at> on 2007/05/14 14:00:16 UTC

dependency version ignored

Hi,

There seems to be no one who can help me in the users list so I hope
that someone around here does haven an idea:
My problem is as follows:

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.

//this fails
mvn clean test


//all of these work, the first line always fails because of the
"missing" junit4 of course

mvn clean compile
mvn compile test

mvn clean compile
mvn compiler:testCompile

mvn clean compile
mvn test




A simple example looks like this:
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>


Thanks in advance and best regards,
Severin


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


AW: dependency version ignored

Posted by Ecker Severin <Se...@arcs.ac.at>.
Hi Patrick,

Oh my goodness, you're a genius!
Your suggestions finally did the trick for me and
mvn clean test-compile
works as it should.

Sincere thanks to you my friend, you saved my day ;)

Best regards,
Severin



-----Ursprüngliche Nachricht-----
Von: Patrick Schneider [mailto:pschneider@gmail.com] 
Gesendet: Donnerstag, 17. Mai 2007 02:39
An: Maven Developers List
Betreff: Re: dependency version ignored

I would be curious to see the -X output if you could send it along.

Your dependency declaration on junit 4.1 is a project dependency, not a
plugin dependency.  That means it shouldn't affect the classpath for the
xmlbeans plugin, when it runs.  You should try adding a dependency in the
plugin declaration itself, like this:

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>xmlbeans-maven-plugin</artifactId>
  <executions>
    <execution>
      <goals>
        <goal>xmlbeans</goal>
      </goals>
      <phase>generate-sources</phase>
    </execution>
  </executions>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.1</version>
    </dependency>
  </dependencies>
</plugin>

Try that out and keep me posted  ;o)


Patrick

On 5/15/07, Richard van der Hoff <ri...@mxtelecom.com> wrote:
>
> Ecker Severin wrote:
> > Hi,
> >
> > Unfortunately removing the exclusion clause didn't help ;/
> > is there anything wrong with my pom file? I can't find a problem there
> but maybe I'm missing something.
>
> Can't see anything obviously wrong. You might try running mvn with -X
> which will give you lots of debug, including a bit about how it's
> resolving dependencies.
>
> I don't think it's causing your problem, but one thing to note is that
> if you are only using junit for testing, you should specify it with
> <scope>test</scope> to avoid it ending up on your runtime classpath.
>
>
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Wayne Fay [mailto:waynefay@gmail.com]
> > Gesendet: Montag, 14. Mai 2007 17:32
> > An: Maven Developers List
> > Betreff: Re: dependency version ignored
> >
> > Remove the junit <exclusion> under axis2-kernel and try again.
> >
> > Wayne
> >
> > On 5/14/07, Ecker Severin <Se...@arcs.ac.at> wrote:
> >> Hi,
> >>
> >> I've tried both, version 2.0.5 and 2.0.6, equal results.
> >>
> >> Best regards,
> >> severin
> >>
> >> -----Ursprüngliche Nachricht-----
> >> Von: Ralph Goers [mailto:Ralph.Goers@dslextreme.com]
> >> Gesendet: Montag, 14. Mai 2007 16:00
> >> An: Maven Developers List
> >> Betreff: Re: dependency version ignored
> >>
> >> What version of maven are you using?
> >>
> >> Ecker Severin wrote:
> >>> Hi,
> >>>
> >>> There seems to be no one who can help me in the users list so I hope
> >>> that someone around here does haven an idea:
> >>> My problem is as follows:
> >>>
> >>> 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.
> >>>
> >>> //this fails
> >>> mvn clean test
> >>>
> >>>
> >>> //all of these work, the first line always fails because of the
> >>> "missing" junit4 of course
> >>>
> >>> mvn clean compile
> >>> mvn compile test
> >>>
> >>> mvn clean compile
> >>> mvn compiler:testCompile
> >>>
> >>> mvn clean compile
> >>> mvn test
> >>>
> >>>
> >>>
> >>>
> >>> A simple example looks like this:
> >>> 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>
> >>>
> >>>
> >>> Thanks in advance and best regards,
> >>> Severin
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: dev-help@maven.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
>
>
> --
> Richard van der Hoff <ri...@mxtelecom.com>
> Telephony Gateways Project Manager
> Tel: +44 (0) 845 666 7778
> http://www.mxtelecom.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

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


Re: dependency version ignored

Posted by Patrick Schneider <ps...@gmail.com>.
I would be curious to see the -X output if you could send it along.

Your dependency declaration on junit 4.1 is a project dependency, not a
plugin dependency.  That means it shouldn't affect the classpath for the
xmlbeans plugin, when it runs.  You should try adding a dependency in the
plugin declaration itself, like this:

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>xmlbeans-maven-plugin</artifactId>
  <executions>
    <execution>
      <goals>
        <goal>xmlbeans</goal>
      </goals>
      <phase>generate-sources</phase>
    </execution>
  </executions>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.1</version>
    </dependency>
  </dependencies>
</plugin>

Try that out and keep me posted  ;o)


Patrick

On 5/15/07, Richard van der Hoff <ri...@mxtelecom.com> wrote:
>
> Ecker Severin wrote:
> > Hi,
> >
> > Unfortunately removing the exclusion clause didn't help ;/
> > is there anything wrong with my pom file? I can't find a problem there
> but maybe I'm missing something.
>
> Can't see anything obviously wrong. You might try running mvn with -X
> which will give you lots of debug, including a bit about how it's
> resolving dependencies.
>
> I don't think it's causing your problem, but one thing to note is that
> if you are only using junit for testing, you should specify it with
> <scope>test</scope> to avoid it ending up on your runtime classpath.
>
>
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Wayne Fay [mailto:waynefay@gmail.com]
> > Gesendet: Montag, 14. Mai 2007 17:32
> > An: Maven Developers List
> > Betreff: Re: dependency version ignored
> >
> > Remove the junit <exclusion> under axis2-kernel and try again.
> >
> > Wayne
> >
> > On 5/14/07, Ecker Severin <Se...@arcs.ac.at> wrote:
> >> Hi,
> >>
> >> I've tried both, version 2.0.5 and 2.0.6, equal results.
> >>
> >> Best regards,
> >> severin
> >>
> >> -----Ursprüngliche Nachricht-----
> >> Von: Ralph Goers [mailto:Ralph.Goers@dslextreme.com]
> >> Gesendet: Montag, 14. Mai 2007 16:00
> >> An: Maven Developers List
> >> Betreff: Re: dependency version ignored
> >>
> >> What version of maven are you using?
> >>
> >> Ecker Severin wrote:
> >>> Hi,
> >>>
> >>> There seems to be no one who can help me in the users list so I hope
> >>> that someone around here does haven an idea:
> >>> My problem is as follows:
> >>>
> >>> 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.
> >>>
> >>> //this fails
> >>> mvn clean test
> >>>
> >>>
> >>> //all of these work, the first line always fails because of the
> >>> "missing" junit4 of course
> >>>
> >>> mvn clean compile
> >>> mvn compile test
> >>>
> >>> mvn clean compile
> >>> mvn compiler:testCompile
> >>>
> >>> mvn clean compile
> >>> mvn test
> >>>
> >>>
> >>>
> >>>
> >>> A simple example looks like this:
> >>> 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>
> >>>
> >>>
> >>> Thanks in advance and best regards,
> >>> Severin
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: dev-help@maven.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
>
>
> --
> Richard van der Hoff <ri...@mxtelecom.com>
> Telephony Gateways Project Manager
> Tel: +44 (0) 845 666 7778
> http://www.mxtelecom.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: dependency version ignored

Posted by Richard van der Hoff <ri...@mxtelecom.com>.
Ecker Severin wrote:
> Hi,
> 
> Unfortunately removing the exclusion clause didn't help ;/
> is there anything wrong with my pom file? I can't find a problem there but maybe I'm missing something.

Can't see anything obviously wrong. You might try running mvn with -X 
which will give you lots of debug, including a bit about how it's 
resolving dependencies.

I don't think it's causing your problem, but one thing to note is that 
if you are only using junit for testing, you should specify it with 
<scope>test</scope> to avoid it ending up on your runtime classpath.


> 
> -----Ursprüngliche Nachricht-----
> Von: Wayne Fay [mailto:waynefay@gmail.com] 
> Gesendet: Montag, 14. Mai 2007 17:32
> An: Maven Developers List
> Betreff: Re: dependency version ignored
> 
> Remove the junit <exclusion> under axis2-kernel and try again.
> 
> Wayne
> 
> On 5/14/07, Ecker Severin <Se...@arcs.ac.at> wrote:
>> Hi,
>>
>> I've tried both, version 2.0.5 and 2.0.6, equal results.
>>
>> Best regards,
>> severin
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Ralph Goers [mailto:Ralph.Goers@dslextreme.com]
>> Gesendet: Montag, 14. Mai 2007 16:00
>> An: Maven Developers List
>> Betreff: Re: dependency version ignored
>>
>> What version of maven are you using?
>>
>> Ecker Severin wrote:
>>> Hi,
>>>
>>> There seems to be no one who can help me in the users list so I hope
>>> that someone around here does haven an idea:
>>> My problem is as follows:
>>>
>>> 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.
>>>
>>> //this fails
>>> mvn clean test
>>>
>>>
>>> //all of these work, the first line always fails because of the
>>> "missing" junit4 of course
>>>
>>> mvn clean compile
>>> mvn compile test
>>>
>>> mvn clean compile
>>> mvn compiler:testCompile
>>>
>>> mvn clean compile
>>> mvn test
>>>
>>>
>>>
>>>
>>> A simple example looks like this:
>>> 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>
>>>
>>>
>>> Thanks in advance and best regards,
>>> Severin
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 


-- 
Richard van der Hoff <ri...@mxtelecom.com>
Telephony Gateways Project Manager
Tel: +44 (0) 845 666 7778
http://www.mxtelecom.com

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


AW: dependency version ignored

Posted by Ecker Severin <Se...@arcs.ac.at>.
Hi,

Unfortunately removing the exclusion clause didn't help ;/
is there anything wrong with my pom file? I can't find a problem there but maybe I'm missing something.

Best regards,
Severin


-----Ursprüngliche Nachricht-----
Von: Wayne Fay [mailto:waynefay@gmail.com] 
Gesendet: Montag, 14. Mai 2007 17:32
An: Maven Developers List
Betreff: Re: dependency version ignored

Remove the junit <exclusion> under axis2-kernel and try again.

Wayne

On 5/14/07, Ecker Severin <Se...@arcs.ac.at> wrote:
> Hi,
>
> I've tried both, version 2.0.5 and 2.0.6, equal results.
>
> Best regards,
> severin
>
> -----Ursprüngliche Nachricht-----
> Von: Ralph Goers [mailto:Ralph.Goers@dslextreme.com]
> Gesendet: Montag, 14. Mai 2007 16:00
> An: Maven Developers List
> Betreff: Re: dependency version ignored
>
> What version of maven are you using?
>
> Ecker Severin wrote:
> > Hi,
> >
> > There seems to be no one who can help me in the users list so I hope
> > that someone around here does haven an idea:
> > My problem is as follows:
> >
> > 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.
> >
> > //this fails
> > mvn clean test
> >
> >
> > //all of these work, the first line always fails because of the
> > "missing" junit4 of course
> >
> > mvn clean compile
> > mvn compile test
> >
> > mvn clean compile
> > mvn compiler:testCompile
> >
> > mvn clean compile
> > mvn test
> >
> >
> >
> >
> > A simple example looks like this:
> > 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>
> >
> >
> > Thanks in advance and best regards,
> > Severin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

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


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


Re: dependency version ignored

Posted by Wayne Fay <wa...@gmail.com>.
Remove the junit <exclusion> under axis2-kernel and try again.

Wayne

On 5/14/07, Ecker Severin <Se...@arcs.ac.at> wrote:
> Hi,
>
> I've tried both, version 2.0.5 and 2.0.6, equal results.
>
> Best regards,
> severin
>
> -----Ursprüngliche Nachricht-----
> Von: Ralph Goers [mailto:Ralph.Goers@dslextreme.com]
> Gesendet: Montag, 14. Mai 2007 16:00
> An: Maven Developers List
> Betreff: Re: dependency version ignored
>
> What version of maven are you using?
>
> Ecker Severin wrote:
> > Hi,
> >
> > There seems to be no one who can help me in the users list so I hope
> > that someone around here does haven an idea:
> > My problem is as follows:
> >
> > 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.
> >
> > //this fails
> > mvn clean test
> >
> >
> > //all of these work, the first line always fails because of the
> > "missing" junit4 of course
> >
> > mvn clean compile
> > mvn compile test
> >
> > mvn clean compile
> > mvn compiler:testCompile
> >
> > mvn clean compile
> > mvn test
> >
> >
> >
> >
> > A simple example looks like this:
> > 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>
> >
> >
> > Thanks in advance and best regards,
> > Severin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

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


AW: dependency version ignored

Posted by Ecker Severin <Se...@arcs.ac.at>.
Hi,

I've tried both, version 2.0.5 and 2.0.6, equal results.

Best regards,
severin

-----Ursprüngliche Nachricht-----
Von: Ralph Goers [mailto:Ralph.Goers@dslextreme.com] 
Gesendet: Montag, 14. Mai 2007 16:00
An: Maven Developers List
Betreff: Re: dependency version ignored

What version of maven are you using?

Ecker Severin wrote:
> Hi,
>
> There seems to be no one who can help me in the users list so I hope
> that someone around here does haven an idea:
> My problem is as follows:
>
> 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.
>
> //this fails
> mvn clean test
>
>
> //all of these work, the first line always fails because of the
> "missing" junit4 of course
>
> mvn clean compile
> mvn compile test
>
> mvn clean compile
> mvn compiler:testCompile
>
> mvn clean compile
> mvn test
>
>
>
>
> A simple example looks like this:
> 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>
>
>
> Thanks in advance and best regards,
> Severin


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


Re: dependency version ignored

Posted by Ralph Goers <Ra...@dslextreme.com>.
What version of maven are you using?

Ecker Severin wrote:
> Hi,
>
> There seems to be no one who can help me in the users list so I hope
> that someone around here does haven an idea:
> My problem is as follows:
>
> 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.
>
> //this fails
> mvn clean test
>
>
> //all of these work, the first line always fails because of the
> "missing" junit4 of course
>
> mvn clean compile
> mvn compile test
>
> mvn clean compile
> mvn compiler:testCompile
>
> mvn clean compile
> mvn test
>
>
>
>
> A simple example looks like this:
> 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>
>
>
> Thanks in advance and best regards,
> Severin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>   

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