Jared
Jared

Reputation: 26149

How can I force maven to leave the version number out of dependency file names?

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:

<artifactId>-<version>.<type>

I'd like them to be named:

<artifactId>.<type>

Can someone point me in the right direction?

Upvotes: 2

Views: 3839

Answers (2)

saleemshafi
saleemshafi

Reputation: 1161

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.

Upvotes: 5

Rob Di Marco
Rob Di Marco

Reputation: 44992

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

Upvotes: 1

Related Questions