archetype:create-from-project do not process <jarModule> and <ejbModule> 
sections into EAR's pom.xml
----------------------------------------------------------------------------------------------------

                 Key: ARCHETYPE-345
                 URL: http://jira.codehaus.org/browse/ARCHETYPE-345
             Project: Maven Archetype
          Issue Type: Bug
          Components: Plugin
    Affects Versions: 2.0, 2.0-alpha-5
         Environment: Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
Java version: 1.6.0_20
Default locale: fr_FR, platform encoding: Cp1252
OS name: "windows 2003" version: "5.2" arch: "x86" Family: "windows"
            Reporter: eric worth


During the "archetype:create-from-project" phase, the plugin ignore the 
jarModule and EjbModule maven's sections in the EAR pom.xml (multi modules):


Into <modules> section, "com.mycompany.myApp" should be "${groupId}", and 
"myApp-xxxxx" should be "${rootArtifactId}-xxxxx"


EAR pom.xml founded into 
target\generated-sources\archetype\src\main\resources\archetype-resources\__rootArtifactId__-ear
 : 

<?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";>
<parent>
    <groupId>${groupId}</groupId>
    <artifactId>${rootArtifactId}</artifactId>
    <version>${version}</version>
</parent>

<modelVersion>4.0.0</modelVersion>
    
<artifactId>${artifactId}</artifactId>
<packaging>ear</packaging>
<name>${project.artifactId}-${project.version}</name>

<dependencies>
    <dependency>
        <groupId>${groupId}</groupId>
        <artifactId>${rootArtifactId}-services</artifactId>
        <version>${version}</version>
        <type>ejb</type>
    </dependency>
    <dependency>
        <groupId>${groupId}</groupId>
        <artifactId>${rootArtifactId}-model</artifactId>
        <version>${version}</version>
        <type>jar</type>
    </dependency>
    <dependency>
        <groupId>${groupId}</groupId>
        <artifactId>${rootArtifactId}-webmodule</artifactId>
        <version>${version}</version>
        <type>war</type>
    </dependency>
</dependencies>
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-ear-plugin</artifactId>
            <version>2.4.2</version>
            <configuration>
                <defaultLibBundleDir>lib</defaultLibBundleDir>
                <archive>
                    <manifest>
                        <addClasspath>true</addClasspath>
                    </manifest>
                </archive>
                <modules>
                    <jarModule>
==>                     <groupId>com.mycompany.myApp</groupId>
==>                     <artifactId>myApp-model</artifactId>
                    </jarModule>
                    <ejbModule>
==>                     <groupId>com.mycompany.myApp</groupId>
==>                     <artifactId>myApp-services</artifactId>
                    </ejbModule>
                    <webModule> 
==>                     <groupId>com.mycompany.myApp</groupId> 
==>                     <artifactId>myApp-webmodule</artifactId> 
==>                     <contextRoot>/myApp-webModule</contextRoot> 
                        <unpack>true</unpack> 
                    </webModule>
                </modules>
            </configuration>
        </plugin>
    </plugins>
</build>
[...]

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to