Migration from 2.0-to-2.1 (sbt-plugin)

Following the information on this page (http://gatling.io/docs/2.1.0/project/migration_guides/2.0-to-2.1.html#sbt-plugin), I have updated my library dependencies to be as such:

scalaVersion := “2.11.2”

val test = project.in(file("."))
.enablePlugins(GatlingPlugin)
.settings(libraryDependencies += “io.gatling.highcharts” % “gatling-charts-highcharts” % “2.1.0” % “test”)
.settings(libraryDependencies += “io.gatling” % “gatling-sbt” % “2.1.0” % “test”)
.settings(libraryDependencies += “io.gatling” % “gatling-test-framework” % “2.1.0” % “test”)

However, I am receiving unresolved dependencies for gatling-sbt, which I note is not in Maven Central. Am I calling the incorrect dependencies?

gatling-sbt is the new name of the sbt-plugin, it’s your plugins.sbt file that you’ll need to update in that case.

Hi,

My setup is this.

// plugins.sbt

scalaVersion := “2.11.2”

addSbtPlugin(“io.gatling” % “gatling-sbt” % “2.1.0”)

// build.sbt

scalaVersion := “2.11.2”

val test = project.in(file("."))
.enablePlugins(GatlingPlugin)
.settings(libraryDependencies += “io.gatling.highcharts” % “gatling-charts-highcharts” % “2.1.0” % “test”)
.settings(libraryDependencies += “io.gatling” % “gatling-test-framework” % “2.1.0” % “test”)

Unfortunately, I am receiving:

[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] io.gatling:gatling-sbt:2.1.0 (sbtVersion=0.13, scalaVersion=2.11)

Many Thanks

Aidy

Remove the scalaVersion from plugins.sbt

This is a Bintray synchronization on our side.
We’ve asked for one, please wait for gatling-sbt to appear here: http://dl.bintray.com/sbt/sbt-plugin-releases/io.gatling/

Synchronization done (kudos to Josh Suereth): http://dl.bintray.com/sbt/sbt-plugin-releases/io.gatling/gatling-sbt/scala_2.10/sbt_0.13/2.1.0/jars/

I also updated the demo: https://github.com/gatling/gatling-sbt-plugin-demo

Stephane/Pierre

Magic. I am up and running with release 2.1.0.

Many Thanks

Aidy

Great.
But please upgrade to 2.1.1. We messed up and released a quick fix… :frowning:

Hi Stephane,

I copied the demo. gatling-sbt is still 2.1.0

https://github.com/gatling/gatling-sbt-plugin-demo/blob/master/project/plugins.sbt

And only works with 2.10.

Thanks

Aidy

The plugin version is still 2.1.0 (no reason to upgrade, wasn’t bugged).
But Gatling modules are in 2.1.1: https://github.com/gatling/gatling-sbt-plugin-demo/blob/master/build.sbt#L9-L10

And only works with 2.10.
The plugin is compiled and runs with 2.10 (that’s transparent for you), but Gatling 2.1 modules runs with 2.11: https://github.com/gatling/gatling-sbt-plugin-demo/blob/master/build.sbt#L3

Cheers,
Stéphane

About Scala versions : there is a difference between the version that SBT uses itself (which, ATM, is Scala 2.10) and the version your project is using (which could be anything from Scala 2.10 and possibly earlier versions to Scala 2.12).

Here the plugins is built against Scala 2.10, because SBT requires that the plugins uses the same version as SBT itself.
But this does not block you from using Gatling 2.1.x, built upon Scala 2.11.

A good example is Gatling itself: built with Scala 2.11, relying on SBT and a variety of plugins built with Scala 2.10.
And it works well :slight_smile: