title: Maven2 compiler custom execution source directory and target directory
body: <p>I want to run the maven compiler plugin in a different phase and with different sourceDirectories and destinationDirectories such that code from directories other than src/main/java and src/test/java can be used.</p>
  
  <p>I thought the solution would look something like the below, where the phase I was linking it to was pre-integration-test. However the properties for testSourceDirectory and testOutputDirectory don't seem to be specified in this way as they are in the  section of the POM.</p>
  
  <pre><code>&lt;plugin&gt;
    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
    &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
  
    &lt;executions&gt;
      &lt;execution&gt;
        &lt;id&gt;compile mytests&lt;/id&gt;
        &lt;goals&gt;
          &lt;goal&gt;testCompile&lt;/goal&gt;
        &lt;/goals&gt;
        &lt;phase&gt;pre-integration-test&lt;/phase&gt;
        &lt;configuration&gt;
          &lt;testSourceDirectory&gt;${basedir}/src/inttest/java&lt;/testSourceDirectory&gt;
          &lt;testOutputDirectory&gt;${basedir}/target/inttest-classes&lt;/testOutputDirectory&gt;
        &lt;/configuration&gt;
      &lt;/execution&gt;
    &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>Is there a way to get this plug-in to compile different directories in different phases without affecting its default operation?</p>