Skip to content

Conversation

@marktsuchida
Copy link
Member

@marktsuchida marktsuchida commented Jul 16, 2025

This is a work in progress.

The goal to aim for is a stand-alone mmcorej repository (initially a mirror of MMCoreJ_wrap/) that is analogous to pymmcore, which publishes to the Maven Central repository.

Major things remaining to do:

  • Generate a Javadoc jar
  • Generate a source jar (possibly outside of Meson using meson dist)
  • Possibly generate pom.xml with version from meson.build (probably not while MMCoreJ lives in mmCoreAndDevices)
  • Include pom.xml in jar
  • Should version also be in the jar menifest?
  • Package JNI libraries (for all supported platforms) in the jar, and auto-extract at runtime (N.B. MMCore uses its binary path as a default search location for device adapters; this may need to be disabled if/when the JNI lib is extracted to a temporary directory)

The Javadoc generation requires some thought. We currently use the ancient swig-doc-converter, which I'd like to retire. SWIG 4 can translate Doxygen to Javadoc, but (a) we still require SWIG 2/3 for MMCoreJ (#37) and (b) the doc comments of MMCore will need to be in the headers for that to work (#23 - probably best to do when no major PRs are outstanding on MMCore). Might be best to tackle those issues first. Let's keep swig-doc-converter for now so we don't need to switch to SWIG 4 yet here.

We'll leave that for Maven.
Put in more logical order.

Also remove redundant packaging=jar (it's the default).
Could be scm:git:[email protected] or scm:git:https://github.com but not
scm:git:git://github.com. At least not any more.
More concise name/description.

Update/correct developer organizations.
This is needed for Maven to use them cleanly.

Because SWIG fails if the outdir doesn't exist, use a Python wrapper to
run SWIG.
- Point to SWIG-generated Java sources in builddir/ (hard-coded for now)
- Remove obsolete Sonatype OSSRH config (will need to add Central Portal
  config later)
- Update plugin versions
It's cleaner for the outer script to set builddir equally for Meson and
Maven, so parameterize.
Until we have a proper way to address them, there're not helpful.
@marktsuchida
Copy link
Member Author

marktsuchida commented Dec 10, 2025

Removed Java compile/jar from Meson build and updated pom.xml so that Maven can build using SWIG Java sources generated by Meson. This way we don't have to manually mess with the jar/pom during build.

The jars produced (artifactId = MMCoreJ) are the Java part only.

Next steps:

@marktsuchida marktsuchida changed the title WIP: Meson build for MMCoreJ WIP: Meson/Maven build for MMCoreJ Dec 10, 2025
(Assisted by Claude Code; any errors are mine.)
There is not much point in pinning the mmdevice and mmcore commits until
MMCoreJ is in its own repository and no longer in mmCoreAndDevices.
Without this, there is the danger of producing a jar with only the
static sources.

(Assisted by Claude Code; any errors are mine.)
(Assisted by Claude Code; any errors are mine.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant