Maven -D args

Hi,

We’re setting up Gatling so it’s run from Jenkins by starting a mvn goal.
To run we do on the Commandline mvn -Dgatling.simulation=ourSimulation test -Denv=TST

But our system property “env” is not picked up.
When we run the simulation by running the gatling.sh script (which I altered and for initial evaluation), it works fine.
We can also set a property in the pom.xml but do not want that.

Is it known why the -D property is not picked up when running from maven?

tia,

Alex

Hi,

It seems System properties are not properly propagated in fork mode: https://github.com/excilys/gatling/issues/977
Could you disable fork until we get this fixed? Beware of setting Jenkins JVM properly then (use Gatling ones like in the launch scripts).

Cheers,

Stéphane

We made a workaround by subclassing for the different environments.

We’ll look at the jenkins settings, thanks.

Alex

I’ve fixed the issue, planned for 1.4.4.

Cheers,

Stéphane