title: maven can't add files in generated-sources for compilation phase
body: <p>I use <a href="http://thrift.apache.org/" rel="noreferrer">Apache Thrift</a> to generate code in <code>target/generated-sources</code>. </p>
  
  <p>The Thrift compiler produces a directory named <code>gen-java</code> which contains all the Java code. When I execute <code>mvn compile</code>, the code is generated correctly in <code>target/generated-source/gen-java</code>, but in compilation phase, it complains can't find the classes which defined in <code>gen-java</code>. </p>
  
  <p>In my understanding, Maven 2 automatically adds generated sources, is that right?</p>
  
  <p>And what if my testing code also depends on the <code>generated-sources</code>, do I have to manually specified the compiler includes?</p>