title: Detecting duplicate resources in a single maven project
body: <p>The <a href="https://github.com/ning/maven-duplicate-finder-plugin" rel="nofollow">maven duplicate finder plugin</a> looks like a great way to detect when the same resource exists in more than one module.  What I need is something much simpler: detection of the same resource in the <em>same</em> module.</p>
  
  <p>(<b>Update:</b> filed <a href="https://github.com/ning/maven-duplicate-finder-plugin/issues/16" rel="nofollow">an issue</a> against the maven duplicate finder plugin to see if it's expected to detect this situation or not.)</p>
  
  <p>Here is a demonstration of the maven duplicate finder plugin failing to detect the sort of situation that I'm concerned with:</p>
  
  <pre><code>$ cat pom.xml
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                        http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
    &lt;groupId&gt;com.stackoverflow.mattmchenry&lt;/groupId&gt;
    &lt;artifactId&gt;mvn-dups&lt;/artifactId&gt;
    &lt;version&gt;1.0&lt;/version&gt;
  
    &lt;build&gt;
      &lt;resources&gt;
        &lt;resource&gt;
          &lt;directory&gt;src/main/resources&lt;/directory&gt;
        &lt;/resource&gt;
        &lt;resource&gt;
          &lt;directory&gt;src/main/resources_es&lt;/directory&gt;
        &lt;/resource&gt;
      &lt;/resources&gt;
    &lt;/build&gt;
  &lt;/project&gt;
  
  $ find src/ -type f
  src/main/resources/Strings_es.properties
  src/main/resources/Strings.properties
  src/main/resources_es/Strings_es.properties    
  
  $ mvn com.ning.maven.plugins:maven-duplicate-finder-plugin:1.0.2:check[INFO] Scanning for projects...
  [INFO] ------------------------------------------------------------------------
  [INFO] Building Unnamed - com.stackoverflow.mattmchenry:mvn-dups:jar:1.0
  [INFO]    task-segment: [com.ning.maven.plugins:maven-duplicate-finder-plugin:1.0.2:check]
  [INFO] ------------------------------------------------------------------------
  [INFO] [duplicate-finder:check {execution: default-cli}]
  [INFO] Checking compile classpath
  [INFO] Checking runtime classpath
  [INFO] Checking test classpath
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD SUCCESSFUL
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 1 second
  [INFO] Finished at: Thu Nov 22 22:44:40 EST 2012
  [INFO] Final Memory: 7M/88M
  [INFO] ------------------------------------------------------------------------
  </code></pre>