title: Maven and maven-resources-plugin
body: <p>I would like to use maven-resources-plugin to copy resource to another directory.</p>
  
  <p>My resources directory have this structure :</p>
  
  <pre><code>log4j.xml
  xml
    |_ resource-1
    |_ resource-n
  </code></pre>
  
  <p>I would like to copy only log4.xml to output directory. Here is my plugin code :</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
      &lt;version&gt;2.6&lt;/version&gt;
      &lt;configuration&gt;
          &lt;outputDirectory&gt;${glassfish.conf}&lt;/outputDirectory&gt;
              &lt;resources&gt;
                  &lt;resource&gt;
                      &lt;directory&gt;${conf.location}&lt;/directory&gt;
                      &lt;includes&gt;
                          &lt;include&gt;**/log4j.xml&lt;/include&gt;
                      &lt;/includes&gt;
                      &lt;excludes&gt;
                          &lt;exclude&gt;**/xml/*&lt;/exclude&gt;
                      &lt;/excludes&gt;
                  &lt;/resource&gt;
              &lt;/resources&gt;
          &lt;/configuration&gt;
          &lt;executions&gt;
              &lt;execution&gt;
                  &lt;id&gt;copy-log4j-to-glassfish&lt;/id&gt;
                  &lt;phase&gt;package&lt;/phase&gt;
                  &lt;goals&gt;
                      &lt;goal&gt;copy-resources&lt;/goal&gt;
                  &lt;/goals&gt;
              &lt;/execution&gt;
          &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>But all is copied to output directory (log4j.xml and xml directory).</p>
  
  <p>I tried</p>
  
  <pre><code>&lt;resource&gt;
      &lt;directory&gt;${conf.location}&lt;/directory&gt;
          &lt;excludes&gt;
              &lt;exclude&gt;**/xml/*&lt;/exclude&gt;
          &lt;/excludes&gt;
  &lt;/resource&gt;
  </code></pre>
  
  <p>Or</p>
  
  <pre><code>&lt;resource&gt;
      &lt;directory&gt;${conf.location}&lt;/directory&gt;
      &lt;includes&gt;
          &lt;include&gt;**/log4j.xml&lt;/include&gt;
      &lt;/includes&gt;                         
  &lt;/resource&gt;
  </code></pre>
  
  <p>Even</p>
  
  <pre><code>&lt;resource&gt;
      &lt;directory&gt;${conf.location}&lt;/directory&gt;
      &lt;excludes&gt;
          &lt;exclude&gt;**/*&lt;/exclude&gt;
      &lt;/excludes&gt;
  &lt;/resource&gt;
  </code></pre>
  
  <p>But all the content of directory is included...What is the problem ?</p>
  
  <p>Thank you</p>