eclipse-birt / birt

Eclipse BIRT™ The open source reporting and data visualization project.
http://www.eclipse.org/birt
Eclipse Public License 2.0
427 stars 387 forks source link

Publish Maven Build To Central #625

Open pipebaum opened 3 years ago

pipebaum commented 3 years ago

Currently, there is no automated feature to publish the BIRT-Runtime to Maven. Wouldn't it be nice to fix this.

pipebaum commented 3 years ago

@wimjongman Do you or anyone you know have experiencing setting this up? What we would like is to be able to automatically deploy/publish the Runtime to Maven Central. To date, we have been doing this by hand, it would be great if we could do this in the easiest way possible. @SteveSchafer-Innovent

wimjongman commented 3 years ago

I have tried once and failed...

However, it seems doable with some focus.

https://docs.github.com/en/actions/guides/publishing-java-packages-with-maven https://dzone.com/articles/publish-your-artifacts-to-maven-central

pipebaum commented 3 years ago

Thanks Wim,

We will take a look in the upcoming days using those links.

Scott

On Thu, Apr 29, 2021 at 1:46 PM Wim Jongman @.***> wrote:

I have tried once and failed...

However, it seems doable with some focus.

https://docs.github.com/en/actions/guides/publishing-java-packages-with-maven https://dzone.com/articles/publish-your-artifacts-to-maven-central

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/eclipse/birt/issues/625#issuecomment-829501061, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKF2BOJ6UWXBORNJMMBOLLTLGSO5ANCNFSM4ZYBQNVA .

-- Scott Rosenbaum Innovent Solutions, Inc. 612 220 6006 cell

martins-1992 commented 2 years ago

Hello there, we are currently working on integrating BIRT into a private service for report generation. We noticed that there is currently no public build release of the BIRT runtime.

We were able to build the BIRT runtime locally and will probably integrate the runtime by using the build jars as dependencies.

Can we help you, in order to get a public build release on Maven Central?

wimjongman commented 2 years ago

Can we help you, in order to get a public build release on Maven Central?

Yes, that would be great. You can create PR's referencing this issue.

martins-1992 commented 2 years ago

What are the release problems?

martins-1992 commented 2 years ago

We could setup a release workflow, where a release is uploaded to Github first and find issues with the build process that way.

We have done it for our project as well: https://github.com/minova-afis/aero.minova.core.application.system/blob/master/.github/workflows/release.yml

The only thing needed to my knowledge are a username and an access token for Github, as a secret in the project.

wimjongman commented 2 years ago

@splitcells, @pipebaum can we re-start working on this?

martins-1992 commented 2 years ago

@wimjongman It is not known, what is needed or if a Maven Central release is desired.

JacquesLeRoux commented 2 years ago

Hi,

I'm not sure what your problem is, but for sure a Maven Central release is desired by us, see https://github.com/eclipse/birt/discussions/863

wimjongman commented 2 years ago

This is what is currently inside the maven repo [1]. Our official build is in Jenkins [2].

[1] https://mvnrepository.com/artifact/org.eclipse.birt [2] https://ci.eclipse.org/birt/

martins-1992 commented 2 years ago

Which one is the release workflow or what are the commands used for release? Is it this one? https://ci.eclipse.org/birt/job/populate-build-lists/

wimjongman commented 2 years ago

The birt-master job creates all the artifacts. The artifacts are then uploaded here [1]

We used to have a process to make milestones and release candidates but we are going to skip that for now.

Finally, there will be a job that will move the artifacts from the downloads/snapshots and update-site/snapshots to a final release location.

Then there could be another job that uploads these artifacts to maven central. I guess the artifacts to upload are the bundles in update-site/snapshots/plugins

[1] https://download.eclipse.org/birt/

martins-1992 commented 2 years ago

You mentioned earlier, that you tried something? What are the commands executed for the release? What were the errors?

That way, we have a common process to start from.

wimjongman commented 2 years ago

I have tried once and failed...

That was for a different project and a long while ago.

SteveSchafer-Innovent commented 2 years ago

I can take this on and I'd like to publish 4.9 manually to make sure all the requirements are met before automating it. Maybe have automation a goal for 4.10.

Do we want to publish just the runtime or everything?

pipebaum commented 2 years ago

+1 to doing a manual build for now and get the automated build into 8.10

I think that we should just publish the Runtime, if people want to use the design elements, I think they would use a different path.

Scott

On Wed, Mar 16, 2022 at 3:36 PM Steve Schafer @.***> wrote:

I can take this on and I'd like to publish 8.9 manually to make sure all the requirements are met before automating it. Maybe have automation a goal for 8.10.

Do we want to publish just the runtime or everything?

— Reply to this email directly, view it on GitHub https://github.com/eclipse/birt/issues/625#issuecomment-1069605490, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKF2BN4YYU5TJBPBBGQG7TVAJA4JANCNFSM4ZYBQNVA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

-- Scott Rosenbaum Innovent Solutions, Inc. 612 220 6006 cell

JacquesLeRoux commented 2 years ago

Yes, it's 4.9 not 8.9 ;)

wimjongman commented 2 years ago

Thanks, Steve!

I'm not sure what is meant with the Runtime. This is what is currently on maven:

https://mvnrepository.com/artifact/org.eclipse.birt

JacquesLeRoux commented 2 years ago

If that's of any help, this is what I'm interested with: https://mvnrepository.com/artifact/org.eclipse.birt.runtime/viewservlets

What I'm looking for is a security fix: https://github.com/eclipse/birt/discussions/863

cristatus commented 2 years ago

Quite happy to see BIRT is alive again :)

We are stuck on 4.4.2 and would love to upgrade 4.9.0 but need maven artifacts in central. BTW, the 4.4.2 runtime artifact loads lots of dependencies, better if most of the data connectors are made separate artifacts.

wimjongman commented 2 years ago

Thanks, Amit. We are looking forward to your patches ;)

Tostino commented 2 years ago

Also quite interested in seeing this published to Maven. Would appreciate both the runtime and also viewservlets.

Super excited to see activity in this project again!

hvbtup commented 2 years ago

birt.war is part of the runtime.

SteveSchafer-Innovent commented 2 years ago

Thanks, Steve!

I'm not sure what is meant with the Runtime. This is what is currently on maven:

https://mvnrepository.com/artifact/org.eclipse.birt

When I think of runtime I think of what's built into build/birt-packages/birt-runtime/target and also what we could download called "birt runtime". It includes all the classes you need to be able to generate BIRT reports in your own application. It also includes the web app and the war file. I think when people want a maven repo, it's so they can conveniently include the necessary classes in their own app.

I'll need to find out if there's a way to build the runtime independently or construct a pom that will do that. That will be the root and then everything it depends on will need to be also published to central. All the pom's will need to meet the maven requirements including <licenses>, <scm>, and PGP signatures. Since this will involved a lot of changes to pom.xml files and 4.9 is now frozen I'll probably need to publish from my fork in order to publish 4.9. Once we get 4.9 successfully published we can make sure 4.10 is ready to go.

https://maven.apache.org/repository/guide-central-repository-upload.html

When I published 4.8 under the Innovent name I pushed all the jar files to Sonatype OSSRH. There is also a mechanism for running your own repository manager. That might be overkill for us but let me know what you think.

https://central.sonatype.org/publish/large-orgs/

wimjongman commented 2 years ago

Sounds good Steve. I don't think we need our own repo manager, but you be the judge.

I am happy to release 4.10 early, there is no reason to postpone a release when we have some great new stuff to offer.

Here is a link to the platform publish wiki: https://wiki.eclipse.org/Platform-releng/Publish_to_Maven_Central

SteveSchafer-Innovent commented 2 years ago

I can publish to the group com.innoventsolutions, but in order to publish to org.eclipse or any sub-groups, I would need the sonatype jira credentials of whoever owns org.eclipse.

JacquesLeRoux commented 2 years ago

It would be quite better if it was under org.eclipse.

martins-1992 commented 2 years ago

@SteveSchafer-Innovent

I can publish to the group com.innoventsolutions, but in order to publish to org.eclipse or any sub-groups, I would need the sonatype jira credentials of whoever owns org.eclipse.

What commands are you using? mvn release:prepare & release:perform? Will the commands be added to the repo?

Sry, for the noobish question.

SteveSchafer-Innovent commented 2 years ago

@splitcells, although I have published to central before I haven't published using maven so I'm just as much a noob as you are in that area, but I can say that any modifications to the pom files will be part of the repo. My comments about group ownership came from reading https://central.sonatype.org/publish/requirements/coordinates/#choose-your-coordinates.

wimjongman commented 2 years ago

The maven publisher needs to run on birt CI https://ci.eclipse.org/birt

I see that the jgit project also publishes to maven. Maybe you can ask around in the jgit mailing list for hints on how to get started. You can also ask the Eclipse Foundation for support. Just file an issue here: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues

SteveSchafer-Innovent commented 2 years ago

What is the relationship between github and ci.eclipse.org? When a PR is built on github is that happening on ci.eclipse.org, or are they independent?

ruspl-afed commented 2 years ago

They are independent. Github is serving as CI while eclipse.org is mostly used for CD purposes.

wimjongman commented 2 years ago

Correct. ci.eclipse.org/birt is a Jenkins instance. Whenever a PR is accepted, a new snapshot is built on ci. Then when we release we copy a snapshot build to the official version directories. The ci is our official build channel. It copies to download.eclipse.org, signs the builds, etc..

Github actions run whenever someone creates a pr, it runs the tests, etc..

SteveSchafer-Innovent commented 2 years ago

So we can add the various things like the maven-deploy-plugin and maven-release-plugin to one or more pom's. We don't want github to publish snapshots on every PR build so if there is no ossrh credentials in ci.yml then hopefully the PR build will ignore the maven artifacts. Then I need to figure out how to configure jenkins so it has the ossrh credentials and can execute the deployment. Anyway I don't have the ossrh credentials for org.eclipse so maybe someone else needs to do that.

JacquesLeRoux commented 2 years ago

Hi @SteveSchafer-Innovent ,

Maybe in the meantime you could publish to the group com.innoventsolutions?

wimjongman commented 2 years ago

That is legally not possible. Please don't take shortcuts on this.

JacquesLeRoux commented 2 years ago

This was done before, that's why I suggested it. Or maybe not exactly the official version was published then?

wimjongman commented 2 years ago

Maybe Innovent published their own version of BIRT but this is not something that can come from us. Obviously, Innovent can do what they want with BIRT, within the rules of engagement, but that is outside our mission.

It would be very confusing if Innovent would publish our binaries on maven.

JacquesLeRoux commented 2 years ago

Yes, of course

SteveSchafer-Innovent commented 2 years ago

From what I've read, I should be able to post a bug asking for the credentials and GPG key for org.eclipse. I'm going to try that and see where it gets me.

wimjongman commented 2 years ago

The new issue location is here: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues

Could you please post the issue link back here?

SteveSchafer-Innovent commented 2 years ago

I just created this new issue: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/1077

SteveSchafer-Innovent commented 2 years ago

The issue has been closed, and as I understand it, settings.xml has been changed on ci.eclipse.org/birt. I modified the root-level pom.xml to include <distributionManagement>, and the nexus-staging-plugin-maven, maven-source-plugin, maven-javadoc-plugin, and maven-gpg-plugin plugins, but in order to keep my local build from failing, I put all those plugins in a new profile named "release". Now I think ci.eclipse.org/birt needs to be modified to invoke this profile but I don't know what's the appropriate way to do that.

JacquesLeRoux commented 2 years ago

Sounds promising, looking forward :)

SteveSchafer-Innovent commented 2 years ago

Here's what I'm trying to figure out:

Constraint: Publishing to Maven Central must be done through ci.eclipse.org because that's where the credentials for org.eclipse are.

Goal: Publish BIRT 4.9 to Maven Central.

Question: Can I make changes to 4.9 pom's and have it processed through ci.eclipse.org?

I'm trying to understand what I'm doing before I pull the trigger and mess something up.

wimjongman commented 2 years ago

Steve, there are no 4.9 poms anymore. You would have to make a branch from the 4.9 branch and then modify and build from that branch. Later these would have to be merged back in the 4.10 stream.

Is it not possible to make a deploy script that publishes what is in the 4.9 repo?

Best regards,

Wim Jongman


From: Steve Schafer @.> Sent: Saturday, April 2, 2022 4:00:34 PM To: eclipse/birt @.> Cc: Wim Jongman @.>; Mention @.> Subject: Re: [eclipse/birt] Publish Maven Build To Central (#625)

Here's what I'm trying to figure out:

Constraint: Publishing to Maven Central must be done through ci.eclipse.org because that's where the credentials for org.eclipse are.

Goal: Publish BIRT 4.9 to Maven Central.

Question: Can I make changes to 4.9 pom's and have it processed through ci.eclipse.org?

I'm trying to understand what I'm doing before I pull the trigger and mess something up.

— Reply to this email directly, view it on GitHubhttps://github.com/eclipse/birt/issues/625#issuecomment-1086647133, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AABMF2MTVVWH2H6P6BWKYKLVDBHIFANCNFSM4ZYBQNVA. You are receiving this because you were mentioned.Message ID: @.***>

SteveSchafer-Innovent commented 2 years ago

Okay, I think I see a way forward. 1) create a new branch based on birt_4_9_0 branch. I think I can do this directly but if it's preferable to do it in a fork with PR's let me know. 2) modify the pom in that branch to add the new profile. 3) create a new item in jenkins to build that branch with that profile.

wimjongman commented 2 years ago

Yes that sounds like a plan.

Alternatively you can make a new project 'org.eclipse.maven.deploy' that contains the new profile and build that in a new Jenkins job.

Best regards,

Wim Jongman


From: Steve Schafer @.> Sent: Saturday, April 2, 2022 10:56:13 PM To: eclipse/birt @.> Cc: Wim Jongman @.>; Mention @.> Subject: Re: [eclipse/birt] Publish Maven Build To Central (#625)

Okay, I think I see a way forward. 1) create a new branch based on birt_4_9_0 branch. I think I can do this directly but if it's preferable to do it in a fork with PR's let me know. 2) modify the pom in that branch to add the new profile. 3) create a new item in jenkins to build that branch with that profile.

— Reply to this email directly, view it on GitHubhttps://github.com/eclipse/birt/issues/625#issuecomment-1086721800, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AABMF2OGOT6E5ZO5J3O3WULVDCX63ANCNFSM4ZYBQNVA. You are receiving this because you were mentioned.Message ID: @.***>

SteveSchafer-Innovent commented 2 years ago

Seems like I'll need to do this through a PR because it's not letting me push directly. Update: I had it set up incorrectly. I was able to push branch 'BIRT_4.9.0_maven'. Created 'birt_4.9.0_maven' in ci.eclipse.org by mostly copying from master except to use the BIRT_4.9.0_branch and the 'release' profile.