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

I'm facing the same issue described here: How can I force maven to leave the version number out of dependency file names? but with the WAR plugin. Looked around but didn't find any solution.

Upvotes: 0

Views: 1143

Answers (1)

Tunaki
Tunaki

Reputation: 137084

You can define file name mappings with the maven-war-plugin. This is done with the outputFileNameMapping of the plugin configuration:

<plugin>
    <artifactId>maven-war-plugin</artifactId>
    <version>2.6</version>
    <configuration>
        <outputFileNameMapping>@{artifactId}@.@{extension}@</outputFileNameMapping>
    </configuration>
</plugin>

With this configuration, each dependency in WEB-INF/lib will be stripped of their version.

Upvotes: 2

Related Questions