maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snic...@apache.org
Subject svn commit: r476794 - in /maven/plugins/trunk/maven-ear-plugin/src: main/java/org/apache/maven/plugin/ear/ main/java/org/apache/maven/plugin/ear/output/ site/ site/apt/ site/apt/examples/ test/java/org/apache/maven/plugin/ear/ test/java/org/apache/mave...
Date Sun, 19 Nov 2006 10:43:38 GMT
Author: snicoll
Date: Sun Nov 19 02:43:37 2006
New Revision: 476794

URL: http://svn.apache.org/viewvc?view=rev&rev=476794
Log:
MEAR-42: Added file name mapping functionnality to avoid clashes with artifacts with the same
Id and version.

Added:
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FileNameMapping.java
  (with props)
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FileNameMappingFactory.java
  (with props)
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FullFileNameMapping.java
  (with props)
    maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/StandardFileNameMapping.java
  (with props)
    maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customize-file-name-mapping.apt
  (with props)
    maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/output/
    maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/output/FileNameMappingFactoryTest.java
  (with props)
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-one/
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-one/1.0/
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-one/1.0/ejb-sample-one-1.0-classified.jar
  (with props)
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-one/1.0/ejb-sample-one-1.0.jar
  (with props)
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-one/1.0/ejb-sample-one-1.0.pom
  (with props)
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-two/
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-two/1.0/
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-two/1.0/ejb-sample-two-1.0-client.jar
  (with props)
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-two/1.0/ejb-sample-two-1.0.jar
  (with props)
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-two/1.0/ejb-sample-two-1.0.pom
  (with props)
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-035/
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-035/expected-META-INF/
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-035/expected-META-INF/application.xml
  (with props)
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-035/pom.xml 
 (with props)
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-036/
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-036/expected-META-INF/
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-036/expected-META-INF/application.xml
  (with props)
    maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-036/pom.xml 
 (with props)
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/site/apt/tests.apt
    maven/plugins/trunk/maven-ear-plugin/src/site/apt/usage.apt
    maven/plugins/trunk/maven-ear-plugin/src/site/site.xml
    maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/EarMojoTest.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=476794&r1=476793&r2=476794
==============================================================================
--- 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
Sun Nov 19 02:43:37 2006
@@ -189,7 +189,7 @@
     {
         if ( bundleFileName == null )
         {
-            bundleFileName = artifact.getFile().getName();
+            bundleFileName = EarExecutionContext.getInstance().getFileNameMapping().mapFileName(
artifact );
         }
         return bundleFileName;
     }

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=476794&r1=476793&r2=476794
==============================================================================
--- 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
Sun Nov 19 02:43:37 2006
@@ -93,6 +93,14 @@
     private String defaultLibBundleDir;
 
     /**
+     * The file name mapping to use for all dependencies included
+     * in the EAR file.
+     *
+     * @parameter
+     */
+    private String fileNameMapping;
+
+    /**
      * Directory that resources are copied to during the build.
      *
      * @parameter expression="${project.build.directory}/${project.build.finalName}"
@@ -142,7 +150,7 @@
         }
 
         getLog().debug( "Initializing ear execution context" );
-        EarExecutionContext.getInstance().initialize( defaultLibBundleDir, jbossConfiguration
);
+        EarExecutionContext.getInstance().initialize( 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=476794&r1=476793&r2=476794
==============================================================================
--- 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
Sun Nov 19 02:43:37 2006
@@ -1,5 +1,8 @@
 package org.apache.maven.plugin.ear;
 
+import org.apache.maven.plugin.ear.output.FileNameMapping;
+import org.apache.maven.plugin.ear.output.FileNameMappingFactory;
+
 /*
  * Copyright 2001-2005 The Apache Software Foundation.
  *
@@ -38,6 +41,8 @@
 
     private JbossConfiguration jbossConfiguration;
 
+    private FileNameMapping fileNameMapping;
+
     private EarExecutionContext()
     {
 
@@ -58,9 +63,23 @@
         return jbossConfiguration != null;
     }
 
-    protected void initialize( String defaultLibBundleDir, JbossConfiguration jbossConfiguration
)
+    public FileNameMapping getFileNameMapping()
+    {
+        return fileNameMapping;
+    }
+
+    protected void initialize( String defaultLibBundleDir, JbossConfiguration jbossConfiguration,
+                               String fileNameMappingName )
     {
         this.defaultLibBundleDir = defaultLibBundleDir;
         this.jbossConfiguration = jbossConfiguration;
+        if ( fileNameMappingName == null || fileNameMappingName.trim().length() == 0 )
+        {
+            this.fileNameMapping = FileNameMappingFactory.INSTANCE.getDefaultFileNameMapping();
+        }
+        else
+        {
+            this.fileNameMapping = FileNameMappingFactory.INSTANCE.getFileNameMapping( fileNameMappingName
);
+        }
     }
 }

Added: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FileNameMapping.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FileNameMapping.java?view=auto&rev=476794
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FileNameMapping.java
(added)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FileNameMapping.java
Sun Nov 19 02:43:37 2006
@@ -0,0 +1,39 @@
+package org.apache.maven.plugin.ear.output;
+
+import org.apache.maven.artifact.Artifact;
+
+/*
+ * Copyright 2001-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+/**
+ * Maps file name {@link Artifact}.
+ * <p/>
+ * TODO: it might be easier to use a token-based approach instead.
+ * 
+ * @author <a href="snicoll@apache.org">Stephane Nicoll</a>
+ * @version $Id$
+ */
+public interface FileNameMapping
+{
+
+    /**
+     * Returns the file name of the specified artifact.
+     *
+     * @param a the artifact
+     * @return the name of the file for the specified artifact
+     */
+    String mapFileName(final Artifact a);
+}

Propchange: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FileNameMapping.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FileNameMapping.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FileNameMappingFactory.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FileNameMappingFactory.java?view=auto&rev=476794
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FileNameMappingFactory.java
(added)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FileNameMappingFactory.java
Sun Nov 19 02:43:37 2006
@@ -0,0 +1,103 @@
+package org.apache.maven.plugin.ear.output;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/*
+ * Copyright 2001-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+/**
+ * Provides access to {@link FileNameMapping} implementations.
+ * <p/>
+ * Two basic implementations are provided by default:
+ * <ul>
+ * <li>standard: the default implementation</li>
+ * <li>full: an implementation that maps to a 'full' file name, i.e. containing the
groupId</li>
+ * </ul>
+ *
+ * @author <a href="snicoll@apache.org">Stephane Nicoll</a>
+ * @version $Id$
+ */
+public class FileNameMappingFactory
+{
+    public static final String STANDARD_FILE_NAME_MAPPING = "standard";
+
+    public static final String FULL_FILE_NAME_MAPPING = "full";
+
+    public static final FileNameMappingFactory INSTANCE = new FileNameMappingFactory();
+
+    private final Map mappings;
+
+    private FileNameMappingFactory()
+    {
+        mappings = new HashMap();
+        mappings.put( STANDARD_FILE_NAME_MAPPING, new StandardFileNameMapping() );
+        mappings.put( FULL_FILE_NAME_MAPPING, new FullFileNameMapping() );
+    }
+
+    public FileNameMapping getDefaultFileNameMapping()
+    {
+        return getFileNameMapping( STANDARD_FILE_NAME_MAPPING );
+    }
+
+    /**
+     * Returns the file name mapping implementation based on a logical name
+     * of a fully qualified name of the class.
+     *
+     * @param nameOrClass a name of the fqn of the implementation
+     * @return the file name mapping implementation
+     * @throws IllegalStateException if the implementation is not found
+     */
+    public FileNameMapping getFileNameMapping( final String nameOrClass )
+        throws IllegalStateException
+    {
+        // Check if it's there yet
+        if ( mappings.containsKey( nameOrClass ) )
+        {
+            return (FileNameMapping) mappings.get( nameOrClass );
+        }
+        else
+        {
+            try
+            {
+                final Class c = Class.forName( nameOrClass );
+                final FileNameMapping fnm = (FileNameMapping) c.newInstance();
+                mappings.put( nameOrClass, fnm );
+                return fnm;
+            }
+            catch ( ClassNotFoundException e )
+            {
+                throw new IllegalStateException(
+                    "File name mapping implementation[" + nameOrClass + "] was not found
" + e.getMessage() );
+            }
+            catch ( InstantiationException e )
+            {
+                throw new IllegalStateException( "Could not instanciate file name mapping
implementation[" +
+                    nameOrClass + "] make sure it has a default public constructor" );
+            }
+            catch ( IllegalAccessException e )
+            {
+                throw new IllegalStateException( "Could not access file name mapping implementation["
+ nameOrClass +
+                    "] make sure it has a default public constructor" );
+            }
+            catch ( ClassCastException e )
+            {
+                throw new IllegalStateException( "Specified class[" + nameOrClass + "] does
not implement[" +
+                    FileNameMapping.class.getName() + "]" );
+            }
+        }
+    }
+}

Propchange: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FileNameMappingFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FileNameMappingFactory.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FullFileNameMapping.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FullFileNameMapping.java?view=auto&rev=476794
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FullFileNameMapping.java
(added)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FullFileNameMapping.java
Sun Nov 19 02:43:37 2006
@@ -0,0 +1,36 @@
+package org.apache.maven.plugin.ear.output;
+
+import org.apache.maven.artifact.Artifact;
+
+/*
+ * Copyright 2001-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+/**
+ * A full file name mapping, useful if artifacts might have the same
+ * name accross groups.
+ *
+ * @author <a href="snicoll@apache.org">Stephane Nicoll</a>
+ * @version $Id$
+ */
+public class FullFileNameMapping implements FileNameMapping
+{
+    
+    public String mapFileName( final Artifact a )
+    {
+        final String dashedGroupId = a.getGroupId().replace( '.', '-');
+        return dashedGroupId + "-" + a.getFile().getName();
+    }
+}

Propchange: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FullFileNameMapping.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/FullFileNameMapping.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/StandardFileNameMapping.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/StandardFileNameMapping.java?view=auto&rev=476794
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/StandardFileNameMapping.java
(added)
+++ maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/StandardFileNameMapping.java
Sun Nov 19 02:43:37 2006
@@ -0,0 +1,35 @@
+package org.apache.maven.plugin.ear.output;
+
+import org.apache.maven.artifact.Artifact;
+
+/*
+ * Copyright 2001-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+/**
+ * The standard fine name mapping. It returns the name
+ * of the file in the local repository.
+ *
+ * @author <a href="snicoll@apache.org">Stephane Nicoll</a>
+ * @version $Id$
+ */
+public class StandardFileNameMapping implements FileNameMapping
+{
+
+    public String mapFileName( final Artifact a )
+    {
+        return a.getFile().getName();
+    }
+}

Propchange: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/StandardFileNameMapping.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/output/StandardFileNameMapping.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customize-file-name-mapping.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customize-file-name-mapping.apt?view=auto&rev=476794
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customize-file-name-mapping.apt
(added)
+++ maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customize-file-name-mapping.apt
Sun Nov 19 02:43:37 2006
@@ -0,0 +1,47 @@
+  ------
+  Customizing The File Name Mapping
+  ------
+  Stephane Nicoll
+  <snicoll@apache.org>
+  ------
+  November 19, 2006
+
+~~ Copyright 2006 The Apache Software Foundation.
+~~
+~~ Licensed 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+
+Customizing The File Name Mapping
+
+  It might happen that your project has the same artifactId for different groups. To avoid
file name
+  clashing, specify the <<<full>>> file name mapping.
+
++--------
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-ear-plugin</artifactId>
+        <configuration>
+           [...]
+           <fileNameMapping>full</fileNameMapping>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
++---------
+
+  As a result, each artifact file name will be prefixed by the groupId to avoid clashes.

Propchange: maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customize-file-name-mapping.apt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ear-plugin/src/site/apt/examples/customize-file-name-mapping.apt
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

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=476794&r1=476793&r2=476794
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/site/apt/tests.apt (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/site/apt/tests.apt Sun Nov 19 02:43:37 2006
@@ -98,6 +98,10 @@
 
   * project-034: builds an EAR with custom security settings
 
+  * project-035: builds an EAR with a full filename mapping and make sure that custom locations
are not overriden
+
+  * project-036: builds an EAR with a full filename mapping and make sure that groupIds with
dots are replaced by dashes in filenames
+
   
 
    

Modified: maven/plugins/trunk/maven-ear-plugin/src/site/apt/usage.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/site/apt/usage.apt?view=diff&rev=476794&r1=476793&r2=476794
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/site/apt/usage.apt (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/site/apt/usage.apt Sun Nov 19 02:43:37 2006
@@ -92,12 +92,18 @@
   generated application.xml by specifying the <<<includeInApplicationXml>>>
flag.
 
   It is also possible to specify a default bundle directory for all third party
-  libraries.
+  libraries by specifying the <<<defaultLibBundleDir>>> parameter.
 
   The security settings might be specified under the security parameter.
 
   The artifact's types that should be unpacked by default can be specified
   using the unpackTypes parameter
+
+  The file name mapping to use for artifacts stored in the EAR can be specified
+  using the <<<fileNameMapping>>> parameter. Valid values for this parameter
+  are <<<standard>>> (default) and <<<full>>>. By specifying
<<<full>>> as file
+  name mapping, artifacts are prefixed by the <<<groupId>>> where dots
have been
+  replaced by dashes.
 
   For more information on EAR modules, please see the
   {{{modules.html}modules configuration}} page.

Modified: maven/plugins/trunk/maven-ear-plugin/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/site/site.xml?view=diff&rev=476794&r1=476793&r2=476794
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/site/site.xml (original)
+++ maven/plugins/trunk/maven-ear-plugin/src/site/site.xml Sun Nov 19 02:43:37 2006
@@ -38,6 +38,7 @@
       <item name="Including A Third Party Library In application.xml" href="examples/including-a-third-party-library-in-application-xml.html"/>
       <item name="Specifying Security Roles For The Generated application.xml" href="examples/specifying-security-roles-for-the-generated-application-xml.html"/>
       <item name="Generating jboss-app.xml" href="examples/generating-jboss-app.html"/>
+      <item name="Customize file name mapping" href="examples/customize-file-name-mapping.html"/>
     </menu>
   </body>
 </project>

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=476794&r1=476793&r2=476794
==============================================================================
--- 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
Sun Nov 19 02:43:37 2006
@@ -362,6 +362,29 @@
         throws Exception
     {
         doTestProject( "project-034", new String[]{"ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar"}
);
-    }    
+    }
+
+    /**
+     * Builds an EAR with a full filename mapping and make sure that custom locations are
not overriden.
+     */
+    public void testProject035()
+        throws Exception
+    {
+        doTestProject( "project-035", new String[]{"foo/eartest-ejb-sample-one-1.0.jar",
+            "eartest-ejb-sample-two-1.0.jar", "libs/eartest-jar-sample-one-1.0.jar",
+            "libs/eartest-jar-sample-two-1.0.jar", "sar-sample-one.sar"} );
+    }
+
+    /**
+     * Builds an EAR with a full filename mapping and make sure that groupIds with dots are
replaced by dashes in filenames.
+     */
+    public void testProject036()
+        throws Exception
+    {
+        doTestProject( "project-036", new String[]{"foo/eartest-ejb-sample-one-1.0.jar",
+            "eartest-ejb-sample-two-1.0.jar", "com-foo-bar-ejb-sample-one-1.0.jar",
+            "com-foo-bar-ejb-sample-two-1.0.jar", "libs/eartest-jar-sample-one-1.0.jar",
+            "libs/eartest-jar-sample-two-1.0.jar", "sar-sample-one.sar"} );
+    }
 
 }

Added: maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/output/FileNameMappingFactoryTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/output/FileNameMappingFactoryTest.java?view=auto&rev=476794
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/output/FileNameMappingFactoryTest.java
(added)
+++ maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/output/FileNameMappingFactoryTest.java
Sun Nov 19 02:43:37 2006
@@ -0,0 +1,77 @@
+package org.apache.maven.plugin.ear.output;
+
+import junit.framework.TestCase;
+
+/*
+ * Copyright 2001-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+/**
+ * @author <a href="snicoll@apache.org">Stephane Nicoll</a>
+ * @version $Id$
+ */
+public class FileNameMappingFactoryTest
+    extends TestCase
+{
+
+    public void testDefaultFileNameMapping()
+    {
+        final FileNameMapping actual = FileNameMappingFactory.INSTANCE.getDefaultFileNameMapping();
+        assertNotNull( actual );
+        assertEquals( StandardFileNameMapping.class, actual.getClass() );
+    }
+
+    public void testGetFileNameMappingByName()
+    {
+        final FileNameMapping actual =
+            FileNameMappingFactory.INSTANCE.getFileNameMapping( FileNameMappingFactory.STANDARD_FILE_NAME_MAPPING
);
+        assertNotNull( actual );
+        assertEquals( StandardFileNameMapping.class, actual.getClass() );
+    }
+
+    public void testGetFileNameMappingByName2()
+    {
+        final FileNameMapping actual =
+            FileNameMappingFactory.INSTANCE.getFileNameMapping( FileNameMappingFactory.FULL_FILE_NAME_MAPPING
);
+        assertNotNull( actual );
+        assertEquals( FullFileNameMapping.class, actual.getClass() );
+    }
+
+    public void testGetFileNameMappingByClass() {
+        final FileNameMapping actual = FileNameMappingFactory.INSTANCE.getFileNameMapping(StandardFileNameMapping.class.getName());
+        assertNotNull( actual);
+        assertEquals( StandardFileNameMapping.class, actual.getClass());
+    }
+
+    public void testGetFileNameMappingByClass2()
+    {
+        final FileNameMapping actual =
+            FileNameMappingFactory.INSTANCE.getFileNameMapping( FullFileNameMapping.class.getName()
);
+        assertNotNull( actual );
+        assertEquals( FullFileNameMapping.class, actual.getClass() );
+    }
+
+    public void testGetFileNameMappingByUnknownClass()
+    {
+        try
+        {
+            FileNameMappingFactory.INSTANCE.getFileNameMapping( "com.foo.bar" );
+            fail("Should have failed");
+        }
+        catch ( IllegalStateException e )
+        {
+            // OK
+        }
+    }
+}

Propchange: maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/output/FileNameMappingFactoryTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ear-plugin/src/test/java/org/apache/maven/plugin/ear/output/FileNameMappingFactoryTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-one/1.0/ejb-sample-one-1.0-classified.jar
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-one/1.0/ejb-sample-one-1.0-classified.jar?view=auto&rev=476794
==============================================================================
Binary file - no diff available.

Propchange: maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-one/1.0/ejb-sample-one-1.0-classified.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-one/1.0/ejb-sample-one-1.0.jar
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-one/1.0/ejb-sample-one-1.0.jar?view=auto&rev=476794
==============================================================================
Binary file - no diff available.

Propchange: maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-one/1.0/ejb-sample-one-1.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-one/1.0/ejb-sample-one-1.0.pom
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-one/1.0/ejb-sample-one-1.0.pom?view=auto&rev=476794
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-one/1.0/ejb-sample-one-1.0.pom
(added)
+++ maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-one/1.0/ejb-sample-one-1.0.pom
Sun Nov 19 02:43:37 2006
@@ -0,0 +1,10 @@
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>com.foo.bar</groupId>
+  <artifactId>ejb-sample-one</artifactId>
+  <packaging>ejb</packaging>
+  <version>1.0</version>
+  <distributionManagement>
+    <status>verified</status>
+  </distributionManagement>
+</project>

Propchange: maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-one/1.0/ejb-sample-one-1.0.pom
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-one/1.0/ejb-sample-one-1.0.pom
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-two/1.0/ejb-sample-two-1.0-client.jar
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-two/1.0/ejb-sample-two-1.0-client.jar?view=auto&rev=476794
==============================================================================
Binary file - no diff available.

Propchange: maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-two/1.0/ejb-sample-two-1.0-client.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-two/1.0/ejb-sample-two-1.0.jar
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-two/1.0/ejb-sample-two-1.0.jar?view=auto&rev=476794
==============================================================================
Binary file - no diff available.

Propchange: maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-two/1.0/ejb-sample-two-1.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-two/1.0/ejb-sample-two-1.0.pom
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-two/1.0/ejb-sample-two-1.0.pom?view=auto&rev=476794
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-two/1.0/ejb-sample-two-1.0.pom
(added)
+++ maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-two/1.0/ejb-sample-two-1.0.pom
Sun Nov 19 02:43:37 2006
@@ -0,0 +1,20 @@
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>com.foo.bar</groupId>
+  <artifactId>ejb-sample-two</artifactId>
+  <packaging>ejb</packaging>
+  <version>1.0</version>
+  <distributionManagement>
+    <status>verified</status>
+  </distributionManagement>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-ejb-plugin</artifactId>
+        <configuration>
+          <generateClient>true</generateClient>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-two/1.0/ejb-sample-two-1.0.pom
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ear-plugin/src/test/resources/m2repo/com/foo/bar/ejb-sample-two/1.0/ejb-sample-two-1.0.pom
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-035/expected-META-INF/application.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-035/expected-META-INF/application.xml?view=auto&rev=476794
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-035/expected-META-INF/application.xml
(added)
+++ maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-035/expected-META-INF/application.xml
Sun Nov 19 02:43:37 2006
@@ -0,0 +1,16 @@
+<?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-035</display-name>
+  <module>
+    <connector>sar-sample-one.sar</connector>
+  </module>
+  <module>
+    <ejb>foo/eartest-ejb-sample-one-1.0.jar</ejb>
+  </module>
+  <module>
+    <ejb>eartest-ejb-sample-two-1.0.jar</ejb>
+  </module>
+</application>
\ No newline at end of file

Propchange: maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-035/expected-META-INF/application.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-035/expected-META-INF/application.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-035/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-035/pom.xml?view=auto&rev=476794
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-035/pom.xml (added)
+++ maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-035/pom.xml Sun
Nov 19 02:43:37 2006
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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-035</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>    
+    <dependency>
+      <groupId>eartest</groupId>
+      <artifactId>jar-sample-one</artifactId>
+      <version>1.0</version>
+      <type>jar</type>
+    </dependency>
+    <dependency>
+      <groupId>eartest</groupId>
+      <artifactId>jar-sample-two</artifactId>
+      <version>1.0</version>
+      <type>jar</type>
+    </dependency>
+    <dependency>
+      <groupId>eartest</groupId>
+      <artifactId>sar-sample-one</artifactId>
+      <version>1.0</version>
+      <type>sar</type>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-ear-plugin</artifactId>
+        <configuration>
+          <fileNameMapping>full</fileNameMapping>
+          <defaultLibBundleDir>libs</defaultLibBundleDir>
+          <modules>
+            <sarModule>
+              <groupId>eartest</groupId>
+              <artifactId>sar-sample-one</artifactId>
+              <bundleFileName>sar-sample-one.sar</bundleFileName>
+            </sarModule>
+            <ejbModule>
+              <groupId>eartest</groupId>
+              <artifactId>ejb-sample-one</artifactId>
+              <bundleDir>foo</bundleDir>
+            </ejbModule>
+          </modules>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-035/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-035/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-036/expected-META-INF/application.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-036/expected-META-INF/application.xml?view=auto&rev=476794
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-036/expected-META-INF/application.xml
(added)
+++ maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-036/expected-META-INF/application.xml
Sun Nov 19 02:43:37 2006
@@ -0,0 +1,22 @@
+<?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-036</display-name>
+  <module>
+    <connector>sar-sample-one.sar</connector>
+  </module>
+  <module>
+    <ejb>foo/eartest-ejb-sample-one-1.0.jar</ejb>
+  </module>
+  <module>
+    <ejb>com-foo-bar-ejb-sample-one-1.0.jar</ejb>
+  </module>
+  <module>
+    <ejb>com-foo-bar-ejb-sample-two-1.0.jar</ejb>
+  </module>
+  <module>
+    <ejb>eartest-ejb-sample-two-1.0.jar</ejb>
+  </module>
+</application>
\ No newline at end of file

Propchange: maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-036/expected-META-INF/application.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-036/expected-META-INF/application.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-036/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-036/pom.xml?view=auto&rev=476794
==============================================================================
--- maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-036/pom.xml (added)
+++ maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-036/pom.xml Sun
Nov 19 02:43:37 2006
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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-036</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>
+    <dependency>
+      <groupId>com.foo.bar</groupId>
+      <artifactId>ejb-sample-one</artifactId>
+      <version>1.0</version>
+      <type>ejb</type>
+    </dependency>
+    <dependency>
+      <groupId>com.foo.bar</groupId>
+      <artifactId>ejb-sample-two</artifactId>
+      <version>1.0</version>
+      <type>ejb</type>
+    </dependency>
+    <dependency>
+      <groupId>eartest</groupId>
+      <artifactId>jar-sample-one</artifactId>
+      <version>1.0</version>
+      <type>jar</type>
+    </dependency>
+    <dependency>
+      <groupId>eartest</groupId>
+      <artifactId>jar-sample-two</artifactId>
+      <version>1.0</version>
+      <type>jar</type>
+    </dependency>
+    <dependency>
+      <groupId>eartest</groupId>
+      <artifactId>sar-sample-one</artifactId>
+      <version>1.0</version>
+      <type>sar</type>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-ear-plugin</artifactId>
+        <configuration>
+          <fileNameMapping>full</fileNameMapping>
+          <defaultLibBundleDir>libs</defaultLibBundleDir>
+          <modules>
+            <sarModule>
+              <groupId>eartest</groupId>
+              <artifactId>sar-sample-one</artifactId>
+              <bundleFileName>sar-sample-one.sar</bundleFileName>
+            </sarModule>
+            <ejbModule>
+              <groupId>eartest</groupId>
+              <artifactId>ejb-sample-one</artifactId>
+              <bundleDir>foo</bundleDir>
+            </ejbModule>
+          </modules>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-036/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-ear-plugin/src/test/resources/projects/project-036/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision



Mime
View raw message