alexandre-senecal commented on issue #6052:
URL: https://github.com/apache/jmeter/issues/6052#issuecomment-3432900269

   In case this may help others. I stumbled upon this when trying to run an 
Azure Load Testing JMeter test that uses Azure Cosmos DB for MongoDB.
   
   Azure controls the JMeter image and you have limited control over user 
classpath. The easiest way to get around this limitation was to use the Maven 
shade plugin to remap the Mongo Driver and it's embedded dependencies. For my 
case it was the following.
   
   `
   <project>
   ...
     <build>
       <plugins>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-shade-plugin</artifactId>
           <version>3.6.1</version>
           <!-- Use the latest stable version -->
           <executions>
             <execution>
               <phase>package</phase>
               <goals>
                 <goal>shade</goal>
               </goals>
               <configuration>
                 <relocations>
                   <relocation>
                     <pattern>com.mongodb</pattern>
                     <shadedPattern>com.shaded.mongodb</shadedPattern>
                   </relocation>
                   <relocation>
                     <pattern>org.bson</pattern>
                     <shadedPattern>org.shaded.bson</shadedPattern>
                   </relocation>
                 </relocations>
               </configuration>
             </execution>
           </executions>
         </plugin>
   ...
   `


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to