1

I'm using nexus2artifactory tool to migrate form nexus to artifactory (as tool's name obviously says) and am facing a strange behavior and was wondering if I'm doing something wrong.

I'm trying to migrate some maven repositories created on nexus which handle snapshots and which should be set with UNIQUE as "Maven Snapshot Version Behavior" (default when creating a maven repo in Artifactory) but after the migration all my snapshots repos are set with NON-UNIQUE which is quite annoying especially when using maven3 where the support for uniqueVersion tag was dropped.

Am I alone with this problem ? What can I do to migrate these repos differently ?

Thank you in advance for your kind explanation

Nicko Glayre
  • 1,315
  • 1
  • 10
  • 22
  • Do you need to use `uniqueVersion`? – khmarbaise Jun 20 '17 at 09:26
  • No, I'd like to avoid that as much as possible, however this would be the only solution to get artifacts from a repository set up the way it is now. But anyway this is not supported in maven3 – Nicko Glayre Jun 20 '17 at 09:30

1 Answers1

2

The reason for this behaviour is that the nexus2artifactory tool is using the Artifactory REST API for creating the repositories.
The default value for snapshotVersionBehavior when working with the REST API is non-unique (for legacy reasons).

This should be fixed in the nexus2artifactory tool (and possibly also change the REST API defaults). In the meantime, if you need a quick fix, the following could be added to Artifactory.py:

jsn['snapshotVersionBehavior'] = 'unique'
Dror Bereznitsky
  • 20,048
  • 3
  • 48
  • 57
  • 1
    Thank you very much for this clear explanation, it totally makes sense, I'll try the fix and will also propose a pull request for that (if needed) – Nicko Glayre Jun 21 '17 at 10:31
  • 1
    As written above, here is a proposal as a PR on the relevant repo: https://github.com/JFrogDev/nexus2artifactory/pull/6 – Nicko Glayre Jun 21 '17 at 15:52