You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2017/08/29 19:28:17 UTC

svn commit: r1806633 - in /maven/plugins/trunk/maven-ear-plugin/src/test: java/org/apache/maven/plugins/ear/it/ resources/projects/project-086/ resources/projects/project-086/expected-META-INF/

Author: khmarbaise
Date: Tue Aug 29 19:28:17 2017
New Revision: 1806633

URL: http://svn.apache.org/viewvc?rev=1806633&view=rev
Log:
[MEAR-248] Support lookup-name in env-entry section
 o Added integration test

Added:
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-086/
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-086/expected-META-INF/
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-086/expected-META-INF/application.xml
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-086/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=1806633&r1=1806632&r2=1806633&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 Tue Aug 29 19:28:17 2017
@@ -883,5 +883,13 @@ public class EarMojoIT
         doTestProject( "project-085", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar" } );
     }
 
+    /**
+     * Builds an EAR with custom ejbRef entries plus lookup-name entry.
+     */
+    public void testProject086()
+        throws Exception
+    {
+        doTestProject( "project-086", 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-086/expected-META-INF/application.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-086/expected-META-INF/application.xml?rev=1806633&view=auto
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-086/expected-META-INF/application.xml (added)
+++ maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-086/expected-META-INF/application.xml Tue Aug 29 19:28:17 2017
@@ -0,0 +1,49 @@
+<?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-086</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>
+  <ejb-ref>
+    <description>A description test</description>
+    <ejb-ref-name>first-name</ejb-ref-name>
+    <ejb-ref-type>java.lang.String</ejb-ref-type>
+    <lookup-name>java-test</lookup-name>
+  </ejb-ref>
+</application>

Added: maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-086/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-086/pom.xml?rev=1806633&view=auto
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-086/pom.xml (added)
+++ maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-086/pom.xml Tue Aug 29 19:28:17 2017
@@ -0,0 +1,80 @@
+<?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-086</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>
+          <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>
+          <ejbRefs>
+	          <ejb-ref>
+	  			<description>A description test</description>
+				<ejb-ref-name>first-name</ejb-ref-name>
+				<ejb-ref-type>java.lang.String</ejb-ref-type>
+	  			<lookup-name>java-test</lookup-name>
+	          </ejb-ref>
+          </ejbRefs>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>