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.
- 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
- 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>
- make sure you have
gpg
configured on your system with your public GPG key is uploaded to a public keyserver (e.g. http://keyserver.ubuntu.com, http://keys.openpgp.org)
- For a bare, unforked dependency which has a version update, download the existing pom.xml e.g. https://search.maven.org/artifact/org.openrefine.dependencies/arithcode/1.1/jar
- Update the version number and any other information which has changed
- Publish the three necessary artifacts to the Maven Central staging server:
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: