Author: khmarbaise Date: Wed Aug 30 17:37:39 2017 New Revision: 1806717 URL: http://svn.apache.org/viewvc?rev=1806717&view=rev Log: [MEAR-247] resource-ref in generated application.xml o Added integration test for resource-refs.
Added: maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-087/ maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-087/expected-META-INF/ maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-087/expected-META-INF/application.xml maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-087/pom.xml Modified: maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugins/ear/it/EarMojoIT.java Modified: maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugins/ear/it/EarMojoIT.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugins/ear/it/EarMojoIT.java?rev=1806717&r1=1806716&r2=1806717&view=diff ============================================================================== --- maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugins/ear/it/EarMojoIT.java (original) +++ maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugins/ear/it/EarMojoIT.java Wed Aug 30 17:37:39 2017 @@ -892,4 +892,12 @@ public class EarMojoIT doTestProject( "project-086", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar" } ); } + /** + * Builds an EAR with resource-ref entries. + */ + public void testProject087() + throws Exception + { + doTestProject( "project-087", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar" } ); + } } Added: maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-087/expected-META-INF/application.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-087/expected-META-INF/application.xml?rev=1806717&view=auto ============================================================================== --- maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-087/expected-META-INF/application.xml (added) +++ maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-087/expected-META-INF/application.xml Wed Aug 30 17:37:39 2017 @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd" version="6"> + <display-name>maven-ear-plugin-test-project-087</display-name> + <module> + <ejb>ejb-sample-one-1.0.jar</ejb> + </module> + <module> + <ejb>ejb-sample-two-1.0.jar</ejb> + </module> + <env-entry> + <description>A complete entry.</description> + <env-entry-name>complete</env-entry-name> + <env-entry-type>java.lang.Integer</env-entry-type> + <env-entry-value>4</env-entry-value> + </env-entry> + <env-entry> + <env-entry-name>no-type</env-entry-name> + <env-entry-value>4</env-entry-value> + </env-entry> + <env-entry> + <env-entry-name>no-value</env-entry-name> + <env-entry-type>java.lang.String</env-entry-type> + <lookup-name>java:global/Example</lookup-name> + </env-entry> + <resource-ref> + <res-ref-name>jdbc/myDs1</res-ref-name> + <res-type>javax.sql.DataSource</res-type> + <res-auth>Container</res-auth> + </resource-ref> + <resource-ref> + <res-ref-name>jdbc/myDs2</res-ref-name> + <res-type>javax.sql.DataSource</res-type> + <res-auth>Container</res-auth> + </resource-ref> +</application> Added: maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-087/pom.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-087/pom.xml?rev=1806717&view=auto ============================================================================== --- maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-087/pom.xml (added) +++ maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-087/pom.xml Wed Aug 30 17:37:39 2017 @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>ear</groupId> + <artifactId>maven-ear-plugin-test-project-087</artifactId> + <version>99.0</version> + <name>Maven</name> + <packaging>ear</packaging> + <dependencies> + <dependency> + <groupId>eartest</groupId> + <artifactId>ejb-sample-one</artifactId> + <version>1.0</version> + <type>ejb</type> + </dependency> + <dependency> + <groupId>eartest</groupId> + <artifactId>ejb-sample-two</artifactId> + <version>1.0</version> + <type>ejb</type> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-ear-plugin</artifactId> + <version>@project.version@</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> + <envEntries> + <env-entry> + <description>A complete entry.</description> + <env-entry-name>complete</env-entry-name> + <env-entry-type>java.lang.Integer</env-entry-type> + <env-entry-value>4</env-entry-value> + </env-entry> + <env-entry> + <env-entry-name>no-type</env-entry-name> + <env-entry-value>4</env-entry-value> + </env-entry> + <env-entry> + <env-entry-name>no-value</env-entry-name> + <env-entry-type>java.lang.String</env-entry-type> + <lookup-name>java:global/Example</lookup-name> + </env-entry> + </envEntries> + </configuration> + </plugin> + </plugins> + </build> +</project>