Playframework 2.3.9 dependency override

As in Play 2.3, Play is added as an SBT plugin as follows in my Build.scala as follows:

 Project("root", file(".")).enablePlugins(play.PlayScala) 

Also see the documentation .

I need a specific dependency updated, namely Fluentlenium (Play 2.3.9 still uses 0.9.3):

 "org.fluentlenium" % "fluentlenium-core" % "0.10.3" 

How to replace the old version and replace it with a new one? Just adding a library to libraryDependencies leaves me with both versions in the class path.


Editing: after you dig a little deeper, it seems that the function (new?) dependencyOverrides that comes with SBT 13.8 might be the solution:

Override version . But also see Conflict Management from the same documentation.

In doing so, you can override individual dependencies, which means that you must manually override each transit dependency.

+5
source share
1 answer

Just adding a library to libraryDependencies leaves me with both versions in the class path.

Are you sure about that? sbt (Ivy) should supersede the older one if there are several versions in the same configuration.

In most cases

 libraryDependencies += "org.fluentlenium" % "fluentlenium-core" % "0.10.3" 

should be ok if 0.9.x is binary compatible with 0.10.x. If you want it to be overridden during the transitional resolution of dependencies, dependencyOverrides could be as follows:

 dependencyOverrides += "org.fluentlenium" % "fluentlenium-core" % "0.10.3" 
+1
source

All Articles