You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sn...@apache.org on 2007/03/24 17:09:23 UTC

svn commit: r522047 - in /maven/plugins/trunk/maven-ear-plugin/src: main/java/org/apache/maven/plugin/ear/ main/java/org/apache/maven/plugin/ear/util/ site/apt/ test/java/org/apache/maven/plugin/ear/ test/java/org/apache/maven/plugin/ear/util/ test/res...

Author: snicoll
Date: Sat Mar 24 09:09:22 2007
New Revision: 522047

URL: http://svn.apache.org/viewvc?view=rev&rev=522047
Log:
MEAR-59: it is now possible to customize the main artifact when used toghether with a classified dependency. By default a 'none' classifier identify the main artifact. This can be customized using the mainArtifactId parameter.

Added:
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-038/
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-038/expected-META-INF/
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-038/expected-META-INF/application.xml
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-038/pom.xml
Modified:
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AbstractEarModule.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AbstractEarMojo.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarExecutionContext.java
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/ArtifactRepository.java
    maven/plugins/trunk/maven-ear-plugin/src/site/apt/modules.apt
    maven/plugins/trunk/maven-ear-plugin/src/site/apt/tests.apt
    maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/EarMojoTest.java
    maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/util/ArtifactRepositoryTest.java

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AbstractEarModule.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AbstractEarModule.java?view=diff&rev=522047&r1=522046&r2=522047
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AbstractEarModule.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AbstractEarModule.java Sat Mar 24 09:09:22 2007
@@ -93,7 +93,7 @@
                 throw new MojoFailureException(
                     "Could not resolve artifact[" + groupId + ":" + artifactId + ":" + getType() + "]" );
             }
-            ArtifactRepository ar = new ArtifactRepository( artifacts );
+            final ArtifactRepository ar = EarExecutionContext.getInstance().getArtifactRepository();
             artifact = ar.getUniqueArtifact( groupId, artifactId, getType(), classifier );
             // Artifact has not been found
             if ( artifact == null )

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AbstractEarMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AbstractEarMojo.java?view=diff&rev=522047&r1=522046&r2=522047
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AbstractEarMojo.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/AbstractEarMojo.java Sat Mar 24 09:09:22 2007
@@ -118,6 +118,13 @@
      */
     private PlexusConfiguration jboss;
 
+    /**
+     * The id to use to define the main artifact (e.g. the artifact without
+     * a classifier) when there is multiple candidates.
+     *
+     * @parameter
+     */
+    private String mainArtifactId = "none";
 
     private List earModules;
 
@@ -153,7 +160,7 @@
         }
 
         getLog().debug( "Initializing ear execution context" );
-        EarExecutionContext.getInstance().initialize( defaultLibBundleDir, jbossConfiguration, fileNameMapping );
+        EarExecutionContext.getInstance().initialize( project, mainArtifactId, defaultLibBundleDir, jbossConfiguration, fileNameMapping );
 
         getLog().debug( "Resolving ear modules ..." );
         allModules = new ArrayList();

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarExecutionContext.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarExecutionContext.java?view=diff&rev=522047&r1=522046&r2=522047
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarExecutionContext.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/EarExecutionContext.java Sat Mar 24 09:09:22 2007
@@ -21,6 +21,8 @@
 
 import org.apache.maven.plugin.ear.output.FileNameMapping;
 import org.apache.maven.plugin.ear.output.FileNameMappingFactory;
+import org.apache.maven.plugin.ear.util.ArtifactRepository;
+import org.apache.maven.project.MavenProject;
 
 /**
  * Contains various runtime parameters used to customize the generated EAR file.
@@ -45,6 +47,9 @@
 
     private FileNameMapping fileNameMapping;
 
+    private ArtifactRepository artifactRepository;
+
+
     private EarExecutionContext()
     {
 
@@ -70,9 +75,15 @@
         return fileNameMapping;
     }
 
-    protected void initialize( String defaultLibBundleDir, JbossConfiguration jbossConfiguration,
+    public ArtifactRepository getArtifactRepository()
+    {
+        return artifactRepository;
+    }
+
+    protected void initialize( MavenProject project, String mainArtifactId, String defaultLibBundleDir, JbossConfiguration jbossConfiguration,
                                String fileNameMappingName )
     {
+        this.artifactRepository = new ArtifactRepository( project.getArtifacts(), mainArtifactId);
         this.defaultLibBundleDir = defaultLibBundleDir;
         this.jbossConfiguration = jbossConfiguration;
         if ( fileNameMappingName == null || fileNameMappingName.trim().length() == 0 )

Modified: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/ArtifactRepository.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/ArtifactRepository.java?view=diff&rev=522047&r1=522046&r2=522047
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/ArtifactRepository.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/util/ArtifactRepository.java Sat Mar 24 09:09:22 2007
@@ -35,16 +35,20 @@
 {
     private final Set artifacts;
 
+    private final String mainArtifactId;
+
     private final ArtifactTypeMappingService artifactTypeMappingService;
 
     /**
      * Creates a new repository wih the specified artifacts.
      *
      * @param artifacts the artifacts
+     * @param mainArtifactId the id to use for the main artifact (no classifier)
      */
-    public ArtifactRepository( Set artifacts )
+    public ArtifactRepository( Set artifacts, String mainArtifactId )
     {
         this.artifacts = artifacts;
+        this.mainArtifactId = mainArtifactId;
         this.artifactTypeMappingService = ArtifactTypeMappingService.getInstance();
     }
 
@@ -62,20 +66,32 @@
      * @param groupId    the group id
      * @param artifactId the artifact id
      * @param type       the type
+     * @param classifier the classifier
      * @return the artifact or null if no artifact were found
      */
     public Artifact getUniqueArtifact( String groupId, String artifactId, String type, String classifier )
     {
-        final Set candidates = getArtifacts( groupId, artifactId, type);
-        if (candidates.size() == 0) {
+        final Set candidates = getArtifacts( groupId, artifactId, type );
+        if ( candidates.size() == 0 )
+        {
             return null;
-        } else if (candidates.size() == 1 && classifier == null) {
+        }
+        else if ( candidates.size() == 1 && classifier == null )
+        {
             return (Artifact) candidates.iterator().next();
-        } else if (classifier != null) {
+        }
+        else if ( classifier != null )
+        {
             final Iterator it = candidates.iterator();
-            while (it.hasNext()) {
+            while ( it.hasNext() )
+            {
                 Artifact a = (Artifact) it.next();
-                if (classifier.equals( a.getClassifier())) {
+                if ( a.getClassifier() == null && classifier.equals( mainArtifactId ) )
+                {
+                    return a;
+                }
+                else if ( classifier.equals( a.getClassifier() ) )
+                {
                     return a;
                 }
             }
@@ -102,7 +118,7 @@
      */
     public Artifact getUniqueArtifact( String groupId, String artifactId, String type )
     {
-        return getUniqueArtifact( groupId, artifactId, type, null);
+        return getUniqueArtifact( groupId, artifactId, type, null );
     }
 
     /**

Modified: maven/plugins/trunk/maven-ear-plugin/src/site/apt/modules.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/site/apt/modules.apt?view=diff&rev=522047&r1=522046&r2=522047
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/site/apt/modules.apt (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/site/apt/modules.apt Sat Mar 24 09:09:22 2007
@@ -89,7 +89,9 @@
   configure.
 
   * <<classifier>> - sets the classifier of the ejb3 artifact you want to
-  configure if multiple ejb3 artifacts matches the groupId/artifact.
+  configure if multiple ejb3 artifacts matches the groupId/artifact. Use
+  the mainArtifactId ('none' by default) to define the main artifact (e.g.
+  the artifact without a classifier)
 
   * <<bundleDir>> - sets the location of this artifact inside the ear archive.
   If not set, this artifact will be packaged in the root of the archive.
@@ -118,7 +120,9 @@
   configure.
 
   * <<classifier>> - sets the classifier of the ejb-client artifact you want to
-  configure if multiple ejb-client artifacts matches the groupId/artifact.
+  configure if multiple ejb-client artifacts matches the groupId/artifact.  Use
+  the mainArtifactId ('none' by default) to define the main artifact (e.g.
+  the artifact without a classifier)
 
   * <<bundleDir>> - sets the location of this artifact inside the ear archive.
   If not set, this artifact will be packaged in the root of the archive.
@@ -147,7 +151,9 @@
   configure.
 
   * <<classifier>> - sets the classifier of the ejb artifact you want to
-  configure if multiple ejb artifacts matches the groupId/artifact.
+  configure if multiple ejb artifacts matches the groupId/artifact.  Use
+  the mainArtifactId ('none' by default) to define the main artifact (e.g.
+  the artifact without a classifier)
 
   * <<bundleDir>> - sets the location of this artifact inside the ear archive.
   If not set, this artifact will be packaged in the root of the archive.
@@ -176,7 +182,9 @@
   configure.
 
   * <<classifier>> - sets the classifier of the jar artifact you want to
-  configure if multiple jar artifacts matches the groupId/artifact.
+  configure if multiple jar artifacts matches the groupId/artifact. Use
+  the mainArtifactId ('none' by default) to define the main artifact (e.g.
+  the artifact without a classifier)
 
   * <<bundleDir>> - sets the location of this artifact inside the ear archive.
   If not set, this artifact will be packaged in the root of the archive.
@@ -208,7 +216,9 @@
   configure.
 
   * <<classifier>> - sets the classifier of the par artifact you want to
-  configure if multiple par artifacts matches the groupId/artifact.
+  configure if multiple par artifacts matches the groupId/artifact. Use
+  the mainArtifactId ('none' by default) to define the main artifact (e.g.
+  the artifact without a classifier)
 
   * <<bundleDir>> - sets the location of this artifact inside the ear archive.
   If not set, this artifact will be packaged in the root of the archive.
@@ -237,7 +247,9 @@
   configure.
 
   * <<classifier>> - sets the classifier of the rar artifact you want to
-  configure if multiple rar artifacts matches the groupId/artifact.
+  configure if multiple rar artifacts matches the groupId/artifact. Use
+  the mainArtifactId ('none' by default) to define the main artifact (e.g.
+  the artifact without a classifier)
 
   * <<bundleDir>> - sets the location of this artifact inside the ear archive.
   If not set, this artifact will be packaged in the root of the archive.
@@ -266,7 +278,9 @@
   configure.
 
   * <<classifier>> - sets the classifier of the sar artifact you want to
-  configure if multiple sar artifacts matches the groupId/artifact.
+  configure if multiple sar artifacts matches the groupId/artifact. Use
+  the mainArtifactId ('none' by default) to define the main artifact (e.g.
+  the artifact without a classifier)
 
   * <<bundleDir>> - sets the location of this artifact inside the ear archive.
   If not set, this artifact will be packaged in the root of the archive.
@@ -295,7 +309,9 @@
   configure.
 
   * <<classifier>> - sets the classifier of the web artifact you want to
-  configure if multiple web artifacts matches the groupId/artifact.
+  configure if multiple web artifacts matches the groupId/artifact. Use
+  the mainArtifactId ('none' by default) to define the main artifact (e.g.
+  the artifact without a classifier)
 
   * <<bundleDir>> - sets the location of this artifact inside the ear archive.
   If not set, this artifact will be packaged in the root of the archive.
@@ -326,7 +342,9 @@
   configure.
 
   * <<classifier>> - sets the classifier of the wst artifact you want to
-  configure if multiple wsr artifacts matches the groupId/artifact.
+  configure if multiple wsr artifacts matches the groupId/artifact. Use
+  the mainArtifactId ('none' by default) to define the main artifact (e.g.
+  the artifact without a classifier)
 
   * <<bundleDir>> - sets the location of this artifact inside the ear archive.
   If not set, this artifact will be packaged in the root of the archive.
@@ -356,7 +374,8 @@
 
   * <<classifier>> - sets the classifier of the hibernate archive artifact
   you want to configure if multiple hibernate archive  artifacts matches
-  the groupId/artifact.
+  the groupId/artifact.  Use the mainArtifactId ('none' by default) to define
+  the main artifact (e.g. the artifact without a classifier)
 
   * <<bundleDir>> - sets the location of this artifact inside the ear archive.
   If not set, this artifact will be packaged in the root of the archive.

Modified: maven/plugins/trunk/maven-ear-plugin/src/site/apt/tests.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/site/apt/tests.apt?view=diff&rev=522047&r1=522046&r2=522047
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/site/apt/tests.apt (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/site/apt/tests.apt Sat Mar 24 09:09:22 2007
@@ -104,6 +104,7 @@
 
   * project-037: builds an EAR and make sure that ejb-client dependencies are detected and added in the generated application.xml if includeInApplicationXml is set
 
+  * project-038: builds an EAR and make sure that a non-classified dependency with mutiple candidates is detected when specifying the mainArtifactId as classifier
   
 
    

Modified: maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/EarMojoTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/EarMojoTest.java?view=diff&rev=522047&r1=522046&r2=522047
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/EarMojoTest.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/EarMojoTest.java Sat Mar 24 09:09:22 2007
@@ -401,4 +401,15 @@
         doTestProject( "project-037", new String[]{"ejb-sample-one-1.0.jar", "ejb-sample-two-1.0-client.jar"} );
     }
 
+    /**
+     * Builds an EAR and make sure that a non-classified dependency with mutiple candidates is
+     * detected when specifying the mainArtifactId as classifier.
+     */
+    public void testProject038()
+        throws Exception
+    {
+        doTestProject( "project-038", new String[]{"ejb-sample-one-1.0-classified.jar", "ejb-sample-one-1.0.jar"},
+                       new boolean[]{false, true} );
+    }
+
 }

Modified: maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/util/ArtifactRepositoryTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/util/ArtifactRepositoryTest.java?view=diff&rev=522047&r1=522046&r2=522047
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/util/ArtifactRepositoryTest.java (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/util/ArtifactRepositoryTest.java Sat Mar 24 09:09:22 2007
@@ -38,16 +38,18 @@
         throws Exception
     {
         super.setUp();
-        ArtifactTypeMappingService.getInstance().configure( null);
+        ArtifactTypeMappingService.getInstance().configure( null );
     }
 
     public static final String DEFAULT_GROUPID = "eartest";
 
     public static final String DEFAULT_TYPE = "jar";
 
+    public static final String MAIN_ARTIFACT_ID = "none";
+
     public void testEmptyRepository()
     {
-        ArtifactRepository repo = new ArtifactRepository( createArtifacts( null ) );
+        ArtifactRepository repo = new ArtifactRepository( createArtifacts( null ), MAIN_ARTIFACT_ID );
         assertNull( repo.getUniqueArtifact( "ear", "ar", "jar" ) );
         assertNull( repo.getUniqueArtifact( "ear", "ar", "jar", null ) );
         assertNull( repo.getUniqueArtifact( "ear", "ar", "jar", "class" ) );
@@ -55,14 +57,16 @@
 
     public void testRepositoryWithOneUnclassifiedArtifact()
     {
-        ArtifactRepository repo = new ArtifactRepository( createArtifacts( new String[]{"myartifact"} ) );
+        ArtifactRepository repo =
+            new ArtifactRepository( createArtifacts( new String[]{"myartifact"} ), MAIN_ARTIFACT_ID );
         assertNotNull( repo.getUniqueArtifact( DEFAULT_GROUPID, "myartifact", "jar" ) );
         assertNotNull( repo.getUniqueArtifact( DEFAULT_GROUPID, "myartifact", "jar", null ) );
     }
 
     public void testRepositoryWithOneClassifiedArtifact()
     {
-        ArtifactRepository repo = new ArtifactRepository( createArtifacts( new String[]{"myartifact"}, null, null, new String[]{"classified"} ) );
+        ArtifactRepository repo = new ArtifactRepository(
+            createArtifacts( new String[]{"myartifact"}, null, null, new String[]{"classified"} ), MAIN_ARTIFACT_ID );
         assertNotNull( repo.getUniqueArtifact( DEFAULT_GROUPID, "myartifact", "jar" ) );
         assertNotNull( repo.getUniqueArtifact( DEFAULT_GROUPID, "myartifact", "jar", "classified" ) );
         assertNull( repo.getUniqueArtifact( DEFAULT_GROUPID, "myartifact", "jar", "wrong" ) );
@@ -70,13 +74,27 @@
 
     public void testRepositoryWithMultipleClassifiedArtifacts()
     {
-        ArtifactRepository repo = new ArtifactRepository( createArtifacts( new String[]{"myartifact", "myartifact",
-            "myartifact"}, null, null, new String[]{"class1", "class2", "class3"} ) );
+        ArtifactRepository repo = new ArtifactRepository( createArtifacts(
+            new String[]{"myartifact", "myartifact", "myartifact"}, null, null,
+            new String[]{"class1", "class2", "class3"} ), MAIN_ARTIFACT_ID );
 
         assertNull( repo.getUniqueArtifact( DEFAULT_GROUPID, "myartifact", "jar" ) );
         assertNotNull( repo.getUniqueArtifact( DEFAULT_GROUPID, "myartifact", "jar", "class1" ) );
         assertNotNull( repo.getUniqueArtifact( DEFAULT_GROUPID, "myartifact", "jar", "class2" ) );
         assertNotNull( repo.getUniqueArtifact( DEFAULT_GROUPID, "myartifact", "jar", "class3" ) );
+        assertNull( repo.getUniqueArtifact( DEFAULT_GROUPID, "myartifact", "jar", "wrong" ) );
+    }
+
+    public void testRepositoryWithMultipleClassifiedArtifactsAndMainArtifact()
+    {
+        ArtifactRepository repo = new ArtifactRepository( createArtifacts(
+            new String[]{"myartifact", "myartifact", "myartifact"}, null, null,
+            new String[]{"class1", "class2", null} ), MAIN_ARTIFACT_ID );
+
+        assertNull( repo.getUniqueArtifact( DEFAULT_GROUPID, "myartifact", "jar" ) );
+        assertNotNull( repo.getUniqueArtifact( DEFAULT_GROUPID, "myartifact", "jar", "class1" ) );
+        assertNotNull( repo.getUniqueArtifact( DEFAULT_GROUPID, "myartifact", "jar", "class2" ) );
+        assertNotNull( repo.getUniqueArtifact( DEFAULT_GROUPID, "myartifact", "jar", MAIN_ARTIFACT_ID ) );
         assertNull( repo.getUniqueArtifact( DEFAULT_GROUPID, "myartifact", "jar", "wrong" ) );
     }
 

Added: maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-038/expected-META-INF/application.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-038/expected-META-INF/application.xml?view=auto&rev=522047
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-038/expected-META-INF/application.xml (added)
+++ maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-038/expected-META-INF/application.xml Sat Mar 24 09:09:22 2007
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!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-038</display-name>
+  <module>
+    <ejb>ejb-sample-one-1.0.jar</ejb>
+  </module>
+  <module>
+    <ejb>ejb-sample-one-1.0-classified.jar</ejb>
+  </module>
+</application>
\ No newline at end of file

Added: maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-038/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-038/pom.xml?view=auto&rev=522047
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-038/pom.xml (added)
+++ maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-038/pom.xml Sat Mar 24 09:09:22 2007
@@ -0,0 +1,62 @@
+<?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-038</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>
+      <classifier>classified</classifier>
+    </dependency>
+    <dependency>
+      <groupId>eartest</groupId>
+      <artifactId>ejb-sample-one</artifactId>
+      <version>1.0</version>
+      <type>ejb</type>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-ear-plugin</artifactId>
+        <configuration>
+          <modules>
+            <ejbModule>
+              <groupId>eartest</groupId>
+              <artifactId>ejb-sample-one</artifactId>
+              <classifier>none</classifier>
+              <unpack>true</unpack>
+            </ejbModule>            
+          </modules>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>