title: Maven Exec Plugin : How configure the working directory
body: <p>I'm using the Exec Maven plugin with the following command :</p>
  
  <blockquote>
    <p>mvn exec:java</p>
  </blockquote>
  
  <p>and I didn't manage to set the <strong>working directory</strong> with this execution mode. 
  I want to use a mainClass (in a specific package) 
  and I want the root folder of my execution in another directory than the ${basedir}.</p>
  
  <p>Thank you for your help.</p>
  
  <p>My pom.xml  where the target <strong>&lt; workingDirectory ></strong> doesn't work for me :</p>
  
  <pre><code>&lt;plugin&gt;
          &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
          &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
          &lt;version&gt;1.3.2&lt;/version&gt;
          &lt;configuration&gt;
              &lt;workingDirectory&gt;${project.build.directory}\classes&lt;/workingDirectory&gt;
              &lt;mainClass&gt;com.package.MyMainClass&lt;/mainClass&gt;
              &lt;includeProjectDependencies&gt;true&lt;/includeProjectDependencies&gt;
          &lt;/configuration&gt;
    &lt;/plugin&gt;
  </code></pre>
  
  <p>the result with the -X option</p>
  
  <pre><code>[DEBUG] Configuring mojo org.codehaus.mojo:exec-maven-plugin:1.3.2:java from plugin realm ClassRealm[plugin&gt;org.codehaus.mojo:exec-maven-plugin:1.3.2,parent: sun.misc.Launcher$AppClassLoader@11b86e7]
  [DEBUG] Configuring mojo 'org.codehaus.mojo:exec-maven-plugin:1.3.2:java' with basic configurator --&gt;
  [DEBUG]   (f) arguments = []
  [DEBUG]   (f) classpathScope = runtime
  [DEBUG]   (f) cleanupDaemonThreads = true
  [DEBUG]   (f) daemonThreadJoinTimeout = 15000
  [DEBUG]   (f) includePluginDependencies = false
  [DEBUG]   (f) includeProjectDependencies = true
  [DEBUG]   (f) keepAlive = false
  [DEBUG]   (f) killAfter = 1
  [DEBUG]   (f) localRepository =        id: local url: file:///C:/Users/100728452/.m2/repository/   layout: none
  [DEBUG]   (f) mainClass = com.package.MyMainClass
  [DEBUG]   (f) pluginDependencies = [org.codehaus.mojo:exec-maven-plugin:maven-plugin:1.3.2:, org.codehaus.plexus:plexus...
  [DEBUG]   (f) skip = false
  [DEBUG]   (f) stopUnresponsiveDaemonThreads = false
  [DEBUG]   (s) key = sun.java2d.ddoffscreen
  [DEBUG]   (s) value = false
  [DEBUG]   (s) key = com.odi.OStoreLicenseFile
  [DEBUG]   (s) value = .\library\odi\etc\license.txt
  [DEBUG]   (f) systemProperties = [org.codehaus.mojo.exec.Property@194e776, org.codehaus.mojo.exec.Property@e80740]
  [DEBUG] -- end configuration --
  [WARNING] Warning: killAfter is now deprecated. Do you need it ? Please comment on MEXEC-6.
  [DEBUG] Invoking : com.mypackage.MyMainClass.main()
  [DEBUG] Plugin Dependencies will be excluded.
  [DEBUG] Project Dependencies will be included.
  [DEBUG] Collected project artifacts [javax.help:javahelp:jar:2.0.02:compile,
  </code></pre>