title: build-helper-maven-plugin add-test-resource error
body: <p>I have this project structure:</p>
  
  <pre><code>/src
      /main
          /java
          /resources
      /test 
          /java
          /resources
      /it
          /java
          /resources
  </code></pre>
  
  <p><code>test</code> for unit tests and <code>it</code> for integration tests. I'm using <a href="http://mojo.codehaus.org/build-helper-maven-plugin/" rel="noreferrer">build-helper-maven-plugin</a> to add additional test sources/resources to the classpath for later use <a href="http://maven.apache.org/surefire/maven-surefire-plugin/" rel="noreferrer">maven-surfire-plugin</a> for run
  <code>unit tests</code> and <a href="http://maven.apache.org/surefire/maven-failsafe-plugin/" rel="noreferrer">maven-failsafe-plugin</a> for <code>integration tests</code>.</p>
  
  <p>Plugin config as belows:</p>
  
  <pre><code>&lt;plugin&gt;                                                         
     &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;                          
     &lt;artifactId&gt;build-helper-maven-plugin&lt;/artifactId&gt;      
     &lt;version&gt;1.9.1&lt;/version&gt;      
     &lt;executions&gt;                                                  
        &lt;execution&gt;                                                
           &lt;id&gt;add-integration-test-sources&lt;/id&gt;                   
           &lt;phase&gt;generate-test-sources&lt;/phase&gt;                    
           &lt;goals&gt;                                                 
              &lt;goal&gt;add-test-source&lt;/goal&gt;                         
           &lt;/goals&gt;                                                
           &lt;configuration&gt;                                         
              &lt;sources&gt;                                            
                 &lt;source&gt;src/it/java&lt;/source&gt;                      
              &lt;/sources&gt;                                           
           &lt;/configuration&gt;                                        
        &lt;/execution&gt;                                               
        &lt;execution&gt;                                                
           &lt;id&gt;add-integration-test-resources&lt;/id&gt;                 
           &lt;phase&gt;generate-test-resources&lt;/phase&gt;                  
           &lt;goals&gt;                                                 
              &lt;goal&gt;add-test-resource&lt;/goal&gt;                       
           &lt;/goals&gt;                                                
           &lt;configuration&gt;                                         
              &lt;resources&gt;                                          
                 &lt;directory&gt;/src/it/resources&lt;/directory&gt;
              &lt;/resources&gt;                                         
           &lt;/configuration&gt;                                        
        &lt;/execution&gt;                                               
     &lt;/executions&gt;                                                 
  &lt;/plugin&gt;       
  </code></pre>
  
  <p>This works fine for the <code>test-sources</code> (they are coppied correctly to /target/test-classes) but doesn't copy <strong>test-resources</strong>. I've tried different combinations of <code>&lt;configuration&gt;</code>: use <code>&lt;resource&gt;</code> instead <code>&lt;directory&gt;</code>, use an specific file instead a directory...but neither works.</p>
  
  <p>Stacktrace with the error:</p>
  
  <pre><code>Caused by: org.apache.maven.plugin.PluginConfigurationException: Unable to parse configuration of mojo org.codehaus.mojo:build-helper-maven-plugin:1.9.1:add-test-resource for parameter directory: Cannot configure instance of org.apache.maven.model.Resource from src/it/resources
          at org.apache.maven.plugin.internal.DefaultMavenPluginManager.populatePluginFields(DefaultMavenPluginManager.java:597)
          at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:529)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:92)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
  </code></pre>
  
  <p><em>PROVISIONALLY</em>, I've fixed it adding the integration tests resources to maven <code>&lt;build&gt;</code> configuration:</p>
  
  <pre><code>&lt;build&gt;
  ...
      &lt;testResources&gt;                               
         &lt;testResource&gt;                             
            &lt;directory&gt;src/it/resources&lt;/directory&gt; 
         &lt;/testResource&gt;                            
      &lt;/testResources&gt;    
  &lt;/build&gt;
  </code></pre>
  
  <p>But I would prefer to have centralized all classpath modifications under <code>build-helper-maven-plugin</code>.
  Can anyone post example with a correct config?</p>
  
  <p>Thanks in advance.</p>