How can I detect the version of an artifact in uploadArchives? The “name” property contains only the base name. The “classifier” is empty.
By default the version will be the version of the project and classifier will be empty unless specified.
This works only if the version of the artifact match the project version. In the other case the version is in the name property. Very curiosity. I think this can not change anymore for compatibility. But additional properties can solve like baseName and version.
Uploading an artifact with a version different from the project version isn’t possible with the
uploadArchives publishing mechanism. You’ll have to use the new publishing plugins if you want to do that.