gatling:execute with maven (mojo failure more than 1 simulation to run)

For some reason I cannot seem to get the gatling maven plugin to pickup my configuration. Running the goal with the -X dumps out the variables being used and they do not update to reflect any changes added into the pom. Below is the plugin snippet from my pom. I have compared it over and over to the examples in the documents and it validates as correct (within IntelliJ). No matter what I do it keeps telling me that I have more than 1 simulation (I do) to run and I need to specify one. What am I doing wrong?

<plugin>
   <groupId>io.gatling</groupId>
   <artifactId>gatling-maven-plugin</artifactId>
   <version>${gatling-plugin.version}</version>
   <executions>
      <execution>
         <configuration>
            <simulationsFolder>src/test/scala</simulationsFolder>
            <simulationClass>com.company.gatling.WspSimulation</simulationClass>
         </configuration>
         <goals>
            <goal>execute</goal>
         </goals>
      </execution>
   </executions>
</plugin>

Hi
For this to work you need to have your simulation file under src/test/scala/com/company/gatling/WspSimulation.scala
and the simulation folder points to src/test/scala

If you put the file in src/test/scala you do not need the package entry.

Yes, the WspSimulation file is in the proper directory and the folder is pointing to the proper location. By adding a phase (test) to the goal I am now able to run the sim via

mvn test

I was hoping to be able to add the goals without tying them to a phase and then be able to run them with

mvn gatling:execute

If I were able to provide an goal id and run specific simulations it would be ideal. Leaving the id off and having it run all the simulations would be nice too.

-Gary

That’s not how maven works: executions are tied to phases, not goals. If you want you directly trigger a goal, set the simulation with a System property.

Yes, I realize that. I thought that a different mechanism was in use when running it as outlined in the plugin docs:

mvn gatling:execute

The system properties would work fine, but how and where do you set them when running the gatling plugin via maven?

Thanks for taking time to respond to my questions, I really do appreciate it!

-Gary

Pass them is your command line, just like usual: -Dfoo=bar