It might happen that your project has the same artifactId for different groups. To avoid file name clashing, specify the full file name mapping.
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-ear-plugin</artifactId> <version>2.7</version> <configuration> [...] <fileNameMapping>full</fileNameMapping> </configuration> </plugin> </plugins> </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.