title: Eclipse 'refresh automatically' and Maven build interference
body: <p>I recently configured Eclipse (ver. 3.6) in order to make it automatically refresh projects in the workspace (Windows > Preferences > General > Workspace > Refresh Automatically).</p>
  
  <p>Since I changed this configuration I have the following problem when I try to run Maven (Maven install from Eclipse) to build a big project:</p>
  
  <p>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean (default-clean) on project ProjectName: Failed to clean project: Failed to delete C:\ProjectName\target -> [Help 1]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] <a href="http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException" rel="nofollow noreferrer">http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException</a></p>
  
  <p>The problem occurs randomly (more or less 50% of the times I build a single project), but when I try to build 14 projects all together I always get this error somewhere.
  I think that the problem is that Maven is trying to delete files that are locked by Eclipse (that is refreshing the project). In fact it doesn't happen when I disable the "Refresh Automatically" option.</p>
  
  <p>Does anybody know a trick to avoid this trouble?</p>
  
  <p>I noticed there is another question "<a href="https://stackoverflow.com/questions/3983756/eclipse-automatically-refresh-resources-and-exclude-build-dir">Eclipse automatically refresh resources and exclude build dir</a>" about this topic, but there are no answers. I hope I provided enough information to understand the problem.</p>