Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publishing jars to Sonatype (maven central) does not work during release. #1722

Open
jcpitre opened this issue Mar 20, 2024 · 1 comment
Open
Labels
bug Something isn't working (crash, a rule has a problem) status: Needs triage Applied to all new issues
Milestone

Comments

@jcpitre
Copy link
Contributor

jcpitre commented Mar 20, 2024

Describe the bug

In publish_assets.yml, one section is devoted to uploading the jars to Sonatype. This github workflow is triggered when a release is created.

During the pre-release of 5.0, there was no reported error in the logs (See this - these logs will be removed after a while. In that case see the raw logs: upload-release-assets-5.0.0-logs.txt)
Yet when checking Sonatype no jars were uploaded (See RELEASE.md for how to check that)

Here is what the logs show about compiling the jars (See [upload-release-assets-5.0.0-logs.txt]

> Task :publish UP-TO-DATE
> Task :model:compileJava UP-TO-DATE
> Task :model:processResources NO-SOURCE
> Task :model:classes UP-TO-DATE
> Task :model:jar UP-TO-DATE
> Task :processor:notices:compileJava UP-TO-DATE
> Task :processor:notices:processResources NO-SOURCE
> Task :processor:notices:classes UP-TO-DATE
> Task :processor:notices:jar UP-TO-DATE
> Task :core:compileJava UP-TO-DATE
> Task :core:processResources NO-SOURCE
> Task :core:classes UP-TO-DATE
> Task :core:jar UP-TO-DATE
> Task :core:generateMetadataFileForMavenJavaPublication
> Task :core:generatePomFileForMavenJavaPublication
> Task :core:javadoc
> Task :core:javadocJar
> Task :core:sourcesJar
> Task :core:signMavenJavaPublication
> Task :core:publishMavenJavaPublicationToMavenRepository
> Task :core:publish
> Task :processor:compileJava UP-TO-DATE
> Task :processor:processResources NO-SOURCE
> Task :processor:classes UP-TO-DATE
> Task :processor:jar UP-TO-DATE
> Task :main:compileJava UP-TO-DATE
> Task :main:processResources UP-TO-DATE
> Task :main:classes UP-TO-DATE
> Task :main:jar UP-TO-DATE
> Task :main:generateMetadataFileForMavenJavaPublication
> Task :main:generatePomFileForMavenJavaPublication
> Task :main:javadoc
> Task :main:javadocJar
> Task :main:sourcesJar
> Task :main:signMavenJavaPublication
> Task :main:publishMavenJavaPublicationToMavenRepository
> Task :main:publish
> Task :model:generateMetadataFileForMavenJavaPublication
> Task :model:generatePomFileForMavenJavaPublication
> Task :model:javadoc
> Task :model:javadocJar
> Task :model:sourcesJar
> Task :model:signMavenJavaPublication
> Task :model:publishMavenJavaPublicationToMavenRepository
> Task :model:publish
BUILD SUCCESSFUL in 23s
32 actionable tasks: 21 executed, 11 up-to-date

It seem some tasks were not executed beecause are considered UP-TO-DATE. It makes sense in a way since the CLI was compiled in a previous step, so some stuff is already compiled.

I ran the publish by hand:
./gradlew publish --info -x verifyGoogleJavaFormat

(You need to set these environment variables to run the gradle command:
MAVEN_GPG_PRIVATE_KEY
MAVEN_GPG_PASSPHRASE
SONATYPE_USERNAME
SONATYPE_PASSWORD
)

And it worked, ie the jars were loaded.
32 actionable tasks: 31 executed, 1 up-to-date

See these logs for the manually run gradle:
manual-gradle-publish-logs.txt

Steps/Code to Reproduce

Not sure it's reproducible.
I suggest creating a dummy release (like v100.0.0) and see if it recurs.

Expected Results

Jars are uploaded to sonatype
See RELEASE.md for how to check that

Actual Results

Nothing was uploaded.

Screenshots

No response

Files used

No response

Validator version

5.0.0

Operating system

irrelevant

Java version

No response

Additional notes

No response

@jcpitre jcpitre added bug Something isn't working (crash, a rule has a problem) status: Needs triage Applied to all new issues labels Mar 20, 2024
@emmambd emmambd added this to the Now milestone Mar 21, 2024
@jcpitre
Copy link
Contributor Author

jcpitre commented Mar 26, 2024

Releasing of 5.0.1 wen without a hitch, meaning the jars were uploaded to sonatye properly (even if we did not publish them to maven central)
Also running publish_assets.yml manually did not exhibit the problem.
This problem might be a fluke.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working (crash, a rule has a problem) status: Needs triage Applied to all new issues
Projects
Status: Requires investigation
Development

No branches or pull requests

2 participants