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

config pom.xml to deploy to maven central #40

Merged
merged 7 commits into from
Feb 14, 2019
Merged

Conversation

nidi3
Copy link
Contributor

@nidi3 nidi3 commented Feb 4, 2019

No description provided.

@nidi3 nidi3 mentioned this pull request Feb 4, 2019
@blackears
Copy link
Owner

Thanks for the patch. Would you have any advice on how I'd actually deploy this to central? I've not had much luck with deploying on Maven in the past.

@nidi3
Copy link
Contributor Author

nidi3 commented Feb 8, 2019

As described in #9, you must generate and publish a pgp keypair https://central.sonatype.org/pages/working-with-pgp-signatures.html, then simply execute mvn deploy -Pdeploy

@blackears blackears merged commit 658fd1a into blackears:master Feb 14, 2019
@blackears
Copy link
Owner

I tried deploying with your updated pom, but am getting the below error message when I try to deploy. Would you know how I could fix this?

[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project svgSalamander: Execution injected-nexus-deploy of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy failed: Server credentials with ID "ossrh" not found! -> [Help 1]

@nidi3
Copy link
Contributor Author

nidi3 commented Feb 16, 2019

I forgot, you have to add your account for https://issues.sonatype.org to your ~/.m2/settings.xml:

 <servers>
        <server>
            <id>ossrh</id>
            <username>...</username>
            <password>...</password>
        </server>

@blackears
Copy link
Owner

blackears commented Mar 14, 2019

I tried again. I got further, but encountered another error:

[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project svgSalamander: Execution injected-nexus-deploy of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy failed: 403 - Forbidden -> [Help 1]

Running again with the -e flag gives further info:

[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project svgSalamander: Remote staging failed: Staging rules failure! -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project svgSalamander: Remote staging failed: Staging rules failure!
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)

@nidi3
Copy link
Contributor Author

nidi3 commented Mar 18, 2019

That's strange. Is there any hint as to what staging rules failed? Maybe when you try running it with -X flag, there's even more information.

@nidi3
Copy link
Contributor Author

nidi3 commented Mar 18, 2019

I see your try on https://oss.sonatype.org/#stagingRepositories with id central_bundles-16894.
Maybe you can try releasing from there and hope for a better error message.

@blackears
Copy link
Owner

Trying to release using Sonatype's web interface results in the same generic error message:

Release failed

Nexus returned an error: ERROR 403: Forbidden

@nidi3
Copy link
Contributor Author

nidi3 commented Mar 19, 2019

Just to be sure, do you have the rights for com.kitfox?
On the same sonatype page, when you select "Central Statistics" from the left hand menu, then in the "project" dropdown, do you see com.kitfox as an option?

@blackears
Copy link
Owner

The project dropdown has no entries in it.

@nidi3
Copy link
Contributor Author

nidi3 commented Mar 19, 2019

Sometimes it takes some time till it's ready. Did you request access to com.kitfox via sonatype's jira?
If yes, you could ask them what's the problem.

@blackears
Copy link
Owner

Not sure. If I have, it was years ago when I first set up the account.

@blackears
Copy link
Owner

How would I go about requesting access?

@nidi3
Copy link
Contributor Author

nidi3 commented Mar 19, 2019

Here is the complete guide: https://central.sonatype.org/pages/ossrh-guide.html
And what my own jira ticket looked like: https://issues.sonatype.org/browse/OSSRH-9801

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants