prometheus-exporter-plugin-for-opensearch icon indicating copy to clipboard operation
prometheus-exporter-plugin-for-opensearch copied to clipboard

publish releases to maven

Open rursprung opened this issue 2 years ago • 13 comments

it'd be great if you could publish your releases to maven (we use it to manage our dependencies, incl. opensearch & opensearch plugins).

you can use the opensearch.pluginzip gradle plugin for this: see the opensearch plugins documentation on this and https://github.com/opensearch-project/opensearch-build/issues/1916.

rursprung avatar Jun 16 '22 10:06 rursprung

Hi @rursprung

If I read it correctly you would like to have the apply plugin: 'opensearch.pluginzip' be added to build.gradle so that you can call the new custom publish task publishPluginZipPublicationToZipStagingRepositoryand to have the plugin ZIP be pushed into mvn repo of your choice?

Do I get correctly?

lukas-vlcek avatar Jun 20 '22 15:06 lukas-vlcek

not quite: the idea would be that the publish would happen as part of your normal release, so that it's on maven central (or any other public maven repo). then it can be pulled in by everyone who needs it (or manually downloaded; same as through the GH releases page - that way it can act as a mirror as well). but yes, this happens - partially - through that plugin. i haven't used that plugin, so i'm not 100% sure how much of the publishing it automates away, but it's being added to all plugins under the opensearch organisation (some have already done it, others still have an open ticket for it).

rursprung avatar Jun 20 '22 15:06 rursprung

I was looking at this and I ran into some issues, see https://github.com/opensearch-project/OpenSearch/issues/3649 It seems the bug will be fixed soon (kudos to @reta) but we will be able to benefit from it only after new OpenSearch release with the fix is out.

I will keep the ticket open but for the time being the status is: "We are waiting for the (OpenSearch) upstream and new release."

lukas-vlcek avatar Jun 23 '22 09:06 lukas-vlcek

@lukas-vlcek you could remove url & scm section from pluginzip publishing goal for now - those are picked up from the build anyway (the scm protocol is slightly different but not a big deal right now).

reta avatar Jun 23 '22 12:06 reta

I think this is also related: https://github.com/opensearch-project/OpenSearch/issues/3692

lukas-vlcek avatar Jun 24 '22 17:06 lukas-vlcek

@rursprung based on the discussion in https://github.com/opensearch-project/OpenSearch/issues/3692 I will "friendly" close this ticket as won't fix. Once OpenSearch enables custom groupId values in POM we can revisit it.

lukas-vlcek avatar Jun 27 '22 15:06 lukas-vlcek

Status update:

  • A blog post about the ZIP pom publication plugin has been published: https://opensearch.org/blog/technical-post/2022/08/opensearch-plugin-zips-now-in-maven-repo/
  • A PR to allow maven pom groupId customization is being reviewed: https://github.com/opensearch-project/OpenSearch/pull/4156

lukas-vlcek avatar Aug 29 '22 13:08 lukas-vlcek

Update:

  • The Zip publication POM groupId customization will be available starting with OpenSearch release v2.4: https://github.com/opensearch-project/opensearch-build/issues/2521

Once the OpenSearch release 2.4 is out we can re-open this ticket.

lukas-vlcek avatar Nov 03 '22 09:11 lukas-vlcek

@lukas-vlcek 2.4 is out, i guess this can be re-opened? (not something that i can do) 🙂 thanks a lot for all your heavy work on the publishing mechanism!

rursprung avatar Nov 28 '22 11:11 rursprung

Sure, we can now continue.

I think one of the changes I would like to do first is changing the "package" name of internal classes to something that will match the groupId in the maven repo. Perhaps to something like io.aiven.plugin or similar. Definitely not org.opensearch because that is already taken by the core OpenSearch plugins.

(Although it is possible to override the groupId in gradle publication task I would rather use package name that is really used by the plugin in the code, hence the change ^^)

lukas-vlcek avatar Dec 01 '22 15:12 lukas-vlcek

@lukas-vlcek: do you think it'd now be possible to pick this up? the packages are still named org.opensearch.[..], not sure if you've already picked a new name? thanks!

rursprung avatar Mar 06 '23 11:03 rursprung

Hello, any plans for this to be worked on in the near future? Btw, thanks a lot for releasing and maintaining this project!

dancristiancecoi avatar Aug 03 '23 13:08 dancristiancecoi

Right, I will start working on that too.

It will need to become part of the release process. The following are some articles to start with:

lukas-vlcek avatar Aug 04 '23 08:08 lukas-vlcek