The property the error refers to is not Artifactory property, but Groovy object property. In line 4 you have item.targetRepoKey
, while it should be item.repoKey
.
I strongly recommend you using a proper IDE (IntelliJ IDEA) and using trypes in your code e.g. line 1 should be:
beforeMove { FileInfo item, RepoPath taretRepoPath, Properties properties ->
That can save you time struggling with such errors.