title: Is it possible in Maven to have more than one profile active at the same time, by default?
body: <p>I have the following profile setup in Maven:</p>
  
  <pre><code>&lt;profiles&gt;
      &lt;profile&gt;
          &lt;id&gt;prod&lt;/id&gt;
          &lt;properties&gt;
              &lt;environment&gt;prod&lt;/environment&gt;
              &lt;serverAddress&gt;https://example.com/v1&lt;/serverAddress&gt;
              &lt;pubNubSubscribeKey&gt;blah-blah&lt;/pubNubSubscribeKey&gt;
              &lt;sentryDsn&gt;https://username:password@sentry.io/id&lt;/sentryDsn&gt;
          &lt;/properties&gt;
      &lt;/profile&gt;
      &lt;profile&gt;
          &lt;id&gt;dev&lt;/id&gt;
          &lt;activation&gt;
              &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
          &lt;/activation&gt;
          &lt;properties&gt;
              &lt;environment&gt;dev&lt;/environment&gt;
              &lt;serverAddress&gt;http://localhost:8080/v1&lt;/serverAddress&gt;
              &lt;pubNubSubscribeKey&gt;blah blah&lt;/pubNubSubscribeKey&gt;
              &lt;sentryDsn/&gt;
          &lt;/properties&gt;
      &lt;/profile&gt;
      &lt;profile&gt;
          &lt;id&gt;win32&lt;/id&gt;
          &lt;activation&gt;
              &lt;os&gt;
                  &lt;family&gt;Windows&lt;/family&gt;
                  &lt;arch&gt;x86&lt;/arch&gt;
              &lt;/os&gt;
          &lt;/activation&gt;
      &lt;/profile&gt;
      &lt;profile&gt;
          &lt;id&gt;win64&lt;/id&gt;
          &lt;activation&gt;
              &lt;os&gt;
                  &lt;family&gt;Windows&lt;/family&gt;
                  &lt;arch&gt;amd64&lt;/arch&gt;
              &lt;/os&gt;
          &lt;/activation&gt;
      &lt;/profile&gt;
  &lt;/profiles&gt;
  </code></pre>
  
  <p>There are four profiles but one of the two architectures and one of the two <code>prod</code>/<code>dev</code> profiles should be active at the same time. The <code>dev</code> profile is configured to be active by default, when <code>win64</code> gets active due to the activation criteria, the <code>dev</code> profile becomes inactive.</p>
  
  <p>Is there a way to keep the <code>dev</code> profile active unless the <code>prod</code> profile becomes active?</p>
  
  <p>In essence, I want a logic like this:</p>
  
  <pre><code>------------------------
  |      | win32 | win64 |
  ------------------------
  | dev  |       |   X   |
  ------------------------
  | prod |       |       |
  ------------------------
  </code></pre>
  
  <p>I have an <code>application.properties</code> template in <code>src/main/resources</code> that looks something like this:</p>
  
  <pre><code>version=${version}
  environment=${environment}
  server.address=${serverAddress}
  pubnub.keys.subscribe=${pubNubSubscribeKey}
  sentry.dsn=${sentryDsn}
  </code></pre>
  
  <p>and then using a filter:</p>
  
  <pre><code>&lt;resources&gt;
      &lt;resource&gt;
          &lt;directory&gt;src/main/resources&lt;/directory&gt;
          &lt;filtering&gt;true&lt;/filtering&gt;
          &lt;includes&gt;
              &lt;include&gt;application.properties&lt;/include&gt;
          &lt;/includes&gt;
      &lt;/resource&gt;
      &lt;resource&gt;
          &lt;directory&gt;src/main/resources&lt;/directory&gt;
      &lt;/resource&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>I populate it with the correct value for either <code>prod</code> or <code>dev</code>. If that doesn't happen, the application fails to start. I cannot relay on my computer's <code>setting.xml</code> or an environment variable for <code>dev</code> to be active, because that means it won't be active on other computers and it would be very confusing.</p>