Closed mricciuti closed 7 months ago
I guess the issue comes from this: https://github.com/jfrog/artifactory-gradle-plugin/pull/82/files#diff-4ce16214779b229631529a9e909aae5d4c4a3b1b6d8aff171f9705228936e42dR67
in case of multiple maven publications in the same gradle project: this "findFirst(..)
will make POM coordinates resolution for each publication fail .
Problem looks to be broader/more generic than just Gradle plug-ins. We have a different build that publishes multiple publications/POM files/artifacts, and we are having the same problem (it crosses the wrong Maven POM coordinates with the wrong publications).
In a multi-module project where modules publish their artifacts, we see for xx module:
> Task :artifactoryDeploy
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':xx:artifactoryPublish'.
> Cannot collect deploy details for :xx:artifactoryPublish
module and pom files have been published, the jar was missing This happens with Gradle 8.1.1. Downgrading artifactory plugin to 5.1.10 restores the correct behavior.
Verified that this is affecting our publications as well, we are reverting to 5.1.10 until this is fixed.
@tinca @mricciuti @JosephWitthuhnTR @bmeier-pros Thanks for reporting this issue! We created https://github.com/jfrog/artifactory-gradle-plugin/pull/88 to fix it. We'll keep you updated.
@tinca @mricciuti @JosephWitthuhnTR @bmeier-pros Gradle Artifactory plugin 5.1.12 has been released. This version includes the fix for this issue. We'd appreciate your feedback on that.
Thanks for the quick fix (have not checked yet)!
Hi @yahavi , I have tested my scenario with this new version, it does fix the issue with Gradle plugins publication. I have not checked other cases reported on this issue ,but I guess these should be fixed as well.
Thanks !
This fixed our use case as well. Thanks!
Hi @yahavi, I have also verified our use case is resolved. Thank you!
Describe the bug
Latest plugin version
5.1.11
introduced some changes in artefact publication descriptor handling to get rid of Gradle deprecated/deleted internal APIs, in order to support Gradle 8.4+ version. (see https://github.com/jfrog/artifactory-gradle-plugin/issues/75) .A side effect is that it's no longer possible to publish multiple Maven publication artefacts from a single Gradle project: the POM publishing is not correctly handled which makes the
artifactoryDeploy
task fail.A example of scenario which now fails with this new plugin version: trying to publish Gradle plugin to a custom repository
Current behavior
When trying to publish a Gradle plugin to a custom Artifactory server (see below for a sample gradle projet setup to reproduce the isssue):
It looks like POM descriptor for the plugin library is not computed properly: POM details are taken from the plugin marker artefact, the coordinates are not the expected ones.
Reproduction steps
Example of project setup to reproduce the error:
com.gradle.plugin-publish
plugin )/src/main/java/org/gradle/sample/plugin/GreetingPlugin.java
Expected behavior
The Artifactory plugin should publish all expected artefacts and/or corresponding POM descriptors without error.
Artifactory Gradle plugin version
5.1.11
Operating system type and version
Windows 11
JFrog Artifactory version
7.49.10
Gradle version
8.4