title: How to inherit the current path when invoking Maven's exec-maven-plugin?
body: <p>I have an <code>&lt;exec-maven-plugin&gt;</code> which calls an external command (in this case, <code>svnversion</code>). The command is in the path for the current user.</p>
  
  <p>However, when a separate shell is spawned by the plugin, the path is not initialized. I don't want to hardcode or define a variable for each external command (there would be too much to maintain, especially that there are both Windows and *nix users).</p>
  
  <p>My <code>pom.xml</code> contains the following:</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.1&lt;/version&gt;
   &lt;executions&gt;
    &lt;execution&gt;
     &lt;id&gt;svnversion-exec&lt;/id&gt;
     &lt;phase&gt;process-resources&lt;/phase&gt;
     &lt;goals&gt;
      &lt;goal&gt;exec&lt;/goal&gt;
     &lt;/goals&gt;
     &lt;configuration&gt;
      &lt;executable&gt;svnversion&lt;/executable&gt;
      &lt;arguments&gt;
       &lt;argument&gt;&lt;![CDATA[ &gt;version.txt ]]&gt;&lt;/argument&gt;
      &lt;/arguments&gt;
     &lt;/configuration&gt;
    &lt;/execution&gt;
   &lt;/executions&gt;
    &lt;/plugin&gt;
  </code></pre>
  
  <p>Currently I get the following output:</p>
  
  <p><code>[INFO] [exec:exec {execution: svnversion-exec}] 'svnversion' is not recognized as an internal or external command, operable program or batch file.</code></p>
  
  <p><code>[ERROR] BUILD ERROR: Result of cmd.exe /X /C "svnversion &gt;version.txt" execution is: '1'.</code></p>
  
  <p>Thank you!</p>