3

I wrote a GNU-GPLv3 Java library.
I want to make it available to people who use a Maven build script (pom.xml)

  • How to do?
  • What are the pre-requisites?
  • How is this related to open source at all? Is this about how you publish on Maven central? – Philippe Ombredanne Nov 7 '16 at 3:20
  • 2
    @PhilippeOmbredanne: Maven is the main way to distribute open source JARs. Nearly all open source libraries can be found on Maven. Yet there are so many sites like mvnrepository.com or central.sonatype.org it is hard to figure out what open source project managers are supposed to do. This question is very much about open source, because a proprietary publisher would use Maven totally differently. – Nicolas Raoul Nov 7 '16 at 3:26
  • 1
    fair enough, but this question seems overly broad to elicit any answer. What are you looking for exactly? – Philippe Ombredanne Nov 7 '16 at 3:27
  • I suspect an answer would be something like "The place to upload your JAR is <some URL>, other websites just mirror JARs from there. Just create an account and use this mvn command: <some mvn command line>". Beforehand, make sure your JAR does not include any class from other libraries already present on Maven, which you can check at that URL (I totally made up this rule), and modify your POM this way and that way, and remove "-SNAPSHOT" for the version name, and <a few other rules that are not obvious to guess>.". – Nicolas Raoul Nov 7 '16 at 3:37
  • I expect readers of this QA to be already familiar with Maven as a user, but not as a publisher. – Nicolas Raoul Nov 7 '16 at 3:37
4

The standard way is to use sonatypes procedure: http://central.sonatype.org/pages/ossrh-guide.html

It is basically 2 steps:

  1. setup an account with them (free, but you need to tell them about a page you own or belong to)
  2. setup some basic things in your pom or its parent.

For my projects I create a parent-pom in https://github.com/openCage/pfabulist-parent. branch v1.

Use it just copy stuff in your pom.

Then a maven deploy will send your artifact to sonatype. They test some points and then send it to maven-central.

P.S.

By the way, to check whether your GPL3 license fits to the dependencies you are using there are several options.

  • thanks for the nice word! I always toyed with the idea of bundling scancode as a Jar btw... Most of it should be runnable on Jython... – Philippe Ombredanne Nov 9 '16 at 1:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.