Reputation: 11
I have an ant build invoked my jenkins that creates my .ear/.war file but using maven in jenkins to upload archive to Nexus for deployment tool to use.
The archive from ant is titled myear.ear but ends up as myear-version.ear in nexus upon deploy.
I do not want the version number added to the artifact - Any way to avoid this behavior?
Thank You!
Upvotes: 1
Views: 1490
Reputation: 29912
The artifact in the Maven repository will always contain the version number as part of the filename since that is part of the Maven repository format. The filename is artifactId-version[-classifier].packaging.
However that is never really a problem because nothing stops you from downloading it following that naming convention and then changing the name of the downloaded file. And if you dont know the version you can query Nexus for the available versions via the REST API.
Upvotes: 3
Reputation: 893
You can add the finalName configuration inside your pom as below
<build>
<finalName>desiredName</finalName>
</build>
Upvotes: 2