Configure the Java agent for Maven Cargo plugin

  • Updated

To configure the Java agent for Maven Cargo plugin:

  1. Add a <cargo.jvmargs> property to the <properties> section of <configuration> in your pom.xml. Replace <YourContrastJarPath> with the path to your Contrast JAR file. For example:

  2. Run your Maven target or Cargo unit test as usual.

  3. A Contrast startup message should appear in the console before your server messages appear. (Allow one or two extra minutes for server startup.)

  4. Navigate to your application, and allow an extra minute for startup.


Learn more about Cargo adding JVM arguments to Cargo container or see an example of how to add the agent to a Maven project.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request