title: Maven ear plugin - "doubled" artifact when not using clean
body: <p>When building an ear through the Maven ear plugin, I experienced that applying <code>package</code> without <code>clean</code> can lead to inconsistent results: If I change the version of a dependency, the dependency now appears twice in the ear, in the old and the new version. If I build the ear without version numbers in the jar names, I get just one jar, but old versions are not replaced properly.</p>
  
  <p>I looked at the source code </p>
  
  <p><a href="http://svn.apache.org/viewvc/maven/plugins/tags/maven-ear-plugin-2.10.1/src/main/java/org/apache/maven/plugin/ear/EarMojo.java?view=markup" rel="noreferrer">http://svn.apache.org/viewvc/maven/plugins/tags/maven-ear-plugin-2.10.1/src/main/java/org/apache/maven/plugin/ear/EarMojo.java?view=markup</a></p>
  
  <p>Especially the lines from 436 are interesting: There checks whether to update files in target, but apparently only checks for the absolute path and the lastmodified date.</p>
  
  <p>Summarized: Am I right that changing the dependencies (or their versions) always requires to call <code>clean</code> before the build? Or is there some intelligence in <code>package</code> which I missed?</p>