1

I have built a JAR and want to put it into Maven Central. How do I actually do that?

I have reviewed the instructions here:

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

This has got to be the worst set of instructions I have ever seen. Seriously, try reading it.

These instructions make no sense to me. They are basically impossible to understand. Can someone please share with me a simple plain-English set of steps for how to actually get your JAR into Maven Central? Would really appreciate it.

A X
  • 905
  • 2
  • 13
  • 31
  • I tried reading it. I was successful in deploying an artifact. This isn't *quite* a rant, but you'll have a lot more success with specific questions. – chrylis -cautiouslyoptimistic- Mar 17 '18 at 07:41
  • 1
    Optional, use a *private* repository: https://stackoverflow.com/questions/12410423/how-do-i-setup-a-private-remotely-accessible-maven-repository – PeterMmm Mar 17 '18 at 07:42
  • Q: Do you (or does your organization) really need to use "Maven Central"? Or do you just need a "Maven repository", for your project(s)? – paulsm4 Mar 17 '18 at 07:44
  • If they are so worst than make suggestions to improve them...https://issues.apache.org/jira/projects/MNGSITE/ – khmarbaise Mar 17 '18 at 11:28

1 Answers1

1

Like explained between the lines on that page, you need a supported repository hosting location to be able to get your artifact into maven central. Since there is only a handful of such locations, the best bet to get something in there is to have it as open source release, as those have an open one:

The easiest way to upload another project is to use the Open Source Software Repository Hosting (OSSRH), which is an approved repository provided by Sonatype for any OSS Project that want to get their artifacts into Central Repository.

That's what I've used as well. Refer to their instructions for details. In short, you need to

  • create a jira ticket for your project and get it approved
  • deploy your artifact (fulfilling the requirements, using either Maven or some other deployment tool) to their private staging area
  • promote the release to release area

If all goes well, after the last step the release will be synced to maven central in roughly ten minutes.

eis
  • 51,991
  • 13
  • 150
  • 199