title: Change the maven surefire reportsDirectory using command line
body: <p>I'm looking to save generated reports into a custom location for each of my test suites(for example, ../target/api/surefire-reports, ../target/ui/surefire-reports) </p>
  
  <p>I can do this by adding the below line in the pom.xml</p>
  
  <pre><code>&lt;configuration&gt;
    &lt;reportsDirectory&gt;${project.build.directory}/api/surefire-reports&lt;/reportsDirectory&gt;
  
     &lt;suiteXmlFiles&gt;
       &lt;suiteXmlFile&gt;src/test/resources/api_testng.xml&lt;/suiteXmlFile&gt;                        
     &lt;/suiteXmlFiles&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>However, I want to use command line, and was trying this:</p>
  
  <pre><code>mvn clean test -Dsurefire.suiteXmlFiles=src\\test\\resources\\api_testng.xml -DreportsDirectory=${project.build.directory}\\apitests\\surefire-reports
  </code></pre>
  
  <p>but, it doesn't work and saves the reports in the usual ../target/surefire-reports folder, and doesn't throw any errors as well. </p>
  
  <p>This is quite possible in maven surefire report plugin, like this</p>
  
  <pre><code>mvn surefire-report:report -DoutputDirectory=newpath
  </code></pre>
  
  <p>Does anyone know or have used the command line option to do this in surefire?</p>