Uploaded image for project: 'Maven Archetype'
  1. Maven Archetype
  2. ARCHETYPE-345

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-alpha-5, 2.0
    • 2.3
    • Plugin
    • None
    • 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"

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

      Attachments

        1. ARCHETYPE-345.patch
          14 kB
          Guillaume Boucherie

        Activity

          People

            aheritier Arnaud Heritier
            mid491 mid491
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: