How do I run the maven exec plugin multiple times in a build
<p>Below is the relevant part of my POM - </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.5.0&lt;/version&gt;
    &lt;executions&gt;
        &lt;execution&gt;
            &lt;id&gt;StartHub&lt;/id&gt;
            &lt;phase&gt;test&lt;/phase&gt;
            &lt;goals&gt;
                &lt;goal&gt;exec&lt;/goal&gt;
            &lt;/goals&gt;
            &lt;configuration&gt;
                &lt;executable&gt;java&lt;/executable&gt;
                &lt;arguments&gt;
                    &lt;argument&gt;-jar&lt;/argument&gt;
                    &lt;argument&gt;${basedir}/src/lib/Hub/selenium-server-standalone-2.53.0.jar&lt;/argument&gt;
                    &lt;argument&gt;-role&lt;/argument&gt;
                    &lt;argument&gt;hub&lt;/argument&gt;
                    &lt;argument&gt;-throwOnCapabilityNotPresent&lt;/argument&gt;
                    &lt;argument&gt;false&lt;/argument&gt;
                    &lt;argument&gt;-newSessionWaitTimeout&lt;/argument&gt;
                    &lt;argument&gt;20000&lt;/argument&gt;
                &lt;/arguments&gt;
            &lt;/configuration&gt;
        &lt;/execution&gt;
        &lt;execution&gt;
            &lt;id&gt;StartNode&lt;/id&gt;
            &lt;phase&gt;test&lt;/phase&gt;
            &lt;goals&gt;
                &lt;goal&gt;exec&lt;/goal&gt;
            &lt;/goals&gt;
            &lt;configuration&gt;
                &lt;executable&gt;java&lt;/executable&gt;
                &lt;arguments&gt;
                    &lt;argument&gt;-jar&lt;/argument&gt;
                    &lt;argument&gt;${basedir}/src/lib/Node/selenium-server-standalone-2.53.0.jar&lt;/argument&gt;
                    &lt;argument&gt;-hub&lt;/argument&gt;
                    &lt;argument&gt;http://127.0.0.1:4444/register/grid&lt;/argument&gt;
                    &lt;argument&gt;-port&lt;/argument&gt;
                    &lt;argument&gt;5555&lt;/argument&gt;
                    &lt;argument&gt;
                        Dwebdriver.chrome.driver=${basedir}/chromedriver.exe&lt;/argument&gt;
                &lt;/arguments&gt;
            &lt;/configuration&gt;
        &lt;/execution&gt;
    &lt;/executions&gt;
&lt;/plugin&gt;
</code></pre>

<p>I was trying to use the exec plugin to execute a jar(selenium standalone server) in two configurations(hub and Node).</p>

<p>My issue is that the jar is executed only once in the configuration specified between the first pair of "execution" tags. I have searched extensively for a solution and the only thing I found was that the id's for different executions need to be different, which I rectified. I still can't seem to manage to run the jars twice even though I can run any one of them successfully if I comment out the execution of the other. </p>

<p>I should also mention that I'm running the project in Eclipse, so ideally what I would want to do is right-click on the POM.xml click on Run-as and select "Maven test".</p>