A.R.K.S
A.R.K.S

Reputation: 1802

Maven: remove "-version-SNAPSHOT" suffix from downloaded dependencies

I'm using <finalName> in build section of maven to rename my-artifact-<project.version>-SNAPSHOT.jar to my-artifact.jar, I see that the resulting artifact is renamed as expected in my target folder but when the same artifact is specified as a dependency in a different module, it downloads it as my-artifact-<project.version>-SNAPSHOT.jar in this modules target WEB-INF/lib/. Is there a way to get the renamed version to be downloaded as dependency?

I don't need the version number attached as I'm running maven build in a dockerized build environment.

Upvotes: 0

Views: 951

Answers (1)

J Fabian Meier
J Fabian Meier

Reputation: 35805

I assume you are building a war.

Then you can specify the file name of libraries inside the war with outputFileNameMapping:

http://maven.apache.org/plugins/maven-war-plugin/examples/file-name-mapping.html

Upvotes: 3

Related Questions