I’m trying to have Gradle upload a “Bills of Materials” POM file to Artifactory.
I already have a working project which deploys a POM file and a dummy jar file. However this doesn’t work because the “packaging” inside the POM file is set to “jar” (because I apply the “java” plugin).
I tried to force the packaging to “pom” by using the available callbacks but then the upload to Artifactory fails with an HTTP 409 (Conflict) error. I suppose this is caused because I upload a jar file but the packaging of the associated POM file is set to “pom” (instead of jar) so Artifactory complains.
I tried to stop generating the jar file but in this case nothing gets uploaded.
What’s the theory for having a Gradle build publish a unique POM file to Artifactory ? It seems that using the ‘maven’ plugin is not the way to go.
Any piece of advice would be greatly appreciated !
I know this is old, but I had the same problem, so maybe this helps somebody else, too.
Also if there’s a better way, I’d really like to now, because this seems archaic.
I have an existing Bill-Of-Material pom.xml that is exactly 1555 lines long. It is carefully tuned to fix all (transitive) dependency versions, apply exclusion rules and provide properties to the build.
I really, really, do not want to convert that to gradle format.
Also for a while both maven and gradle builds will co-exist. Having a single BOM for both simplifies matters a lot.
Currently we are using the ‘io.spring.dependency-management’ plugin to read in the pom.
It sounds like a very, very simple task: Just take this pom.xml and publish it.