title: Maven profile not activated, though property has correct value
body: <p>I am trying to set-up conditional plugin execution via profiles. The idea is to have a compress/no compress HTML files:</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;net&lt;/groupId&gt;
      &lt;artifactId&gt;mavenconditionalexecution&lt;/artifactId&gt;
      &lt;version&gt;1.0.0&lt;/version&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
  
      &lt;name&gt;Maven Conditional Execution&lt;/name&gt;
  
      &lt;properties&gt;
          &lt;DoCompress&gt;true&lt;/DoCompress&gt;
      &lt;/properties&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
  
              &lt;!-- Clean-up --&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt;
                  &lt;version&gt;1.6&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;phase&gt;clean&lt;/phase&gt;
                          &lt;configuration&gt;
                              &lt;target&gt;
                                  &lt;echo message="DoCompress: ${DoCompress}"/&gt;
                                  &lt;delete includeemptydirs="true"&gt;
                                      &lt;fileset dir="${basedir}/src/main/webapp/result/" includes="**/*"/&gt;
                                  &lt;/delete&gt;
                              &lt;/target&gt;
                          &lt;/configuration&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;run&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
  
          &lt;resources&gt;
            &lt;resource&gt;
              &lt;directory&gt;${basedir}/src/main/webapp/html&lt;/directory&gt;
            &lt;/resource&gt;
          &lt;/resources&gt;
  
      &lt;/build&gt;
  
      &lt;profiles&gt;
  
          &lt;profile&gt;
              &lt;id&gt;With Compression&lt;/id&gt;
              &lt;activation&gt;
                  &lt;property&gt;
                      &lt;name&gt;DoCompress&lt;/name&gt;
                      &lt;value&gt;true&lt;/value&gt;
                  &lt;/property&gt;
              &lt;/activation&gt;
              &lt;build&gt;
                  &lt;plugins&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;com.tunyk.mvn.plugins.htmlcompressor&lt;/groupId&gt;
                          &lt;artifactId&gt;htmlcompressor-maven-plugin&lt;/artifactId&gt;
                          &lt;version&gt;1.2&lt;/version&gt;
                          &lt;executions&gt;
                              &lt;execution&gt;
                                  &lt;phase&gt;process-resources&lt;/phase&gt;
                                  &lt;goals&gt;
                                      &lt;goal&gt;html&lt;/goal&gt;
                                  &lt;/goals&gt;
                              &lt;/execution&gt;
                          &lt;/executions&gt;
                          &lt;configuration&gt;
                              &lt;goalPrefix&gt;htmlcompressor&lt;/goalPrefix&gt;
                              &lt;srcFolder&gt;${basedir}/src/main/webapp/html&lt;/srcFolder&gt;
                              &lt;targetFolder&gt;${basedir}/src/main/webapp/result/html&lt;/targetFolder&gt;
                              &lt;removeIntertagSpaces&gt;true&lt;/removeIntertagSpaces&gt;
                          &lt;/configuration&gt;
                      &lt;/plugin&gt;
                  &lt;/plugins&gt;
              &lt;/build&gt;
          &lt;/profile&gt;
  
          &lt;profile&gt;
              &lt;id&gt;Without Compression&lt;/id&gt;
              &lt;activation&gt;
                  &lt;property&gt;
                      &lt;name&gt;DoCompress&lt;/name&gt;
                      &lt;value&gt;false&lt;/value&gt;
                  &lt;/property&gt;
              &lt;/activation&gt;
              &lt;build&gt;
                  &lt;plugins&gt;
                      &lt;plugin&gt;
                          &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt;
                          &lt;version&gt;1.6&lt;/version&gt;
                          &lt;executions&gt;
                              &lt;execution&gt;
                                  &lt;phase&gt;process-resources&lt;/phase&gt;
                                  &lt;configuration&gt;
                                      &lt;target&gt;
                                          &lt;echo message="Copying file"/&gt;
                                          &lt;copy todir="${basedir}/src/main/webapp/result/"&gt;
                                              &lt;fileset dir="${basedir}/src/main/webapp/html/" &gt;
                                                  &lt;include name="angle.html"/&gt;
                                              &lt;/fileset&gt;
                                          &lt;/copy&gt;
                                      &lt;/target&gt;
                                  &lt;/configuration&gt;
                                  &lt;goals&gt;
                                      &lt;goal&gt;run&lt;/goal&gt;
                                  &lt;/goals&gt;
                              &lt;/execution&gt;
                          &lt;/executions&gt;
                      &lt;/plugin&gt;
                  &lt;/plugins&gt;
              &lt;/build&gt;
  
          &lt;/profile&gt;
  
      &lt;/profiles&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.tunyk.mvn.plugins.htmlcompressor&lt;/groupId&gt;
              &lt;artifactId&gt;htmlcompressor-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.2&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>It does not matter what value I assign to the <code>DoCompress</code> property, the corresponding profile are not executed. I check the value of the property with an <code>echo</code>. Why? What am I doing wrong?</p>
  
  <p>Is it allowed to activate multiple profiles in a <code>pom.xml</code> using property values?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I have created an incident: I have created an incident: <a href="https://jira.codehaus.org/browse/MNG-5235" rel="nofollow">https://jira.codehaus.org/browse/MNG-5235</a>.</p>
  
  <p>If anyone has an operational example of maven profile activation by properties, I am interested. Moreover, does anyone know whether multiple profiles can be activated in the same run via properties? The documentation is not clear about it.</p>