title: Nested property in Maven profile for plugin configuration
body: <p>I have a Java EE 7 project which is deployed to WildFly 8.1.0-Final. I use a standalone Wildfly server managed by Maven (i.e., clean configuration on every <code>mvn clean</code>) for testing, and the "normal" server remotely.</p>
  
  <p>In order to deploy to both servers with the maven-wildfly-plugin (1.0.2.Final), I have configured two Maven profiles: <strong>wildfly-local</strong>, which defines local username, password, and port number; and <strong>wildfly-remote</strong>, which defines remote username, password, and port number.</p>
  
  <p>However, the remote server runs in <strong>domain mode</strong>, while the local server does not. Thus, I am required to define a domain configuration with a server-group for the remote server, like so:</p>
  
  <pre><code>...
  &lt;plugin&gt;
    &lt;artifactId&gt;wildfly-maven-plugin&lt;/artifactId&gt;
  
    &lt;configuration&gt;
      &lt;hostname&gt;${wildfly-hostname}&lt;/hostname&gt;
      &lt;username&gt;${wildfly-username}&lt;/username&gt;
      &lt;password&gt;${wildfly-password}&lt;/password&gt;
      &lt;domain&gt;
        &lt;server-groups&gt;
          &lt;server-group&gt;${wildfly-server-group}&lt;/server-group&gt;
        &lt;/server-groups&gt;
      &lt;/domain&gt;
    &lt;/configuration&gt;
    ...
  &lt;/plugin&gt;
  ...
  </code></pre>
  
  <p><code>${wildfly-hostname}</code> and the three other proiperties are defined in the profile, and this configuration works. However, the standalone, non-"domain mode" local test server does not allow deployment of an application where a server-group is defined at all.</p>
  
  <p>My first thought was to define a nested property in the remote profile, like so:</p>
  
  <pre><code>&lt;profile&gt;
    &lt;id&gt;wildfly-remote&lt;/id&gt;
    &lt;properties&gt;
      ...
      &lt;wildfly-domain&gt;
        &lt;server-groups&gt;
          &lt;server-group&gt;*my server group name*&lt;/server-group&gt;
        &lt;/server-groups&gt;
      &lt;/wildfly-domain&gt;
      ...
      &lt;/properties&gt;
  &lt;/profile&gt;
  </code></pre>
  
  <p>... and a simple property in the local profile, like so:</p>
  
  <pre><code>&lt;profile&gt;
    &lt;id&gt;wildfly-local&lt;/id&gt;
    &lt;properties&gt;
      &lt;wildfly-domain/&gt;
    &lt;/properties&gt;
  &lt;/profile&gt;
  </code></pre>
  
  <p>Maven does not like this because it cannot parse tags where text is expected.</p>
  
  <p>Is there any way of defining a "resource" which is nested in one Maven profile, but flat in another?</p>