title: Maven - Import Plugins configuration from one project to another using maven-tiles
body: <p>In order to use the same configuration of a maven plugin in many projects, I am trying to define this configuration in one core project, and then import it to the other projects.</p>
  
  <p>Basing my solution on <a href="https://stackoverflow.com/questions/11749375/import-maven-plugin-configuration-by-composition-rather-than-inheritance-can-it">this discussion</a>, I used <a href="https://github.com/repaint-io/maven-tiles" rel="nofollow noreferrer">Maven Tile Plugin</a>, and I followed the steps that were explained in the documentation.</p>
  
  <ul>
  <li><p><strong>Definition of the configuration in the core project:</strong></p>
  
  <p>1) pom.xml:</p>
  
  <pre><code>&lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;io.repaint.maven&lt;/groupId&gt;
              &lt;artifactId&gt;tiles-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.8&lt;/version&gt;
              &lt;extensions&gt;true&lt;/extensions&gt;
              &lt;configuration&gt;
                  &lt;filtering&gt;true&lt;/filtering&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>2) tile.xml:</p>
  
  <pre><code>&lt;project&gt;
    &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.10&lt;/version&gt;
              &lt;executions&gt;
                  &lt;!-- .... --&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-failsafe-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.19.1&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;integration-test&lt;/goal&gt;
                          &lt;goal&gt;verify&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;!-- .... --&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>3) Build the core project</p></li>
  <li><p><strong>Import of the configuration in the targeted project:</strong> </p></li>
  </ul>
  
  <p>In the parent POM:</p>
  
  <pre><code>    &lt;plugin&gt;
          &lt;groupId&gt;io.repaint.maven&lt;/groupId&gt;
          &lt;artifactId&gt;tiles-maven-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.8&lt;/version&gt;
          &lt;configuration&gt;
              &lt;buildSmells&gt;pluginmanagement&lt;/buildSmells&gt;
              &lt;tiles&gt;
                  &lt;tile&gt;groupId:coreProjectId:1.1.0&lt;/tile&gt;
              &lt;/tiles&gt;
          &lt;/configuration&gt;
      &lt;/plugin&gt;
  </code></pre>
  
  <p>From what I understand, the import of the core project using the tile plugin must allow the use of the configuration that was defined for the maven failsafe plugin. The problem is that the verify goal of the failsafe plugin isn't working that way (No integration Test is run with 'mvn verify') </p>
  
  <p>Any suggestion to well define the maven tile plugin, or to use any other method to reuse the core configuration would be helpful.</p>
  
  <p>Thank you for your help.</p>