title: Maven compiler plugin always detecting a set of sources as "stale"
body: <p>FIXED: this is a <a href="https://issues.apache.org/jira/browse/MCOMPILER-209" rel="noreferrer">known bug</a> in maven-compiler-plugin 3.1</p>
  
  <p>I am converting an ant-based build of a 1000+ java-sources project to maven. So far so good, but every time launch <code>mvn compile</code> it recompiles everything (instead of reusing old classes)</p>
  
  <p>Using <code>mvn -X compile</code> reports that</p>
  
  <pre><code>[DEBUG] Stale source detected: /project_path/src/main/java/package_path/AFile1.java
  [DEBUG] Stale source detected: /project_path/src/main/java/package_path/AFile2.java
  ...
  </code></pre>
  
  <p>(<strong>only for files in a certain package</strong>, which is possibly unreferenced from the rest of the code; not my sources, I am just trying to mavenize the build)</p>
  
  <p>Compilation does not fail, and classes with updated timestamps are being generated at</p>
  
  <pre><code>/project_path/target/classes/package_path/AFile1.class
  /project_path/target/classes/package_path/AFile2.class
  ...
  </code></pre>
  
  <p>However, when looking at timestamps, the java files have not changed since yesterday, and the class files are current. Why are these sources determined to be stale? How can I debug this issue?.</p>
  
  <p>It is a drag to have to recompile 1k+ files even when no changes have occurred...</p>
  
  <hr>
  
  <p>Sample output:</p>
  
  <pre><code>$ mvn clean compile
  [INFO] Scanning for projects...
  [INFO]                                                                         
  [INFO] ------------------------------------------------------------------------
  [INFO] Building MyProject 1.9.0-SNAPSHOT
  [INFO] ------------------------------------------------------------------------
  [WARNING] The POM for net.sourceforge:jffmpeg:jar:1.1.0 is missing, no dependency information available
  [INFO] 
  [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ my-project ---
  [INFO] Deleting /project_path/target
  [INFO] 
  [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ my-project ---
  [debug] execute contextualize
  [INFO] Using 'UTF-8' encoding to copy filtered resources.
  [INFO] skip non existing resourceDirectory /project_path/src/main/resources
  [INFO] 
  [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ my-project ---
  [INFO] Changes detected - recompiling the module!
  [INFO] Compiling 1162 source files to project_path/target/classes
  ....
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD SUCCESS
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 11.215s
  [INFO] Finished at: Tue Jul 30 12:42:25 CEST 2013
  [INFO] Final Memory: 25M/429M
  [INFO] ------------------------------------------------------------------------
  
  
  
  $ mvn compile
  [INFO] Scanning for projects...
  [INFO]                                                                         
  [INFO] ------------------------------------------------------------------------
  [INFO] Building MyProject 1.9.0-SNAPSHOT
  [INFO] ------------------------------------------------------------------------
  [WARNING] The POM for net.sourceforge:jffmpeg:jar:1.1.0 is missing, no dependency information available
  [INFO] 
  [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ my-project ---
  [debug] execute contextualize
  [INFO] Using 'UTF-8' encoding to copy filtered resources.
  [INFO] skip non existing resourceDirectory /project_path/src/main/resources
  [INFO] 
  [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ my-project ---
  [INFO] Changes detected - recompiling the module!
  [INFO] Compiling 1162 source files to /project_path/target/classes
  ... 
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD SUCCESS
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 12.140s
  [INFO] Finished at: Tue Jul 30 12:42:44 CEST 2013
  [INFO] Final Memory: 22M/379M
  [INFO] ------------------------------------------------------------------------
  </code></pre>