# Gatling Maven Plugin

**URL:** <https://community.gatling.io/t/gatling-maven-plugin/22>\
**Category:** Gatling (Open-Source)\
**Created:** [January 17, 2012, 4:03pm UTC](https://community.gatling.io/t/gatling-maven-plugin/22 "2012-01-17T16:03:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicolas\_Huray](https://avatars.discourse-cdn.com/v4/letter/n/bbce88/32.png) [@Nicolas\_Huray](https://community.gatling.io/u/Nicolas_Huray)\
**Post date:** [January 17, 2012, 4:03pm UTC](https://community.gatling.io/t/gatling-maven-plugin/22/1 "2012-01-17T16:03:47Z")

</div>

Hi all,

First of all, congratulations to the Gatling team for this awesome project !!!

I’d like to develop a Maven plugin for Gatling, in order to play simulations from a CI.

The plugin configuration looks like this :

com.excilys.ebi.gatling gatling-maven-plugin 1.1.0 src/main/gatling Home directory by default src/main/gatling src/main/gatling/conf Directory where configuration is stored by default ${home}/conf src/main/resources Directory where simulations are stored by default ${home}/user-files/simulations Pattern to excludes simulations \*\*/test/\*\* Pattern to includes simulations by default \*.txt, \*.scala \*.txt src/main/gatling/user-files/data Directory where data files are stored by default ${home}/user-files/data src/main/gatling/user-files/data Directory where request bodies are stored by default ${home}/user-files/request-bodies true No report option by default 'false' execute

The project tree will be this one by default :

.

> – pom.xml

`–src

> `-- main
> 
> > – gatling  
> > `-- user-files `– data  
> > `-- request-bodies `– simulations  
> > `-- conf `– gatling.conf  
> > `-- logback.xml target `– gatling  
> > `-- 20120103114426 `– 20120103114427

So the maven plugin will execute each simulation file after resolution with includes / excludes using the Gatling cli.

The problem for now is that the Gatling cli is interactive so it’s not possible to execute gatling like that :

/bin/gatling.sh -f my\_simulation.txt Execute the simulation file ‘my\_simulation.txt’ present in simulation folder

Is it possible to change the Gatling cli command to allow a filename simulation ?

Regards,

Nicolas

---

<div class="post-metadata">

**Author:** ![Romain\_Sertelon](https://avatars.discourse-cdn.com/v4/letter/r/48db29/32.png) [@Romain\_Sertelon](https://community.gatling.io/u/Romain_Sertelon)\
**Post date:** [January 17, 2012, 4:19pm UTC](https://community.gatling.io/t/gatling-maven-plugin/22/2 "2012-01-17T16:19:12Z")

</div>

Hi Nicolas,

Thanks for the feedback, and thanks for this good idea 🙂

We have opened an issue to add an option to run specific simulations: [https://github.com/excilys/gatling/issues/363](https://github.com/excilys/gatling/issues/363)

I’ll push my modifications as soon as I can (wednesday night max I hope 🙂 )

As of the project tree, did you have a look at our maven archetype ? It could be great to have the same trees between them. Indeed one could easily create a project that would be run by your plugin.

Regards,  
Romain

---

<div class="post-metadata">

**Author:** ![Nicolas\_Huray](https://avatars.discourse-cdn.com/v4/letter/n/bbce88/32.png) [@Nicolas\_Huray](https://community.gatling.io/u/Nicolas_Huray)\
**Post date:** [January 17, 2012, 4:45pm UTC](https://community.gatling.io/t/gatling-maven-plugin/22/3 "2012-01-17T16:45:11Z")

</div>

Hi Romain,

Indeed it would be great to use the maven archetype to generate a gatling project skeleton and use the same project tree for the plugin.

Regards,

Nicolas

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [January 17, 2012, 5:04pm UTC](https://community.gatling.io/t/gatling-maven-plugin/22/4 "2012-01-17T17:04:52Z")

</div>

First of all, thanks!

Actually, having something to plug Gatling on a CI is something we had in mind.  
So, yes, that’s a great idea!

We’re investigating new CLI parameters that would force the simulation files and bypass the menu.  
Once this is done, one will already be able to plug Gatling on a CI platform with the maven-antrun-plugin, but this solution will require to manually install Gatling.  
This plugin would be a great integrated, plug-and-play solution.

Just a few questions/remarks :

- the default value should point to test resources, not main resources
- would Gatling run in the same JVM as maven? If yes, one would have to tweak the MAVEN\_OPTS.  
Cheers,

Steph

2012/1/17 Nicolas Huray \<[nicolas.huray@gmail.com](mailto:nicolas.huray@gmail.com)\>

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [January 17, 2012, 5:16pm UTC](https://community.gatling.io/t/gatling-maven-plugin/22/5 "2012-01-17T17:16:50Z")

</div>

I’m answering my own question : Gatling should run in a separate JVM, with a option to pass JVM args. 😉

2012/1/17 Stéphane Landelle \<[slandelle@excilys.com](mailto:slandelle@excilys.com)\>

---

<div class="post-metadata">

**Author:** ![Romain\_Sertelon](https://avatars.discourse-cdn.com/v4/letter/r/48db29/32.png) [@Romain\_Sertelon](https://community.gatling.io/u/Romain_Sertelon)\
**Post date:** [January 18, 2012, 9:55pm UTC](https://community.gatling.io/t/gatling-maven-plugin/22/6 "2012-01-18T21:55:48Z")

</div>

Gatling can run several files thanks to the -s option!

This is done, I’ve tested it, it works fine on my computer, I think it’ll be okay on yours too !

Good night 😛

Romain

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [January 19, 2012, 6:34am UTC](https://community.gatling.io/t/gatling-maven-plugin/22/7 "2012-01-19T06:34:57Z")

</div>

Very cool!  
I’ll have a look too.

2012/1/18 Romain Sertelon \<[bluepyth@gmail.com](mailto:bluepyth@gmail.com)\>
