title: When executing proguard-maven-plugin, "CreateProcess error=206, The filename or extension is too long" occurs
body: <p>We are developing our own Eclipse plugin jars used by our Eclipse-based application. We are currently using <code>proguard-maven-plugin</code> version 2.0.8 to obfuscate them. However, when running <code>mvn install</code> on some plugins, we are currently encountering the following error:</p>
  
  <pre><code>[INFO] ---------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ---------------------------------------------------------------------
  [INFO] Total time: 1:34.297s
  [INFO] Finished at: Tue Apr 21 16:03:51 SGT 2015
  [INFO] Final Memory: 88M/210M
  [INFO] ---------------------------------------------------------------------
  [ERROR] Failed to execute goal com.github.wvengen:proguard-maven-plugin:2.0.8:proguard (default) on project com.x.y: Execution default of goal com.github.wvengen:proguard-maven-plugin:2.0.8:proguard failed: java.io.IOException: Cannot run program "C:\Program Files (x86)\Java\jdk1.7.0_55\jre\bin\java.exe": CreateProcess error=206, The filename or extension is too long -&gt; [Help 1]
  </code></pre>
  
  <p>Has anyone ever encountered this? If so, how did you solve the problem?</p>
  
  <p>Note that I have actually seen <a href="https://stackoverflow.com/questions/10519558/createprocess-error-206-the-filename-or-extension-is-too-long-when-running-main">this question</a> and other related questions before deciding to ask but the answer by Brad Mace is not applicable to my case as the "CreateProcess error=206, The filename or extension is too long" is generated by Proguard and not by Javadoc. Initially, I think (correct me if I'm wrong) that either 1 of the 7 options given by espinchi or a variation of them might work but I'm not sure which one. Just to let you know my constraints in determining the solution:</p>
  
  <ol>
  <li>I'm not sure if all of the classpaths in this particular plugin are
  valid since this has been developed by someone else many, many years
  ago so I don't think I can still contact the developer. This makes
  me hesitant to reduce the classpaths for fear that it might actually
  do more harm than good.</li>
  <li>I cannot use the switch to "use IntelliJ" option since this problem occurred on the Windows command line when doing mvn install
  and not in Eclipse IDE.</li>
  <li>I think the other options are too tedious for me. I'm hoping there's a simpler solution.</li>
  </ol>
  
  <p>For reference, below is the Proguard-related snippet from my pom file:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;com.github.wvengen&lt;/groupId&gt;
              &lt;artifactId&gt;proguard-maven-plugin&lt;/artifactId&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;package&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;proguard&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
              &lt;configuration&gt;
                  &lt;maxMemory&gt;1024m&lt;/maxMemory&gt;
                  &lt;proguardInclude&gt;${basedir}/proguard.conf&lt;/proguardInclude&gt;
                  &lt;libs&gt;
                      &lt;lib&gt;${java.home}/lib/rt.jar&lt;/lib&gt;
                  &lt;/libs&gt;
                  &lt;exclusions&gt;
                      &lt;exclusion&gt;
                          &lt;groupId&gt;com.company.package&lt;/groupId&gt;
                      &lt;/exclusion&gt;
                  &lt;/exclusions&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>