jfrog / artifactory-maven-plugin

A Maven plugin to resolve artifacts from Artifactory, deploy artifacts to Artifactory, capture and publish build info.
https://www.jfrog.com/confluence/display/JFROG/Maven+Artifactory+Plugin
Apache License 2.0
24 stars 26 forks source link

Support for Artifactory Projects #21

Closed lsilvapvt closed 2 years ago

lsilvapvt commented 3 years ago

What: Provide support for Artifactory Projects, allowing users to set the projectId to which they want to publish artifacts and build information.

Why: Currently, build information is always published to the default artifactory-build-info repository. This will not work anymore for an organization that is using Artifactory Projects and that uses the pattern of only allowing developers/CI to only publish such artifacts/metadata to their respective projects. In this case, such teams should be allowed to publish builds via the maven plugin to the corresponding myproject-build-info repository of their Artifactory project.

A potential solution for this use case might be to allow users to provide the projectId as an optional parameter in the plugin configuration input (e.g. a project tag under the publisher group) which would, in turn, be used along with the corresponding underlying REST API calls as a parameter.

jghal commented 2 years ago

I just found this after poking in the plugin source to see if it was just an undocumented parameter within the buildInfo. It looks like the underlaying build-info-extractor v2.26.4 library does support setProject and getProject methods. So this should be supportable in the Maven plugin config.

eyalbe4 commented 2 years ago

@jghal and @lsilvapvt, Thanks for asking and looking into this. Adding support for Projects is part of our work plan, and we'll get to adding it in a few weeks time.

sverdlov93 commented 2 years ago

Hi @lsilvapvt and @jghal, artifactory-maven-plugin 3.4.0 is released and contains support for Artifactory Projects. Looking forward to your feedback on it.

lsilvapvt commented 2 years ago

thanks a lot @sverdlov93 , that is great news!