0

I am using a gradle maven-publish plugin to deploy the artifact in the Artifactory. I can see that a folder with the package is being created but in that folder only the jar file exits and no .pom file exits.

Normally in the artifactory publish examples I have seen that each folder (version) contains the jar file and a .pom file.

My Questions are - 1. Is it necessary to have the supporting .pom file inside the folder? 2. What exactly the .pom functions in there?

Thanks

Myth
  • 86
  • 2
  • 10
  • 1
    Without the extra pom file, it is unlikely that dependencies are resolved correctly. – J Fabian Meier May 26 '20 at 18:13
  • @JFMeier But if I am trying to use the published artifact as dependency I am able to use that - successfully resolved the dependency. – Myth May 26 '20 at 18:27
  • 1
    I mean that the dependencies of your dependency might not be resolved. – J Fabian Meier May 26 '20 at 18:40
  • So, If I add "the dependencies of dependency" in the project as dependencies also then It should not be an issue, right? – Myth May 26 '20 at 19:17
  • 1
    Maybe not. But it would be better to have a proper artifact in Artifactory that also has a POM. – J Fabian Meier May 26 '20 at 19:32
  • @JFMeier thanks for the info. Agreed on proper artifact. But why do you think that adding "the dependencies of dependency" may not work? – Myth May 27 '20 at 14:23
  • 1
    I do not know much about Gradle, but Maven would definitely complain about a missing POM and I would not be sure that the resulting resolution is right. In any case, it is a very poor solution to try to add the dependencies yourself. – J Fabian Meier May 27 '20 at 14:28
  • I know it's a very poor solution. Actually at this moment we don't have control over the artifactory I am referring to. Anyway, thanks for your comment. Cheers – Myth May 28 '20 at 17:44

0 Answers0