title: How to specify Java system properties for embedded Jetty with cargo-maven2-plugin
body: <p>I'm trying to use the Maven Cargo plugin to launch an embedded Jetty container for my project's integration tests. The web applications being hosted with Jetty need a Java system property to be passed in pointing to their configuration file. How do I get this to work with Cargo?</p>
  
  <p>I've tried the plugins <code>cargo.jvmargs</code> setting, and it doesn't seem to be working:</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;!-- Launch an embedded Jetty instance hosting this project's WAR (as 
          well as the rps-tourney-service-app WAR it depends on) prior to running this 
          project's integration tests, and stop it after the integration tests. Alternatively, 
          for manual testing, manually run 'mvn cargo:run' to start the Jetty server, 
          and have Cargo wait for a 'ctrl+c' command to stop it. --&gt;
      &lt;groupId&gt;org.codehaus.cargo&lt;/groupId&gt;
      &lt;artifactId&gt;cargo-maven2-plugin&lt;/artifactId&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;id&gt;start-container&lt;/id&gt;
              &lt;phase&gt;pre-integration-test&lt;/phase&gt;
              &lt;goals&gt;
                  &lt;goal&gt;start&lt;/goal&gt;
              &lt;/goals&gt;
          &lt;/execution&gt;
          &lt;execution&gt;
              &lt;id&gt;stop-container&lt;/id&gt;
              &lt;phase&gt;post-integration-test&lt;/phase&gt;
              &lt;goals&gt;
                  &lt;goal&gt;stop&lt;/goal&gt;
              &lt;/goals&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
      &lt;configuration&gt;
          &lt;container&gt;
              &lt;containerId&gt;jetty9x&lt;/containerId&gt;
              &lt;type&gt;embedded&lt;/type&gt;
          &lt;/container&gt;
          &lt;configuration&gt;
              &lt;properties&gt;
                  &lt;cargo.servlet.port&gt;9093&lt;/cargo.servlet.port&gt;
                  &lt;cargo.jvmargs&gt;-Drps.service.config.path=${project.build.testOutputDirectory}/rps-service-config-its.xml
                      -Drps.webapp.config.path=${project.build.testOutputDirectory}/rps-webapp-config-its.xml&lt;/cargo.jvmargs&gt;
              &lt;/properties&gt;
          &lt;/configuration&gt;
          &lt;deployables&gt;
              &lt;deployable&gt;
                  &lt;!-- The web service WAR for the application. --&gt;
                  &lt;groupId&gt;com.justdavis.karl.rpstourney&lt;/groupId&gt;
                  &lt;artifactId&gt;rps-tourney-service-app&lt;/artifactId&gt;
                  &lt;type&gt;war&lt;/type&gt;
                  &lt;properties&gt;
                      &lt;context&gt;/rps-tourney-service-app&lt;/context&gt;
                  &lt;/properties&gt;
              &lt;/deployable&gt;
              &lt;deployable&gt;
                  &lt;!-- The end-user web site WAR for the application. As this is the 
                      current project, Cargo binds the artifact automatically. All that needs to 
                      be done here is to configure the context path. --&gt;
                  &lt;properties&gt;
                      &lt;context&gt;/rps-tourney-webapp&lt;/context&gt;
                  &lt;/properties&gt;
              &lt;/deployable&gt;
          &lt;/deployables&gt;
      &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>The webapps launch as expected, but then die because the expected configuration property is not being found.</p>