Generating modules ID

Some environment requires an ID to be generated for each module defined in the application.xml. Enabling the automatic IDs generation can be done as follows:

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-ear-plugin</artifactId>
        <version>3.3.0</version>
        <configuration>
           [...]
           <generateModuleId>true</generateModuleId>
        </configuration>
      </plugin>
    </plugins>
  </build>

As a result, each module defined in the application.xml will have an ID unless an ID was provided in the configuration. To provide an explicit ID for a given module, use the moduleId attribute; for instance:

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-ear-plugin</artifactId>
        <version>3.3.0</version>
        <configuration>
           [...]
           <modules>
             <ejbModule>
               <groupId>artifactGroupId</groupId>
               <artifactId>artifactId</artifactId>
               <moduleId>some-id</moduleId>
             </ejbModule>
          </modules>
        </configuration>
      </plugin>
    </plugins>
  </build>