title: Maven maven-exec-plugin multiple execution configurations
body: <p>Is it possible to invoke a maven-exec-plugin (or any other plugin's) execution by its id from the command line?</p>
  
  <p>Let's say my pom.xml file looks like this:</p>
  
  <pre><code>&lt;project&gt;
  [...]
      &lt;plugin&gt;
      &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
      &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;id&gt;foo&lt;/id&gt;
              &lt;goals&gt;
                  &lt;goal&gt;exec&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;phase&gt;&lt;/phase&gt;
              &lt;configuration&gt;
                  &lt;executable&gt;echo&lt;/executable&gt;
                  &lt;arguments&gt;
                      &lt;argument&gt;foo&lt;/argument&gt;
                  &lt;/arguments&gt;
              &lt;/configuration&gt;
          &lt;/execution&gt;
          &lt;execution&gt;
              &lt;id&gt;bar&lt;/id&gt;
              &lt;goals&gt;
                  &lt;goal&gt;exec&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;phase&gt;&lt;/phase&gt;
              &lt;configuration&gt;
                  &lt;executable&gt;echo&lt;/executable&gt;
                  &lt;arguments&gt;
                      &lt;argument&gt;bar&lt;/argument&gt;
                  &lt;/arguments&gt;
                  &lt;/configuration&gt;
              &lt;/execution&gt;
          &lt;/executions&gt;
      &lt;/plugin&gt;
  [...]
  &lt;/project&gt;
  </code></pre>
  
  <p>Now is it possible to call </p>
  
  <blockquote>
    <p>mvn exec:exec</p>
  </blockquote>
  
  <p>with some added magic to run execution "foo"?</p>
  
  <p>For the curious there is an alternative solution using profiles available here:
  <a href="http://www.mail-archive.com/user@mojo.codehaus.org/msg00151.html" rel="noreferrer">http://www.mail-archive.com/user@mojo.codehaus.org/msg00151.html</a></p>