I've been suffering this problem for a while now and can't figure out what the issue might be. It is intermittent which is why I give it half an hour here and there to try to solve it but then end up giving up until I get fed up enough to try again. Now I'm fed up enough to come here and cry about it.
It seems my Maven installation/setup for some reason often won't resolve the version number for dependencies. I think it's only transitive dependencies but not entirely sure. What happens is sometimes when I build my project Maven will try to download dependencies from Artifactory paths where the version number has not been resolved. It will look something like this:
[INFO] --- maven-dependency-plugin:3.3.0:copy (copy-shared-lib) @ myApp ---
Downloading from artifactory: https://repourl:443/artifactory/maven-repo/org/apache/maven/doxia/doxia-sink-api/$%7Bproject.version%7D/doxia-sink-api-$%7Bproject.version%7D.pom
and then this happens for a bunch of dependencies (not only org/apache/maven/...) and it "corrupts" my local maven repo with lots of ${project.version}
folders.
The most annoying thing about this is that it's completely intermittent. Often just re-running the target a few times and eventually it works. There's like a 20-80% success rate depending on the day.
Downgrading my proj to earlier versions or even not specifying versions and going with maven defaults have not resolved the issue.
I'm asking first without including a lot of info about my maven config in case someone just knows what it might be but am of course happy to add info if requested.
Edit: this is a bit ironic to see:
And it looks like this for the last few versions of most plugins. Not a given it's related to my issue but it's a similar symptom.