Hi, Matthew,
You are right, this is really file mvn-scalafmt_2.12-1.0.3.pom file.
But when I upload it into nexus maven hosted repository I see mvn-scalafmt_${version.scala.major}-1.0.3.pom file. I believe if nexus can parse pom, it can find not only < artifactId>mvn-scalafmt_${version.scala.major}< /artifact>
but <version.scala.major>2.12</version.scala.major> as well.
You haven’t really said how you’re doing this, but I’m guessing using the Upload UI, or the Upload REST API (rather than the maven methods).
The code there doesn’t resolve the pom, it just parses the fields - there is code to fail when the entire field requires resolving the pom. (i.e. ${some.property}) If you like you can open a bug at issues.sonatype.org but likely the fix here would be to fail if any part of the field requires resolving the pom. (Properly resolving the pom requires the context of the entire pom hierarchy.)
I’d recommend just uploading the file to the desired location using curl or similar.