问题
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?
回答1:
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.
回答2:
Set the finalName property. See http://maven.apache.org/plugins/maven-assembly-plugin/assembly-mojo.html for more details
来源:https://stackoverflow.com/questions/1709290/how-can-i-force-maven-to-leave-the-version-number-out-of-dependency-file-names