Specifying Resource Ref entries For The Generated application.xml

Resource Ref entries can be added as from the JavaEE 6 spec. For instance:

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-ear-plugin</artifactId>
        <version>3.0.1</version>
        <configuration>
           [...]
           <version>6</version>
           [...]
           <resourceRefs>
             <resourceRef>
               <res-ref-name>jdbc/myDs1</res-ref-name>
               <res-type>javax.sql.DataSource</res-type>
               <res-auth>Container</res-auth>
             </resourceRef>
             <resourceRef>
               <res-ref-name>jdbc/myDs2</res-ref-name>
               <res-type>javax.sql.DataSource</res-type>
               <res-auth>Container</res-auth>
             </resourceRef>
            </resourceRefs>
          </configuration>
      </plugin>
    </plugins>
  </build>