I am new to Gatling and even newer to Maven and Jenkins. So, please excuse my lack of knowledge in these areas.
I am trying to configure some gatling scenarios(which I am able to run using the .bat file on my machine) on Jenkins. Before trying to run it with jenkins, I wanted to run it on my local machine using maven for which, I installed maven 2.2.1 and downloaded the plugin demo from github(https://github.com/excilys/gatling-maven-plugin). When trying to run the command “mvn gatling:execute -Dgatling.simulation=basic.BasicExampleSimulation” from command line, I am getting the following error.
[INFO] Scanning for projects…
[INFO] Searching repository for plugin with prefix: ‘gatling’.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin ‘org.apache.maven.plugins:maven-gatling-plugin’ does not exist or no valid version could be found
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Mon Nov 18 10:00:38 EST 2013
[INFO] Final Memory: 6M/244M
[INFO] ------------------------------------------------------------------------
I didn’t make any changes to any of the files in the repo including the pom file.
If this run’s, I want to copy my simulations in to this folder and will try to run them from Jenkins(already installed the Gatling plugin).
Any help is greatly appreciated.
In the pom.xml, try replacing 2.0.0-SNAPSHOT with 2.0.0-M3a. There are two occurrences that will need to be changed.
If it complains that you need to choose a simulation, replace -Dgatling.simulation to -Dgatling.simulationClass on the command line (I chased my tail for about 20 minutes over this one earlier today)
If that still doesn’t work, let me know. There’s an older project template you can use that has worked for me. But give this a shot first.
Looking at the error you got, I think that you don’t set the groupId for the gatling-maven-plugin.
You can skip a plugin’s groupId if it’s a “core” Maven plugin because Maven will automatically set the groupId to ‘org.apache.maven.plugins’.
However Gatling Maven Plugin’s groupId is ‘io.gatling’, not ‘org.apache.maven.plugins’
Spencer’s plugin config is fine, if you copy the groupId and artifactId from his config, the plugin will work just fine !
I had the same pom file and It is working now. The mistake I did is, I tried to run the mvn command from a different folder than the actual one which has the code.
Thanks for the help.