Error configuring gatling-sbt using enablePlugins(GatlingPlugin)

2,141 views
Skip to first unread message

Matthew Adams

unread,
Dec 18, 2014, 3:15:09 PM12/18/14
to gat...@googlegroups.com
Hi all,

NB:  Total scala & gatling noob with first time post after much googling.

I'm using sbt 0.13.6 on OS X, trying to follow the instructions in the readme at https://github.com/gatling/gatling-sbt

Here's my build.sbt:

enablePlugins(GatlingPlugin)

name := "solution-360-payment-flow-client"

version       := "0.1"

scalaVersion  := "2.11.2"

scalacOptions := Seq("-unchecked", "-deprecation", "-encoding", "utf8")

libraryDependencies ++= {
  val akkaV = "2.3.6"
  val sprayV = "1.3.2"
  Seq(
    "io.spray"              %%  "spray-json"                % "1.3.1",
    "io.spray"              %%  "spray-client"              % sprayV,
    "io.spray"              %%  "spray-can"                 % sprayV,
    "io.spray"              %%  "spray-routing"             % sprayV,
    "io.spray"              %%  "spray-testkit"             % sprayV   % "test",
    "io.spray"              %%  "spray-caching"             % sprayV,
    "com.typesafe.akka"     %%  "akka-actor"                % akkaV,
    "com.typesafe.akka"     %%  "akka-testkit"              % akkaV    % "test",
    "org.specs2"            %%  "specs2-core"               % "2.3.11" % "test",
    "io.gatling.highcharts" %   "gatling-charts-highcharts" % "2.1.1"  % "test,it",
    "io.gatling"            %   "gatling-test-framework"    % "2.1.1"  % "test,it"
    )
}

EclipseKeys.withSource := true

And my project/plugins.sbt:

addSbtPlugin("io.gatling" % "gatling-sbt" % "2.1.0")

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.5.0")

Here's my terminal output when trying to run sbt in the root directory of my project (sanitized with ellipses to protect the innocent & highlighting added).  My ~/.sbt/0.13/plugins/plugins.sbt is empty.

🍺  scala -version

Scala code runner version 2.11.4 -- Copyright 2002-2013, LAMP/EPFL

🍺  sbt --version

sbt launcher version 0.13.6

🍺  sbt

[info] Loading global plugins from /Users/matthew/.sbt/0.13/plugins

[info] Loading project definition from /Users/matthew/Documents/.../lesson-360-exercises/payment-flow-client/solution/project

[info] Updating {file:/Users/matthew/Documents/.../lesson-360-exercises/payment-flow-client/solution/project/}solution-build...

[info] Resolving org.fusesource.jansi#jansi;1.4 ...

[info] Done updating.

/Users/matthew/Documents/.../lesson-360-exercises/payment-flow-client/solution/build.sbt:1: error: not found: value enablePlugins

enablePlugins(GatlingPlugin)

^

[error] Type error in expression

Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?

What am I doing wrong?

TIA,

Matthew

Stéphane Landelle

unread,
Dec 18, 2014, 4:00:38 PM12/18/14
to gat...@googlegroups.com
Have you tried upgrading to 0.13.7?

🍺  scala -version

Scala code runner version 2.11.4 -- Copyright 2002-2013, LAMP/EPFL

🍺  sbt --version

sbt launcher version 0.13.6

🍺  sbt

[info] Loading global plugins from /Users/matthew/.sbt/0.13/plugins

[info] Loading project definition from /Users/matthew/Documents/.../lesson-360-exercises/payment-flow-client/solution/project

[info] Updating {file:/Users/matthew/Documents/.../lesson-360-exercises/payment-flow-client/solution/project/}solution-build...

[info] Resolving org.fusesource.jansi#jansi;1.4 ...

[info] Done updating.

/Users/matthew/Documents/.../lesson-360-exercises/payment-flow-client/solution/build.sbt:1: error: not found: value enablePlugins

enablePlugins(GatlingPlugin)

^

[error] Type error in expression

Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?

What am I doing wrong?

TIA,

Matthew

--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
emoji_u1f37a.png

Matthew Adams

unread,
Dec 18, 2014, 4:21:15 PM12/18/14
to gat...@googlegroups.com
Upgraded after your question, retried and got the same error.  :(

--
You received this message because you are subscribed to a topic in the Google Groups "Gatling User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gatling/0iIwrfdGNgw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gatling+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Pierre DAL-PRA

unread,
Dec 18, 2014, 4:37:30 PM12/18/14
to gat...@googlegroups.com
That’s very strange, since this is working without issues : https://github.com/gatling/gatling-sbt/blob/master/src/sbt-test/gatling-sbt/copyConfigFiles/build.sbt
Can you clean your Ivy cache and try again please ?

On 18 Dec 2014, at 22:20, Matthew Adams <mat...@matthewadams.me> wrote:

Upgraded after your question, retried and got the same error.  :(

<emoji_u1f37a.png>  scala -version

Scala code runner version 2.11.4 -- Copyright 2002-2013, LAMP/EPFL

<emoji_u1f37a.png>  sbt --version

sbt launcher version 0.13.6

<emoji_u1f37a.png>  sbt

Matthew Adams

unread,
Dec 18, 2014, 5:05:14 PM12/18/14
to gat...@googlegroups.com
I renamed ~/.ivy2 to ~/.ivy2-stale and reran, confirming sbt was at version 0.13.7.  Same error.  :(   Here's terminal output:

🍺  mv ~/.ivy2 ~/.ivy2-stale
🍺  sbt --version
sbt launcher version 0.13.7
🍺  sbt
[info] Loading global plugins from /Users/matthew/.sbt/0.13/plugins
[info] Updating {file:/Users/matthew/.sbt/0.13/plugins/}global-plugins...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] [SUCCESSFUL ] org.scala-lang#scala-library;2.10.4!scala-library.jar (3297ms)
[info] [SUCCESSFUL ] org.scala-sbt#sbt;0.13.5!sbt.jar (480ms)
[info] [SUCCESSFUL ] org.scala-sbt#main;0.13.5!main.jar (2542ms)
[info] [SUCCESSFUL ] org.scala-sbt#compiler-interface;0.13.5!compiler-interface-src.jar (362ms)
[info] [SUCCESSFUL ] org.scala-sbt#compiler-interface;0.13.5!compiler-interface-bin.jar (522ms)
[info] [SUCCESSFUL ] org.scala-sbt#precompiled-2_8_2;0.13.5!compiler-interface-bin.jar (466ms)
[info] [SUCCESSFUL ] org.scala-sbt#precompiled-2_9_2;0.13.5!compiler-interface-bin.jar (470ms)
[info] [SUCCESSFUL ] org.scala-sbt#precompiled-2_9_3;0.13.5!compiler-interface-bin.jar (476ms)
[info] [SUCCESSFUL ] org.scala-sbt#actions;0.13.5!actions.jar (601ms)
[info] [SUCCESSFUL ] org.scala-sbt#main-settings;0.13.5!main-settings.jar (609ms)
[info] [SUCCESSFUL ] org.scala-sbt#interface;0.13.5!interface.jar (346ms)
[info] [SUCCESSFUL ] org.scala-sbt#io;0.13.5!io.jar (429ms)
[info] [SUCCESSFUL ] org.scala-sbt#ivy;0.13.5!ivy.jar (552ms)
[info] [SUCCESSFUL ] org.scala-sbt#launcher-interface;0.13.5!launcher-interface.jar (359ms)
[info] [SUCCESSFUL ] org.scala-sbt#logging;0.13.5!logging.jar (349ms)
[info] [SUCCESSFUL ] org.scala-sbt#logic;0.13.5!logic.jar (361ms)
[info] [SUCCESSFUL ] org.scala-sbt#process;0.13.5!process.jar (351ms)
[info] [SUCCESSFUL ] org.scala-sbt#run;0.13.5!run.jar (349ms)
[info] [SUCCESSFUL ] org.scala-sbt#command;0.13.5!command.jar (412ms)
[info] [SUCCESSFUL ] org.scala-sbt#classpath;0.13.5!classpath.jar (352ms)
[info] [SUCCESSFUL ] org.scala-sbt#completion;0.13.5!completion.jar (491ms)
[info] [SUCCESSFUL ] org.scala-sbt#api;0.13.5!api.jar (415ms)
[info] [SUCCESSFUL ] org.scala-sbt#compiler-integration;0.13.5!compiler-integration.jar (349ms)
[info] [SUCCESSFUL ] org.scala-sbt#compiler-ivy-integration;0.13.5!compiler-ivy-integration.jar (354ms)
[info] [SUCCESSFUL ] org.scala-sbt#relation;0.13.5!relation.jar (342ms)
[info] [SUCCESSFUL ] org.scala-sbt#task-system;0.13.5!task-system.jar (358ms)
[info] [SUCCESSFUL ] org.scala-sbt#tasks;0.13.5!tasks.jar (361ms)
[info] [SUCCESSFUL ] org.scala-sbt#tracking;0.13.5!tracking.jar (363ms)
[info] [SUCCESSFUL ] org.scala-sbt#testing;0.13.5!testing.jar (485ms)
[info] [SUCCESSFUL ] org.scala-lang#scala-compiler;2.10.4!scala-compiler.jar (8207ms)
[info] [SUCCESSFUL ] org.scala-lang#scala-reflect;2.10.4!scala-reflect.jar (1021ms)
[info] [SUCCESSFUL ] org.scala-sbt#control;0.13.5!control.jar (442ms)
[info] [SUCCESSFUL ] org.scala-sbt#collections;0.13.5!collections.jar (826ms)
[info] [SUCCESSFUL ] jline#jline;2.11!jline.jar (358ms)
[info] [SUCCESSFUL ] org.scala-sbt#incremental-compiler;0.13.5!incremental-compiler.jar (840ms)
[info] [SUCCESSFUL ] org.scala-sbt#compile;0.13.5!compile.jar (427ms)
[info] [SUCCESSFUL ] org.scala-sbt#persist;0.13.5!persist.jar (487ms)
[info] [SUCCESSFUL ] org.scala-sbt#classfile;0.13.5!classfile.jar (417ms)
[info] [SUCCESSFUL ] org.scala-tools.sbinary#sbinary_2.10;0.4.2!sbinary_2.10.jar (468ms)
[info] [SUCCESSFUL ] org.scala-sbt#cross;0.13.5!cross.jar (355ms)
[info] [SUCCESSFUL ] org.apache.ivy#ivy;2.3.0!ivy.jar (702ms)
[info] [SUCCESSFUL ] com.jcraft#jsch;0.1.46!jsch.jar (414ms)
[info] [SUCCESSFUL ] org.scala-sbt#cache;0.13.5!cache.jar (609ms)
[info] [SUCCESSFUL ] org.scala-sbt#test-agent;0.13.5!test-agent.jar (355ms)
[info] [SUCCESSFUL ] org.scala-sbt#test-interface;1.0!test-interface.jar (347ms)
[info] [SUCCESSFUL ] org.scala-sbt#apply-macro;0.13.5!apply-macro.jar (529ms)
[info] [SUCCESSFUL ] org.scala-lang#jline;2.10.4!jline.jar (356ms)
[info] [SUCCESSFUL ] org.fusesource.jansi#jansi;1.4!jansi.jar (349ms)
[info] Done updating.
[info] Loading project definition from /Users/matthew/Documents/SciSpike/Scala-2-Course-PP/lesson-360-exercises/payment-flow-client/solution/project
[info] Updating {file:/Users/matthew/Documents/SciSpike/Scala-2-Course-PP/lesson-360-exercises/payment-flow-client/solution/project/}solution-build...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] [SUCCESSFUL ] io.gatling#gatling-sbt;2.1.0!gatling-sbt.jar (1324ms)
[info] [SUCCESSFUL ] com.typesafe.sbteclipse#sbteclipse-plugin;2.5.0!sbteclipse-plugin.jar (380ms)
[info] [SUCCESSFUL ] com.typesafe.sbteclipse#sbteclipse-core;2.5.0!sbteclipse-core.jar (745ms)
[info] [SUCCESSFUL ] org.scalaz#scalaz-core_2.10;7.0.2!scalaz-core_2.10.jar(bundle) (2425ms)
[info] [SUCCESSFUL ] org.scalaz#scalaz-effect_2.10;7.0.2!scalaz-effect_2.10.jar(bundle) (472ms)
[info] [SUCCESSFUL ] org.scala-lang#scala-library;2.10.1!scala-library.jar (2094ms)
[info] Done updating.
/Users/matthew/Documents/.../lesson-360-exercises/payment-flow-client/solution/build.sbt:4: error: not found: value enablePlugins
enablePlugins(GatlingPlugin)
^
[error] Type error in expression
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? q


Pierre DAL-PRA

unread,
Dec 18, 2014, 6:08:26 PM12/18/14
to gat...@googlegroups.com
Do you have a build.properties in the project/ folder which fixes the SBT version (e.g. sbt.version=0.13.7) ?
My guess is that in that case, SBT not being absolutely sure of the 0.13.x version that will be used, may not allow AutoPlugins (since they were introduced with 0.13.2 IIRC).

Always setting the build.properties file is a very good pratice ;)
And it’s actually enforceable if you happen to use Paul Philips SBT script : https://github.com/paulp/sbt-extras.
Since it deduces the SBT version to use from this file, you’re sure to never forget to create it ;)
Reply all
Reply to author
Forward
0 new messages