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.2</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> <resourceRef> <res-ref-name>jdbc/myDs3</res-ref-name> <res-type>javax.sql.DataSource</res-type> <lookup-name>jdbc/lookup/myDs3</lookup-name> </resourceRef> </resourceRefs> </configuration> </plugin> </plugins> </build>