title: Run Maven goal for only one module in multi module project
body: <p>I have a project which has 4 modules. That said, I have a parent project with a parent POM.xml specifying theses modules.</p>
  
  <pre><code>&lt;modules&gt;
          &lt;module&gt;Module1-Desktop&lt;/module&gt;
          &lt;module&gt;Module2-Core&lt;/module&gt;
          &lt;module&gt;Module3-Web&lt;/module&gt;
          &lt;module&gt;Module4-EAR&lt;/module&gt;
  &lt;/modules&gt;
  </code></pre>
  
  <p>The <strong>Module4-EAR</strong> has <strong>Module3-Web</strong> and <strong>Module2-Core</strong> as dependencies (not as modules) and generates an EAR to be deployed to JBoss.</p>
  
  <p>I want to be able to build the <strong>Module4-EAR</strong>, but building <strong>Module3-Web</strong> and <strong>Module2-Core</strong> before it, so it is up-to-date and also deploy it to JBoss. So I'm running the following Maven command in the parent project:</p>
  
  <pre><code>mvn --projects Module2-Core,Module3-Web,Module4-EAR clean install jboss:hard-undeploy jboss:hard-deploy
  </code></pre>
  
  <p>In the parent POM I've set the jboss-maven-plugin like this:</p>
  
  <pre><code>&lt;plugin&gt;
                  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                  &lt;artifactId&gt;jboss-maven-plugin&lt;/artifactId&gt;             
                  &lt;configuration&gt;
                      &lt;skip&gt;true&lt;/skip&gt;                   
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  </code></pre>
  
  <p>In the Module4-EAR's pom.xml I've set the jboss-maven-plugin this way:</p>
  
  <pre><code>&lt;plugin&gt;
                          &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                          &lt;artifactId&gt;jboss-maven-plugin&lt;/artifactId&gt;
                          &lt;configuration&gt;
                              &lt;skip&gt;false&lt;/skip&gt;
                              &lt;jbossHome&gt;${env.JBOSS_HOME}&lt;/jbossHome&gt;
                              &lt;serverName&gt;default&lt;/serverName&gt;
                              &lt;unpack&gt;true&lt;/unpack&gt;
                              &lt;fileNames&gt;
                                  &lt;fileName&gt;build/Module4-EAR.ear&lt;/fileName&gt;
                              &lt;/fileNames&gt;                            
                          &lt;/configuration&gt;
                      &lt;/plugin&gt;
  </code></pre>
  
  <p>The problem is that I want only the <strong>Module4-EAR.ear</strong> to be deployed with to the server, but the <strong>Module3-Web.war</strong> and <strong>Module2-Core</strong> are deployed as well. I want to do it in a single command, instead of running 2 mvn commands, one to "clean install" the projects and another to deploy only the EAR. How can I achieve that?</p>