Probably it would be better to do it for all configurations and even without filtering by it.version == ‘latest.release’. Just overwrite all.
By the way, why maven plugin doesn’t do it by default? Or maybe there is some simpler approach available via its API?
It rather doesn’t make sense, to generate POM upon deploying to maven repo and then not being able to use deployed artifact as maven dependency because any maven build will fail on unrecognised version of transitive dependencies.
Thanks Peter, Is there a workaround to this? i.e. if we use Artifactory and dependencies can have either latest.release or latest.integration. Can both be resolved before pom is uploaded.