I am building a native project, and I have to build for multiple architectures. (Rhel 4 and Rhel 5).
My artifacts use classifiers, such that my artifact ‘fooBar’ version 3.11 would have the following artifact names:
This is nice because they sit nicely next to each other in artifactory as they are both the library. The problem is the .pom file.
Both of the above mentioned artifacts are built separately (due to the architectures they’re built for) and published separately. The problem is that the pom file gradle is publishing is called: fooBar-3.11.pom
This is a problem which ever of the artifacts is built second, replaces the existing .pom file with its own. So if Rhel 4 publishes first, then Rhel 5 publishes… the .pom file will contain only the rhel 5 dependencies for the pom.
I have checked and proved that naming the .pom files:
works perfectly as a solution. Gradle and Artifactory are smart enough to use correctly classified .pom file.
Problem: How to get gradle to publish a pom file WITH a classifier?
I’ve found lots of stuff about modifying the contents of a pom… and I found where the .pom files are placed in the build folder. But… in the build folder it is pom-default.xml, so obviously the file is renamed when it is published.
I am publishing with the jFrog gradle artifactory plugin… but I’m not sure if the issue is with that… or the maven publisher code.
My current theory is to disable the default pom publishing and generate an artifact containing just the pom I want to be published as well as my tar artifact…