trying to figure out what is generating these messages

236 views
Skip to first unread message

David Bernard

unread,
Oct 25, 2009, 10:48:17 AM10/25/09
to maven-a...@googlegroups.com
Th mailing lisrt is a better place for this message...


---------- Forwarded message ----------

rbpasker sent you a message.

--------------------
Subject: trying to figure out what is generating these messages

Hi David --

i'm seeing these two messages in my mvn compile of my scala project:

[INFO] Checking for multiple versions of scala
[WARNING] Multiple versions of scala libraries detected!

the dependency tree is at the bottom. 2.7.3 is being omitted in favor
of 2.7.6, but the error message still comes out.

do you know how I can figure out why 2.7.3 is still being pulled in?
how i can get the scala plugin for maven to stop producting the
warning?

thanks, bob


mvn dependency:tree -Dverbose
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'dependency'.
[INFO] ------------------------------------------------------------------------
[INFO] Building hyperview
[INFO]    task-segment: [dependency:tree]
[INFO] ------------------------------------------------------------------------
Downloading: http://scala-tools.org/repo-releases/org/scala-lang/scala-library/2.7.3/scala-library-2.7.3.pom
666b downloaded
[INFO] [dependency:tree]
[INFO] com.HyperView:hyperview:war:1.0-SNAPSHOT
[INFO] +- org.scala-lang:scala-library:jar:2.7.6:compile
[INFO] +- net.liftweb:lift-util:jar:1.0:compile
[INFO] |  +- (org.scala-lang:scala-library:jar:2.7.3:compile - omitted
for conflict with 2.7.6)
[INFO] |  +- log4j:log4j:jar:1.2.14:compile
[INFO] |  +- javax.mail:mail:jar:1.4:compile
[INFO] |  |  \- (javax.activation:activation:jar:1.1:compile - omitted
for duplicate)
[INFO] |  +- javax.activation:activation:jar:1.1:compile
[INFO] |  +- commons-httpclient:commons-httpclient:jar:3.1:compile
[INFO] |  |  +- commons-logging:commons-logging:jar:1.0.4:compile
[INFO] |  |  \- (commons-codec:commons-codec:jar:1.2:compile - omitted
for conflict with 1.3)
[INFO] |  +- commons-fileupload:commons-fileupload:jar:1.2.1:compile
[INFO] |  +- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] |  \- commons-codec:commons-codec:jar:1.3:compile
[INFO] +- net.liftweb:lift-webkit:jar:1.0:compile
[INFO] |  +- (net.liftweb:lift-util:jar:1.0:compile - omitted for duplicate)
[INFO] |  +- (org.scala-lang:scala-library:jar:2.7.3:compile - omitted
for conflict with 2.7.6)
[INFO] |  +- (log4j:log4j:jar:1.2.14:compile - omitted for duplicate)
[INFO] |  +- (javax.mail:mail:jar:1.4:compile - omitted for duplicate)
[INFO] |  +- (javax.activation:activation:jar:1.1:compile - omitted
for duplicate)
[INFO] |  +- (commons-httpclient:commons-httpclient:jar:3.1:compile -
omitted for duplicate)
[INFO] |  +- (commons-fileupload:commons-fileupload:jar:1.2.1:compile
- omitted for duplicate)
[INFO] |  +- (commons-collections:commons-collections:jar:3.2.1:compile
- omitted for duplicate)
[INFO] |  \- (commons-codec:commons-codec:jar:1.3:compile - omitted
for duplicate)
[INFO] +- net.liftweb:lift-mapper:jar:1.0:compile
[INFO] |  +- (org.scala-lang:scala-library:jar:2.7.3:compile - omitted
for conflict with 2.7.6)
[INFO] |  \- (net.liftweb:lift-webkit:jar:1.0:compile - omitted for duplicate)
[INFO] +- javax.servlet:servlet-api:jar:2.5:provided
[INFO] +- junit:junit:jar:4.5:test
[INFO] +- org.mortbay.jetty:jetty:jar:6.1.21:test
[INFO] |  +- org.mortbay.jetty:jetty-util:jar:6.1.21:test
[INFO] |  \- org.mortbay.jetty:servlet-api:jar:2.5-20081211:test
[INFO] +- org.scala-lang:scala-compiler:jar:2.7.6:test
[INFO] |  \- (org.scala-lang:scala-library:jar:2.7.6:test - omitted
for duplicate)
[INFO] \- net.databinder:dispatch-http_2.7.6:jar:0.6.0:compile
[INFO]    +- org.apache.httpcomponents:httpclient:jar:4.0:compile
[INFO]    |  +- org.apache.httpcomponents:httpcore:jar:4.0.1:compile
[INFO]    |  +- (commons-logging:commons-logging:jar:1.1.1:compile -
omitted for conflict with 1.0.4)
[INFO]    |  \- (commons-codec:commons-codec:jar:1.3:compile - omitted
for duplicate)
[INFO]    \- (org.scala-lang:scala-library:jar:2.7.6:compile - omitted
for duplicate)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL

--------------------

David Bernard

unread,
Oct 25, 2009, 10:54:33 AM10/25/09
to Maven and Scala
Hi Bob,

> [INFO] Checking for multiple versions of scala
> [WARNING] Multiple versions of scala libraries detected!
>
> the dependency tree is at the bottom. 2.7.3 is being omitted in favor
> of 2.7.6, but the error message still comes out.
>
> do you know how I can figure out why 2.7.3 is still being pulled in?
> how i can get the scala plugin for maven to stop producting the
> warning?

The scala code is not fully binary compatible (not like java).
The warning is raised because using library build with a version x of
scala could not work with a version y. The warning is produice
redardless to how maven "resolve" version.
Lift 1.0 was build to work with scala 2.7.3 => 2.7.3 is pulled.

David Bernard

unread,
Oct 25, 2009, 11:04:10 AM10/25/09
to Maven and Scala
I forgot :

You can disable the test (at your own risk) : by configuring
checkMultipleScalaVersions to false
see http://scala-tools.org/mvnsites/maven-scala-plugin/compile-mojo.html#checkMultipleScalaVersions

/davidB

bob

unread,
Oct 25, 2009, 11:03:22 AM10/25/09
to Maven and Scala
Thanks David, that helped but didn't fully answer my question.

how do i find out from the scala maven plugin itself which pom is
demanding 2.7.3?

the [WARNING] needs to identify which scala library versions were
found, and what the offending POM

David Bernard

unread,
Oct 25, 2009, 11:11:13 AM10/25/09
to maven-a...@googlegroups.com
You're right the plugin should alert and list dependency that require
an other version of scala without required the user to use the
dependency:tree goal (not kwon by lot of maven user).

http://github.com/davidB/maven-scala-plugin/issues/#issue/17

/davidB

Josh Suereth

unread,
Oct 25, 2009, 11:51:01 AM10/25/09
to maven-a...@googlegroups.com
You should make a feature request on the github project ;)

Also,  You should *not* use Scala 2.7.6 with lift as there's a bug in 2.7.6.  If things are working for you now, GREAT, but I think the first thing you'll be told upon finding issues is "use the same scala version".

- Josh
Reply all
Reply to author
Forward
0 new messages