Take the 2-minute tour ×

I'm using maven to build a ".ear" project that resolves dependencies from a maven repository, and then packages them into an ear (that's probably a redundant sentence...).

When the dependencies show up in the ear file, they're named according to this format:


I'd like them to be named:


Can someone point me in the right direction?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

If you're using the maven-assembly-plugin to build your ear, you can use the outputFileNameMapping property in your descriptor: http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html#class_dependencySet

However, you're probably better off using the maven-ear-plugin, in which case you can customize the bundleFileName, as described here.

share|improve this answer
The maven-ear-plugin requires that I add a bundleFileName for each and every dependent, correct? (I can't specify a pattern that should apply to all of them unless I use maven-assembly-plugin). –  Jared Nov 10 '09 at 16:58
yep, that's my understanding. Although, with the ear plugin, you're technically specifying the modules that you're adding to the ear, not dependencies. –  saleemshafi Nov 10 '09 at 17:28

Set the finalName property. See http://maven.apache.org/plugins/maven-assembly-plugin/assembly-mojo.html for more details

share|improve this answer
This lets me change the name of the final ear file output (which is nice and all,) but what I really want to do is change the name of the dependencies that are inside the ear file, not the ear file itself. (or am I misunderstanding?) –  Jared Nov 10 '09 at 16:45

Your Answer


