0

I have a problem with deploying artifacts into artifactory with just one version for now.

Currently, if I deploy my artifact via mvn deploy, always a new version is generated in artifactory e.g.

Commons-0.0.1-20131122.222911-4
Commons-0.0.1-20131122.232912-5
Commons-0.0.1-20131122.242913-6

How is it possible to only deploy ONE version (overwrite existing artifacts) e.g. Common-0.0.1-SNAPSHOT or a kind of this into artifactory via maven?

For now I have only a <distributionManagement> section in my pom.xml and ID definitions.

marc3l
  • 2,525
  • 7
  • 34
  • 62

1 Answers1

2

You can change this in Artifactory repository settings. There is a setting Maven Snapshot Version Behavior. If it is set to unique, it will not overwrite artifacts until the limit of Max Unique Snapshots is reached. You can change that limit to 1 or set the behavior to Nonunique.

See the documentation here.

Stephan
  • 4,395
  • 3
  • 26
  • 49
  • 2
    I'd suggest avoiding Nonunique snapshots, and put a number a bit larger than 1. 3 is a good choice - it will keep the repository small (the oridingal intend of @marcel-holl) and will keep couple of previous versions in case he needs them. – JBaruch Nov 24 '13 at 07:51