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.

  1. <build>
  2. <plugins>
  3. <plugin>
  4. <groupId>org.apache.maven.plugins</groupId>
  5. <artifactId>maven-ear-plugin</artifactId>
  6. <version>2.10.1</version>
  7. <configuration>
  8. [...]
  9. <fileNameMapping>full</fileNameMapping>
  10. </configuration>
  11. </plugin>
  12. </plugins>
  13. </build>

As a result, each artifact file name will be prefixed by the groupId to avoid clashes. There is also a no-version file name mapping if you do not want to get the version in the file names.