Customize the pom for install and upload

(Hans Dockter) #1

Is there a way to apply pom customizations in a #gradle build to both install & uploadArchives tasks at once?

(Hans Dockter) #2

This is possible. Have a look at this sample:

We will make this more convenient in the future.

(Andrew Bayer) #3

Another approach I took was to configure the POM for the installer, and then in the mavenDeployer { } section, I put “pom = installer.repositories.mavenInstaller.pom” - I needed to do this rather than Hans’ approach because I’m configuring the POM from within a plugin, and the deployer wasn’t always available at the time I was trying to configure it.

(Stig Kleppe-Jørgensen) #4

Here is another approach.

It is defining a complete POM in a closure which is reused in both installer and deployer.