There are at least 3 commonly used plugins to publish artifacts to Artifactory:
I’d like to publish snapshot artifacts to a snapshot repository (e.g. libs-snapshot-local) and release artifacts to a release repository (e.g. libs-release-local).
I’d also like to be able to specify the version for the artifacts via a parameter for the buildscript.
Which plugin is recommended for this scenario? Is there an example configuration available somewhere?
I’ve used the Gradle Artifactory plugin in the past, but found it quite cumbersome and verbose to configure it properly.
The maven-publish plugin has been incubating forever, but since it still seems to be the successor of the original maven plugin, I gave it a try. Unfortunately, it only seems to work if you configure it with static info (group, artifact id, version, …). If you want to configure something dynamically, it barfs out with “Cannot configure the ‘publishing’ extension after it has been accessed.”. I did not manage to find a solution for that.
I’ve not used the old maven plugin before, because I expected it to go away. What are the plans for this one?
Also, I think what I’m trying to do is very standard, so it should be easy to configure. However, neither the Gradle docs nor the Artifactory docs provide an example for it.
I’d really appreciate it if someone could provide some insight on this.