title: Maven exec plugin- how to include "system" classpath?
body: <p>I have a project that uses "system" scope to specify a jar file included in my project's <code>WEB-INF/lib</code> dir. This artifact is not in any of the maven repositories, so I must include it as part of my project.  I do so with the following:</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;com.example&lt;/groupId&gt;
          &lt;artifactId&gt;MySpecialLib&lt;/artifactId&gt;
          &lt;version&gt;1.2&lt;/version&gt;
          &lt;scope&gt;system&lt;/scope&gt;
          &lt;systemPath&gt;${basedir}/src/main/webapp/WEB-INF/lib/MySpecialLib-1.2.jar&lt;/systemPath&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>This has worked great for most things. </p>
  
  <p>But now I'm trying to run some code on the command line (outside of my webapp, via a <code>main()</code> method I have added) and <code>mvn exec:java</code> can't resolve code in MySpecialLib because it's not included in the "runtime" classpath.</p>
  
  <p>How can I either: </p>
  
  <ul>
  <li>add MySpecialLib to the runtime classpath</li>
  </ul>
  
  <p>or </p>
  
  <ul>
  <li>tell <code>mvn exec:java</code> to also use the <code>system</code> classpath ?</li>
  </ul>
  
  <p>I've tried <code>mvn exec:java -Dexec.classpathScope=system</code>, but that leaves off everything that's on <code>runtime</code>.</p>