How to add the ServicesResourceTransformer in gatling-maven-plugin

Background

Basically i am facing the issue in running the gatling execution with the package jar,

Getting the following issue

java.lang.IllegalStateException: Could not find policy ‘pick_first’. Make sure its implementation is either registered to LoadBalancerRegistry or included in META-INF/services/io.grpc.LoadBalancerProvider from your jar files.

i did the further search in the google, and found out that with the help of ServicesResourceTransformer, we could solve the issue.

ServicesResourceTransformer means “Relocated class names in META-INF/services resources and merges them”. it is available in maven-shaeded-plugin during the building jar

but i want to use our gatling-maven-plugin to build the jar file with like this option(ServicesResourceTransformer)

my questions is here, how ServicesResourceTransformer is added in gatling-maven-plugin like below.

 <plugin>
     <groupId>io.gatling</groupId>
     <artifactId>gatling-maven-plugin</artifactId>
     <version>4.2.9</version>
     <configuration>
       <simulationsFolder>src/test/scala</simulationsFolder>
       <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
       <runMultipleSimulations>false</runMultipleSimulations>
       <simulationClass>gatling.test.example.simulation.gatlingSimulation</simulationClass>
     </configuration>

‘’’

Note: i always the gatling:package to generate the jar

would need your suggestions or guidance to go ahead further.

@sbrevet could you please help me on this?

That’s a maven question, unrelated to Gatling. Please ask on StackOverflow or a maven forum.

@slandelle No, i want to know that will our gatling-maven-plugin support the relocated class names in META-INF/services resources and merges them while making the jar,

i believe that it is part of gatling features, right, bundling jar with gatling:package

This task is a Gatling Enterprise feature. We only provide support for it to Gatling Enterprise customers. AFAIK, you’re not one atm.