title: How to solve problem with out of synchronization of J2EE module dependency in Eclipse?
body: <p>I have two projects : <strong>my-lib</strong> and <strong>my-web</strong>.</p>
  
  <p><strong>my-lib</strong> is built using the Java compiler of Eclipse, and a short Ant task is run on some properties files, which are then modified (as explained <a href="https://stackoverflow.com/questions/1238183/how-to-filter-ressources-during-build-in-eclipse-project">here</a>).
  This is not a pretty solution, but it works.</p>
  
  <p>Now, as <strong>my-web</strong> is dependent of <strong>my-lib</strong>, I define <strong>my-lib</strong> as a <em>Java EE Module Dependency</em> of <strong>my-web</strong>.
  However, when I attach <strong>my-web</strong> to the Tomcat in Eclipse, and try to publish, I get the following exception:</p>
  
  <pre><code>'Publishing to Tomcat at localhost' has encountered a problem.
  Resource is out of sync with the file system: '/my-lib/target/classes/my-app.properties'
  </code></pre>
  
  <p>This file is indeed one of the files modified by the Ant task.</p>
  
  <p>How can I correct this problem, as I need to have the Ant task run on the my-lib.</p>