Building Gatling using SBT


I have developed a testing tool and I would like to run the tool on Gatling. However, the tool requires the application/framework to be run via SBT. How can I build/run Gatling source code using SBT?



I think building Gatling from SBT would require a lot of work in order to redefine all the set up.

However, I don’t really understand why you’re trying to achieve. Could you elaborate?
Why do you want to build Gatling sources? Aren’t the binaries sufficient?
If you want to run Gatling binaries from SBT, please have a look here:



Thanks Stéphane. Gatling binary would be useful if I can replace the Akka library used in Gatling with my instrumented Akka library. Is it possible to do that?

Actually, it wouldn’t be that hard to be create the necessary configuration to be able to build Gatling from SBT.
There is just one problem : the Maven plugin, which relies on a Maven plugin. And since we can’t run a Maven plugin from SBT…

Sure. Just override the Akka version or use SBT exclude directive.

Beware that Gatling 1.4.X uses Scala 2.9.X/Akka 2.0.X while master uses Scala 2.10.X/Akka 2.2.X.
For stable releases (1.4.X), use excilys repo:
For snapshots (master), use Cloudbees repo:


If I do not want to have the Maven plugin, would it be easy to simply have a version that can build and run via SBT?

Does that mean if I specify the Akka version in my SBT file that has the Gatling jar file as a dependency, then the Akka version in Gatling jar file would be overridden by the Akka version in my SBT file?

As long as the groupId and artifactId are the same, yes.

I am compiling Gatling 1.4 from the source using mvn clean install command. But I am getting the following error:

[INFO] — maven-clean-plugin:2.4.1:clean (default-clean) @ gatling-core —
[INFO] — maven-enforcer-plugin:1.2:enforce (enforce-versions) @ gatling-core —
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] gatling-parent … SUCCESS [5.688s]
[INFO] gatling-core … FAILURE [0.366s]
[INFO] gatling-jdbc … SKIPPED
[INFO] gatling-redis … SKIPPED
[INFO] gatling-http … SKIPPED
[INFO] gatling-charts … SKIPPED
[INFO] gatling-metrics … SKIPPED
[INFO] gatling-app … SKIPPED
[INFO] gatling-recorder … SKIPPED
[INFO] gatling-bundle … SKIPPED
[INFO] gatling-maven-plugin … SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.486s
[INFO] Finished at: Tue Mar 12 12:29:29 CDT 2013
[INFO] Final Memory: 8M/81M
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile “diffa-repo” could not be activated because it does not exist.
[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.1.3:add-source (default) on project gatling-core: The plugin net.alchim31.maven:scala-maven-plugin:3.1.3 requires Maven version 3.0.4 → [Help 1]

Would you please help to compile version 1.4 from the source code?


Which version of Maven are you using ? You need the 3.0.4 as said in the message.

It is 3.0.3. But it seems that there is another warning in the message for “diffa”:
The requested profile “diffa-repo” could not be activated because it does not exist

Should I update my maven version?