Details
Description
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>
[...]