title: Custom properties in Maven based on command line switch
body: <p><em>[reduced for simplicity]</em></p>
  
  <p><li>I have a project with several Maven modules</li>
  <li>A module has a properties files whose contents are filtered during build</li>
  <li>There are sets of properties that can be grouped</li>
  <li>Only one group of properties exists in a given build</li>
  <li>All groups have the same properties, only their values change between groups</li></p>
  
  <pre><code>parent
  +- pom.xml
  +- foo
     +- src/main/resources/test.properties
  </code></pre>
  
  <p>I have set profiles in parent <code>pom.xml</code>. Each profile is activated by a command line argument and sets the values for the properties on that group.</p>
  
  <pre><code>mvn clean compile -Dgroup1=true
  </code></pre>
  
  <p>The problem is that I have to duplicate the entire profile between groups. I would like to only define the <code>&lt;properties&gt;</code> for each of the groups and use a single profile to control build order, plugins and other stuff.</p>
  
  <p>Anyone knows if that can be done?</p>