title: How do I invoke two different profiles in one maven command?
body: <p>I have two profiles for different environments in <code>pom.xml</code>, I have to run <code>mvn -PTest1 install</code> and <code>mvn -PTest2 install</code> command to get these profiles in use. Can we integrate two separate maven commands in a single one (like <code>mvn clean install</code>)?</p>
  
  <p>Here is my Pom entry</p>
  
  <pre><code>&lt;profiles&gt;
    &lt;profile&gt;
    &lt;id&gt;Test1&lt;/id&gt;
    &lt;activation&gt;
      &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
      &lt;jdk&gt;1.5&lt;/jdk&gt;
      &lt;os&gt;
         &lt;name&gt;Windows XP&lt;/name&gt;
         &lt;family&gt;Windows&lt;/family&gt;
         &lt;arch&gt;x86&lt;/arch&gt;
         &lt;version&gt;5.1.2600&lt;/version&gt;
      &lt;/os&gt;
      &lt;property&gt;
         &lt;name&gt;sparrow-type&lt;/name&gt;
         &lt;value&gt;African&lt;/value&gt;
      &lt;/property&gt;
    &lt;/activation&gt;
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;
        com.endeca
        &lt;/groupId&gt;
        &lt;artifactId&gt;
        endeca_navigation_Test1
        &lt;/artifactId&gt;
       &lt;version&gt;
       6.1
       &lt;/version&gt;
       &lt;!--&lt;version&gt;stable&lt;/version&gt; --&gt;
      &lt;scope&gt;
      compile
      &lt;/scope&gt;
    &lt;/dependency&gt;
    &lt;/profile&gt;
  
    &lt;profile&gt;
      &lt;id&gt;Test2&lt;/id&gt;
      &lt;activation&gt;
        &lt;activeByDefault&gt;false&lt;/activeByDefault&gt;
        &lt;jdk&gt;1.5&lt;/jdk&gt;
        &lt;os&gt;
          &lt;name&gt;Windows XP&lt;/name&gt;
          &lt;family&gt;Windows&lt;/family&gt;
          &lt;arch&gt;x86&lt;/arch&gt;
          &lt;version&gt;5.1.2600&lt;/version&gt;
        &lt;/os&gt;
        &lt;property&gt;
          &lt;name&gt;sparrow-type&lt;/name&gt;
          &lt;value&gt;African&lt;/value&gt;
        &lt;/property&gt;
      &lt;/activation&gt;
      &lt;dependencies&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;
          com.endeca
          &lt;/groupId&gt;
          &lt;artifactId&gt;
          endeca_navigation_Test2
          &lt;/artifactId&gt;
          &lt;version&gt;
          6.1
          &lt;/version&gt;
          &lt;!--&lt;version&gt;stable&lt;/version&gt; --&gt;
          &lt;scope&gt;
          compile
          &lt;/scope&gt;
        &lt;/dependency&gt;
      &lt;/dependencies&gt;
    &lt;/profile&gt;
  &lt;/profiles&gt;
  </code></pre>
  
  <p>It will helpfull to manage hudson job using single command</p>