How to generate JAR in Gatling Project

Hi Guys

I have a question.

I am working with Gatling and always I run the tests with this commands:

gatling:execute -Dgatling.simulationClass=BVI.Scenarios.PACKAGE.CLASS

I need to generate the JAR with all dependencies for execute from console with the command java -jar NAME_PACKAGE_JAR and specific arguments.

Could someone help me with something tutorial or reference for this implementation?

Thanks and regards,

Yes you can use shade maven plugin to generate the fat jar.

Hi Ricardo

! will review this information.


Hi Ricardo

At the momento, I am woerking for generate .jar file with your indications, but I have a problem, after generate the jar with the command “mvn clean verify” I execute with java -jar package_generate -s NAME_CLASS and I get the folloeing error:

InvocationTargetException: Could not locate feeder file: file passport.csv doesn’t exist

My structure files are:

—resources → Here are the files csv


then, if is genereted the package but doesn’t find the recources that are in the package “recources”

Can you help me?

Thanks and regards,