expert
expert

Reputation: 30145

Why version of SBT is playing role in name of fully qualified dependency?

Why version of SBT is playing role in name of fully qualified dependency ?

I thought it only depends on version of Scala.

Here is example.

If I build it I see following in the log:

[info] Resolving com.github.siasia#xsbt-web-plugin_2.9.2;0.12.0-0.2.11.1 ...

But if I change sbt.version set to 0.13.0-RC5 SBT fails to find this plugin and says in the log

[info] Resolving com.github.siasia#xsbt-web-plugin_2.10;0.12.0-0.2.11.1 ...

Why did it change scala version if it remains 2.10.2 in my config ? How to fix it ?

Upvotes: 0

Views: 204

Answers (1)

OlegYch
OlegYch

Reputation: 1097

sbt projects are recursive, so each layer has its own settings(including scala version and classpath) (see http://www.scala-sbt.org/0.13.0/docs/Getting-Started/Full-Def.html )

sbt plugins are just regular libraries which depend on sbt, hence the plugins need to be cross-built across sbt versions (and each sbt version may require different scala version)

addSbtPlugin function takes care of that and resolves an appropriate artifact for current sbt and scala

siasia#xsbt-web-plugin is not really maintained anymore and it does not have versions for sbt 0.13, use https://github.com/JamesEarlDouglas/xsbt-web-plugin as a replacement

Upvotes: 4

Related Questions