title: Why Maven runs profile plugin even if profile is not activated
body: <p>Another Maven question. I have app with TestNG tests running by maven-surefire-plugin. I have created 2 profiles, for pdoruction and for testing. </p>
  
  <p>I'm building my app by 'mvn clean install' command. Now my goal is to run TestNG tests only when I specify test profile. </p>
  
  <p>Code: </p>
  
  <pre><code>profiles&gt;
      &lt;profile&gt;
          &lt;id&gt;prod&lt;/id&gt;
          &lt;activation&gt;
              &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
          &lt;/activation&gt;
      &lt;/profile&gt;
  
      &lt;profile&gt;
          &lt;id&gt;test&lt;/id&gt;
          &lt;build&gt;
              &lt;plugins&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                      &lt;version&gt;2.19&lt;/version&gt;
                      &lt;configuration&gt;
                          &lt;suiteXmlFiles&gt;
                              &lt;suiteXmlFile&gt;${basedir}/target/test-classes/firstTest.xml&lt;/suiteXmlFile&gt;
                          &lt;/suiteXmlFiles&gt;
                      &lt;/configuration&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/build&gt;
      &lt;/profile&gt;
  
  &lt;/profiles&gt;
  </code></pre>
  
  <p>But the problem is that tests are running everytime when I build my app... no matter if 'test' profile is specified, or not. Why?</p>