title: Maven project with java and groovy source folders, how to denote in POM
body: <p>I found this in one of my poms to change the test directory for Groovy.</p>
  
  <pre><code>&lt;build&gt;
      &lt;testSourceDirectory&gt;${project.basedir}/src/test/groovy&lt;/testSourceDirectory&gt;
      ...
  &lt;/build&gt;
  </code></pre>
  
  <p>The problem is that there is both Java and Groovy classes in <code>src/main/</code> (<code>src/main/java</code> and <code>src/main/groovy</code> respectively). Otherwise I'd do the same for <code>src/test/groovy</code>.</p>
  
  <p>What is the proper way to include <code>src/main/groovy</code> while also including <code>src/main/java</code> so that when I import this with m2e I don't need to manually add <code>src/main/groovy</code> as a source folder?</p>
  
  <p>I ask because even though I have the dependency in the pom and the other project in Eclipse's build path, Eclipse can't find a class from this project unless I manually add the jar as an external dependency.</p>