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

Publish artifact to Maven Central #343

Merged
merged 10 commits into from
Aug 6, 2021
Merged

Conversation

wolfs
Copy link
Member

@wolfs wolfs commented Aug 1, 2021

No description provided.

@wolfs wolfs self-assigned this Aug 1, 2021
@wolfs wolfs added this to the 0.17.0 milestone Aug 1, 2021
@big-guy big-guy self-requested a review August 4, 2021 13:28
Copy link
Member

@big-guy big-guy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you been able to publish to the staging repo with these changes manually yet?

build.gradle.kts Outdated
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username.set(System.getenv("MAVEN_CENTRAL_STAGING_REPO_USER"))
password.set(System.getenv("MAVEN_CENTRAL_STAGING_REPO_PASSWORD"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like if we set the environment variable names in the right way, this will happen automatically: https://github.com/gradle-nexus/publish-plugin#publishing-to-maven-central-via-sonatype-ossrh

ORG_GRADLE_PROJECT_sonatypeUsername and ORG_GRADLE_PROJECT_sonatypePassword environment variables.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, seems to work.

@wolfs
Copy link
Member Author

wolfs commented Aug 5, 2021

Have you been able to publish to the staging repo with these changes manually yet?

@big-guy Yes, I even published all the way to Maven Central: https://search.maven.org/artifact/org.gradle.profiler/gradle-profiler/0.17.0-alpha08/pom

Now looking at the pom though, it seems like the packaging is wrong - it says pom. I wonder why. The module file seems to be fine.

For some reason, the packaging was "pom" for the
Gradle profiler artifact.
@wolfs wolfs force-pushed the wolfs/publish-to-maven-central branch from 23f1cf0 to b2a3717 Compare August 5, 2021 08:29
@wolfs
Copy link
Member Author

wolfs commented Aug 5, 2021

@big-guy I fixed the packaging attribute and published version 0.17.0-alpha09 to Maven Central. Can you take another look?

@wolfs wolfs requested a review from big-guy August 5, 2021 08:57
@wolfs wolfs merged commit 4bed4a1 into master Aug 6, 2021
@wolfs wolfs deleted the wolfs/publish-to-maven-central branch August 6, 2021 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants