title: Maven frontend build runs twice for generate-sources phase
body: <p>My POM file has plugins that build the front end builds. However, when we run <code>mvn clean install</code> it runs the front end <code>grunt</code>/<code>npm exec</code> twice. How do I avoid multiple executions?</p>
  
  <p>All help is appreciated. Since the grunt build takes time, removing the duplicate runs will shorten the build time.</p>
  
  <pre><code>    &lt;plugin&gt;
          &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
          &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
          &lt;version&gt;1.4.0&lt;/version&gt;
          &lt;executions&gt;
              &lt;execution&gt;
                  &lt;id&gt;exec-npm-install&lt;/id&gt;
                  &lt;phase&gt;generate-sources&lt;/phase&gt;
                  &lt;configuration&gt;
                      &lt;executable&gt;npm&lt;/executable&gt;
                      &lt;arguments&gt;
                          &lt;argument&gt;install&lt;/argument&gt;
                      &lt;/arguments&gt;
                      &lt;workingDirectory&gt;src/main/raw_ui&lt;/workingDirectory&gt;
                  &lt;/configuration&gt;
                  &lt;goals&gt;
                      &lt;goal&gt;exec&lt;/goal&gt;
                  &lt;/goals&gt;
              &lt;/execution&gt;
              &lt;execution&gt;
                  &lt;id&gt;exec-bower-install&lt;/id&gt;
                  &lt;phase&gt;generate-sources&lt;/phase&gt;
                  &lt;configuration&gt;
                      &lt;executable&gt;bower&lt;/executable&gt;
                      &lt;arguments&gt;
                          &lt;argument&gt;install&lt;/argument&gt;
                      &lt;/arguments&gt;
                      &lt;workingDirectory&gt;src/main/raw_ui&lt;/workingDirectory&gt;
                  &lt;/configuration&gt;
                  &lt;goals&gt;
                      &lt;goal&gt;exec&lt;/goal&gt;
                  &lt;/goals&gt;
              &lt;/execution&gt;
              &lt;execution&gt;
                  &lt;id&gt;exec-grunt&lt;/id&gt;
                  &lt;phase&gt;generate-sources&lt;/phase&gt;
                  &lt;configuration&gt;
                      &lt;executable&gt;grunt&lt;/executable&gt;
                      &lt;arguments&gt;
                          &lt;argument&gt;build&lt;/argument&gt;
                          &lt;argument&gt;-f&lt;/argument&gt;
                      &lt;/arguments&gt;
                      &lt;workingDirectory&gt;src/main/raw_ui&lt;/workingDirectory&gt;
                  &lt;/configuration&gt;
                  &lt;goals&gt;
                      &lt;goal&gt;exec&lt;/goal&gt;
                  &lt;/goals&gt;
              &lt;/execution&gt;
          &lt;/executions&gt;
      &lt;/plugin&gt;
  </code></pre>