[MONGOCRYPT-51] Publishing task for libmongocrypt Java wrapper Created: 09/May/19  Updated: 28/Oct/23  Resolved: 06/Jun/19

Status: Closed
Project: Libmongocrypt
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Ross Lawley
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on MONGOCRYPT-70 libmongocrypt: Build static link of l... Closed
Epic Link: Client-side FLE

 Description   

The Java wrapper for libmongocrypt (currently in a PR) is not yet configured to publish itself to Maven central. This ticket covers the work required to do that.

The trickiest part will be the the inclusion of different platform shared libraries (.dylib, .so, .dll) into the jar file, similar to embedded mongodb..



 Comments   
Comment by Githook User [ 06/Jun/19 ]

Author:

{'name': 'Ross Lawley', 'email': 'ross.lawley@gmail.com', 'username': 'rozza'}

Message: Build: Ensure Jna libs are packaged alongside the java code

  • Migrated build to kotlin
  • Added publishSnapshots task to push to the sonatype snapshots repo
  • Added publishArchives task which checks the git version is a tagged
  • Added jnaLibsCheck flag to enable JNA library checking: asks for user input to confirm the packages
  • Added jnaLibsPath setting to use a custom local JNA library path for inclusion into the build (rather than downloading from s3)
  • Added gitRevision setting to use a custom Git Revision to download the built resources for from s3.

CDRIVER-3122
Branch: master
https://github.com/mongodb/libmongocrypt/commit/d153ad4af0c3a114b0dbe4cdd6fe5e58682cbe6b

Comment by Ross Lawley [ 05/Jun/19 ]

PR: https://github.com/10gen/libmongocrypt/pull/13

Comment by Ross Lawley [ 04/Jun/19 ]

Moving back into progress as more work is to be done to clean up the whole release process (snapshot and archives)

Comment by Ross Lawley [ 20/May/19 ]

PR: https://github.com/10gen/libmongocrypt/pull/9

When running the tests it would fail unless libbson was installed on the system path - so at the moment publishing a jar with libbson & libmongocrypt wouldn't work.

Other than that to publish to maven central, the build must be tagged and then call: ./gradlew publishArchives -DjnaLibPath=<path-to-jna-libs>

There's also a publishSnapshot task to push snapshots to the sonatype snapshot repo.

Comment by Kevin Albertson [ 10/May/19 ]

Created CDRIVER-3124 to track the platform support.

Comment by Kevin Albertson [ 10/May/19 ]

How many platforms do you want to support in the jar?

Answer from the meeting: at minimum the platforms supported by mongocryptd.

Comment by Mark Benvenuto [ 10/May/19 ]
  1. The evergreen project for libmongocrypt makes artifacts available for download. Example: https://evergreen.mongodb.com/waterfall/libmongocrypt
  2. On the size, I cannot answer. How many platforms do you want to support in the jar? x64 linux, x64 windows, macos, ppc64le linux, s390x linux, arm64 linux?
Comment by Jeffrey Yemin [ 10/May/19 ]

mark.benvenuto can you assist with answering Ross's open questions?

Comment by Ross Lawley [ 10/May/19 ]

There will need to be a multi step system:

  1. Publish the shared libraries for each platform that we aim to support - is that listed anywhere?
  2. Download the JNA library and the libcrypt shared libraries and package them along side the java code in the jar file.

Open questions:

  • Is there a place the libmongocrypt build artifacts can be downloaded from?
  • Is the size of the jar file an issue? (Can it contain all platforms in the single jar?)
Generated at Thu Feb 08 09:07:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.