title: Maven pom.xml - build modules + self build
body: <p>I have the next project structure:</p>
  
  <pre><code>app
  module1
  module2
  ...
  moduleN
  parent-pom
  </code></pre>
  
  <p>Project <code>app</code> contains only properties files and <em>JasperReports</em>'s reports templates. Pom.xml of app:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&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;parent&gt;
      &lt;groupId&gt;my-group&lt;/groupId&gt;
      &lt;artifactId&gt;parent-pom&lt;/artifactId&gt;
      &lt;version&gt;1.0.0&lt;/version&gt;
      &lt;relativePath&gt;../parent-pom&lt;/relativePath&gt;
  &lt;/parent&gt;
  
  &lt;artifactId&gt;app&lt;/artifactId&gt;
  &lt;version&gt;${app-version}&lt;/version&gt;
  &lt;packaging&gt;pom&lt;/packaging&gt;
  &lt;modules&gt;
      &lt;module&gt;../module1&lt;/module&gt;
      &lt;module&gt;../module2&lt;/module&gt;
      ...
      &lt;module&gt;../moduleN&lt;/module&gt;
  &lt;/modules&gt;
  </code></pre>
  
  <p></p>
  
  <p>I want to add <strong><em>jasperreports-maven-plugin</em></strong> for project app. I've tried next code (before <code>&lt;modules&gt;</code> section), but it doesn't work (self build wasn't called):</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
              &lt;artifactId&gt;jasperreports-maven-plugin&lt;/artifactId&gt;
              &lt;configuration&gt;
                  &lt;sourceDirectory&gt;${basedir}/config/templates&lt;/sourceDirectory&gt;
                  &lt;outputDirectory&gt;${basedir}/config/templates&lt;/outputDirectory&gt;
              &lt;/configuration&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;compile-reports&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
              &lt;dependencies&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;net.sf.jasperreports&lt;/groupId&gt;
                      &lt;artifactId&gt;jasperreports&lt;/artifactId&gt;
                      &lt;version&gt;${jasperreports.version}&lt;/version&gt;
                  &lt;/dependency&gt;
              &lt;/dependencies&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>Is it possible to add self build to pom with modules?</p>