maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Chamberlain" <richard.chamberl...@caplin.com>
Subject Compiled dependencies are different when using different java versions
Date Mon, 28 Apr 2008 12:59:22 GMT
Hi All,

 

I've got a problem consistently resolving a project transitive
dependency when using different java versions. In my project xercesImpl
is defined as a transitive dependency for two artefacts:

 

Project

+- dependency1

|  +- xerces:xercesImpl:jar:2.6.2:compile

+- dependency2

|  +- xerces:xercesImpl:jar:2.8.1:compile

 

In this situation i'm not sure which version is included in compilation.


 

However what I didn't expect was that if I switch JDK versions between
jdk1.5.0 and jdk1.6.0 that what is compiled would be different!

 

Below is the dependency tree when run on the same machine, with the same
settings, but with different JAVA_HOME variables set.

 

 

 

Java 5

 

> mvn -version

 

Maven version: 2.0.7

Java version: 1.5.0_08

OS name: "windows xp" version: "5.1" arch: "x86"

 

> mvn dependency:tree

 

...

[INFO] +- jaxen:jaxen:jar:1.1.1:compile

...

 [INFO] |  +- xerces:xercesImpl:jar:2.6.2:compile

...

 [INFO] \- caplin.datasource:datasource-java:jar:4.4.8:compile

 

 

Java 6

 

> mvn -version

 

Maven version: 2.0.7

Java version: 1.6.0

OS name: "windows xp" version: "5.1" arch: "x86"

 

> mvn dependency:tree

 

...

[INFO] +- caplin.datasource:datasource-java:jar:4.4.8:compile

[INFO] |  \- xerces:xercesImpl:jar:2.8.1:compile

...

[INFO] +- jaxen:jaxen:jar:1.1.1:compile

...


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message