Description: Repair all artifact paths that conflict with their hierarchical parent in the given local non-cache repository (on case insensitive database). Dry run can be performed on any local repository.
Prerequisites: On a Maven repository check the "Suppress POM Consistency Check" checkbox in the repository settings panel. This test is only valid for Case Insensitive DataBases.
Since: 3.0.5
Security: Requires admin privileges
Usage: POST /api/repairPaths/{path}[?dry=true]
Produces: application/json
Sample Output:
POST /api/repairPaths/libs-release-local?dry=false { "conflicts": [ { "conflicts": [ "ext-releases-local:org/jdom" ], "path": "ext-releases-local:org/JDOM/test" }, { "conflicts": [ "ext-releases-local:org/jdom" ], "path": "ext-releases-local:org/JDOM/test/build/1/build-1.json" }, ], "message": "Completed", "numConflicts": 2, "numRepaired": 2 }
Be sure to save the output to files so you do not need to run it again, it will take a while and have a medium impact on performance.
4. Shut down all Artifactory nodes
5. Change DB to be case sensitive by running following mysql query
ALTER DATABASE artdb CHARACTER SET utf8 COLLATE utf8_bin;
6. Confirm the change
mysql> SELECT @@character_set_database, @@collation_database;
The result should show utf8_bin as COLLATE
7. Start Artifactory nodes
8. For any Maven local repositories, Suppress POM Consistency Checks (Admin => Local repositories => your maven repository => Basic => Enable "Suppress POM Consistency Checks")
9. Fix the conflicts by running the following REST API (with dry run disabled) for each local repositories
POST http://<your-host>/artifactory/api/repairPaths/<repo>?dry=false
10. Verify the fix by running running the following REST API (with dry run enabled) for each local repositories
POST http://<your-host>/artifactory/api/repairPaths/<repo>?dry=true
POST http://<your-host>/artifactory/api/repairPaths/<repo>?dry=true
11. Re-enable POM Consistency Checkes (Admin => Local repositories => your maven repository => Basic => Uncheck "Suppress POM Consistency Checks")