How to pass additional classpath dependencies to testCompile phase in maven
<p>I want to compile test files using some external jar dependencies which will not be present in pom.xml's dependency tag. Is there any way through configuration. Something like this- </p>

<pre><code>&lt;plugin&gt;
  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
  &lt;configuration&gt;
    &lt;source&gt;1.5&lt;/source&gt;
    &lt;target&gt;1.5&lt;/target&gt;
  &lt;/configuration&gt;
  &lt;executions&gt;
    &lt;execution&gt;
      &lt;id&gt;test-compile&lt;/id&gt;
      &lt;configuration&gt;
        &lt;classPathElements&gt;
            &lt;classPathElement&gt;somejar.jar&lt;/classPathElement&gt;
        &lt;/classPathElements&gt;
      &lt;/configuration&gt;
    &lt;/execution&gt;

  &lt;/executions&gt;
&lt;/plugin&gt;
</code></pre>