title: Adding src/test/resources to classpath when using maven exec:java
body: <p>I am trying to execute some code that it is going to generate a test class (and be placed in src/test/java) which needs access to the src/test/resources folder. I am using maven exec:java (tried exec:exec) as well but with no luck.</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;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;Generate Derivation Test Cases Test&lt;/id&gt;
                      &lt;phase&gt;generate-test-sources&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;java&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;classpathScope&gt;test&lt;/classpathScope&gt;
                          &lt;mainClass&gt;com.etse.persistence.derivationtestcase.TestGenerator&lt;/mainClass&gt;
                          &lt;arguments&gt;
                              &lt;argument&gt;derivationTestCases&lt;/argument&gt;
                              &lt;argument&gt;/common-application-context.xml&lt;/argument&gt;
                              &lt;argument&gt;/persistence-application-context.xml&lt;/argument&gt;
                              &lt;argument&gt;/math-application-context.xml&lt;/argument&gt;
                              &lt;argument&gt;/persistence-derivationtestcase-context.xml&lt;/argument&gt;
                          &lt;/arguments&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>My question here is how/where do I place the {basedir}/src/test/resources so it is used in the classpath for the call to TestGenerator</p>
  
  <p>Thanks</p>
  
  <p>Juan</p>