Skip to content

Publishing dependencies to Maven Central

Tom Morris edited this page Mar 4, 2024 · 3 revisions

We maintain forks of some of our dependencies and publish these forks to Maven Central along with unforked dependencies which don't exist on Maven Central.

Group contents for org.openrefine.dependencies

  • Forks:
    • MIT SIMILE butterfly & butterfly-container
    • MIT SIMILE vicino
  • Published only:
    • arithcode - transitive dependency of vicino
    • jdatapath (no longer used, so may become unpublished)
  • Obsolete (replaced by authors' published versions):
    • secondstring
    • marc4j
    • OpenCSV modified to support multi-character separators - we now use Univocity parsers instead of this fork

Setting up your account

  • Create a JIRA account at https://issues.sonatype.org
  • Request to be added to the OpenRefine group
  • Add your JIRA account and password to ~/.m2/settings.xml
<settings>
  <servers>
    <server>
      <id>ossrh</id>
      <username>yourusername</username>
      <password>yourpassword</password>
    </server>
  </servers>
</settings>

Publishing an artefact

mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=ossrh -DpomFile=pom.xml -Dfile=arithcode-1.2.jar
mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=ossrh -DpomFile=pom.xml -Dfile=arithcode-1.2-javadoc.jar -Dclassifier=javadoc
mvn gpg:sign-and-deploy-file -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=ossrh -DpomFile=pom.xml -Dfile=arithcode-1.2-sources.jar -Dclassifier=sources
  • Review and make sure they meet all the requirements: https://central.sonatype.org/pages/requirements.html
  • Close the staging repository and check that it passed the requirements check. This will take a few minutes.
  • If one or more checks fails, drop the staging repository, fix the error(s) and retry.
  • Release the staging repository to Maven Central (presuming that it passes all checks). This can take some time to show up in Search on Maven Central.

Resources:

Clone this wiki locally