Index: src/test/java/org/apache/maven/plugin/ear/it/EarMojoIT.java
===================================================================
--- src/test/java/org/apache/maven/plugin/ear/it/EarMojoIT.java	(revision 896892)
+++ src/test/java/org/apache/maven/plugin/ear/it/EarMojoIT.java	(working copy)
@@ -616,4 +616,45 @@
     {
         doTestProject( "project-057", new String[]{"ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar"} );
     }
+    
+    /**
+     * Builds an EAR with ejb-client packaged for J2EE 1.3 (MEAR-85)
+     * @throws Exception
+     */
+    public void testProject058()
+    	throws Exception
+    {
+    	doTestProject( "project-058", new String[]{"ejb-client-one-1.0-client.jar"} );
+    }    
+
+    /**
+     * Builds an EAR with ejb-client packaged for J2EE 1.4 (MEAR-85)
+     * @throws Exception
+     */
+    public void testProject059()
+    	throws Exception
+    {
+    	doTestProject( "project-059", new String[]{"ejb-client-one-1.0-client.jar"} );
+    }    
+
+    /**
+     * Builds an EAR with ejb-client packaged for J2EE 5 (MEAR-85)
+     * @throws Exception
+     */
+    public void testProject060()
+    	throws Exception
+    {
+    	doTestProject( "project-060", new String[]{"lib/ejb-client-one-1.0-client.jar"} );
+    }    
+
+    /**
+     * Builds an EAR with ejb-client packaged for J2EE 6 (MEAR-85)
+     * @throws Exception
+     */
+    public void testProject061()
+    	throws Exception
+    {
+    	doTestProject( "project-061", new String[]{"lib/ejb-client-one-1.0-client.jar"} );
+    }    
+    
 }
Index: src/test/resources/m2repo/eartest/ejb-client-one/1.0/ejb-client-one-1.0.pom
===================================================================
--- src/test/resources/m2repo/eartest/ejb-client-one/1.0/ejb-client-one-1.0.pom	(revision 0)
+++ src/test/resources/m2repo/eartest/ejb-client-one/1.0/ejb-client-one-1.0.pom	(revision 0)
@@ -0,0 +1,29 @@
+<!--
+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>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>eartest</groupId>
+  <artifactId>ejb-client-one</artifactId>
+  <packaging>ejb-client</packaging>
+  <version>1.0</version>
+  <distributionManagement>
+    <status>verified</status>
+  </distributionManagement>
+</project>
Index: src/test/resources/m2repo/eartest/ejb-client-one/1.0/ejb-client-one-1.0-client.jar
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: src/test/resources/m2repo/eartest/ejb-client-one/1.0/ejb-client-one-1.0-client.jar
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: src/test/resources/projects/project-058/expected-META-INF/application.xml
===================================================================
--- src/test/resources/projects/project-058/expected-META-INF/application.xml	(revision 0)
+++ src/test/resources/projects/project-058/expected-META-INF/application.xml	(revision 0)
@@ -0,0 +1,26 @@
+<?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.
+-->
+
+<!DOCTYPE application PUBLIC
+	"-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
+	"http://java.sun.com/dtd/application_1_3.dtd">
+<application>
+  <display-name>maven-ear-plugin-test-project-058</display-name>
+</application>
Index: src/test/resources/projects/project-058/pom.xml
===================================================================
--- src/test/resources/projects/project-058/pom.xml	(revision 0)
+++ src/test/resources/projects/project-058/pom.xml	(revision 0)
@@ -0,0 +1,50 @@
+<?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-058</artifactId>
+  <version>99.0</version>
+  <name>Maven</name>
+  <packaging>ear</packaging>
+  <dependencies>
+    <dependency>
+      <groupId>eartest</groupId>
+      <artifactId>ejb-client-one</artifactId>
+      <version>1.0</version>
+      <type>ejb-client</type>
+    </dependency>
+  </dependencies>  
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-ear-plugin</artifactId>
+        <version>@project.version@</version>
+        <configuration>
+          <defaultLibBundleDir>lib</defaultLibBundleDir>
+          <version>1.3</version>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
Index: src/test/resources/projects/project-059/expected-META-INF/application.xml
===================================================================
--- src/test/resources/projects/project-059/expected-META-INF/application.xml	(revision 0)
+++ src/test/resources/projects/project-059/expected-META-INF/application.xml	(revision 0)
@@ -0,0 +1,22 @@
+<?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/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd" version="1.4">
+  <display-name>maven-ear-plugin-test-project-059</display-name>
+</application>
Index: src/test/resources/projects/project-059/pom.xml
===================================================================
--- src/test/resources/projects/project-059/pom.xml	(revision 0)
+++ src/test/resources/projects/project-059/pom.xml	(revision 0)
@@ -0,0 +1,50 @@
+<?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-059</artifactId>
+  <version>99.0</version>
+  <name>Maven</name>
+  <packaging>ear</packaging>
+  <dependencies>
+    <dependency>
+      <groupId>eartest</groupId>
+      <artifactId>ejb-client-one</artifactId>
+      <version>1.0</version>
+      <type>ejb-client</type>
+    </dependency>
+  </dependencies>  
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-ear-plugin</artifactId>
+        <version>@project.version@</version>
+        <configuration>
+          <defaultLibBundleDir>lib</defaultLibBundleDir>
+          <version>1.4</version>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
Index: src/test/resources/projects/project-060/expected-META-INF/application.xml
===================================================================
--- src/test/resources/projects/project-060/expected-META-INF/application.xml	(revision 0)
+++ src/test/resources/projects/project-060/expected-META-INF/application.xml	(revision 0)
@@ -0,0 +1,24 @@
+<?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_5.xsd" version="5">
+  <display-name>maven-ear-plugin-test-project-060</display-name>
+  <library-directory>lib</library-directory>
+</application>
Index: src/test/resources/projects/project-060/pom.xml
===================================================================
--- src/test/resources/projects/project-060/pom.xml	(revision 0)
+++ src/test/resources/projects/project-060/pom.xml	(revision 0)
@@ -0,0 +1,50 @@
+<?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-060</artifactId>
+  <version>99.0</version>
+  <name>Maven</name>
+  <packaging>ear</packaging>
+  <dependencies>
+    <dependency>
+      <groupId>eartest</groupId>
+      <artifactId>ejb-client-one</artifactId>
+      <version>1.0</version>
+      <type>ejb-client</type>
+    </dependency>
+  </dependencies>  
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-ear-plugin</artifactId>
+        <version>@project.version@</version>
+        <configuration>
+          <defaultLibBundleDir>lib</defaultLibBundleDir>
+          <version>5</version>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
Index: src/test/resources/projects/project-061/expected-META-INF/application.xml
===================================================================
--- src/test/resources/projects/project-061/expected-META-INF/application.xml	(revision 0)
+++ src/test/resources/projects/project-061/expected-META-INF/application.xml	(revision 0)
@@ -0,0 +1,23 @@
+<?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-061</display-name>
+</application>
Index: src/test/resources/projects/project-061/pom.xml
===================================================================
--- src/test/resources/projects/project-061/pom.xml	(revision 0)
+++ src/test/resources/projects/project-061/pom.xml	(revision 0)
@@ -0,0 +1,50 @@
+<?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-061</artifactId>
+  <version>99.0</version>
+  <name>Maven</name>
+  <packaging>ear</packaging>
+  <dependencies>
+    <dependency>
+      <groupId>eartest</groupId>
+      <artifactId>ejb-client-one</artifactId>
+      <version>1.0</version>
+      <type>ejb-client</type>
+    </dependency>
+  </dependencies>  
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-ear-plugin</artifactId>
+        <version>@project.version@</version>
+        <configuration>
+          <defaultLibBundleDir>lib</defaultLibBundleDir>
+          <version>6</version>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

