Added new JAVA port option (on by default) to enable Java bindings for libmesos.
Issue: Maven Build Dependencies
Enabling Java bindings causes Maven to be invoked mid-way through the build process to build the mesos.jar artifact.
On a ports build system this will fail as internet connectivity is only available during the fetch phase.
Resolution
Pushed all required Maven deps into GitHub and created a release tarball, so they can be fetched as a normal distfile;
https://github.com/Digital-Chaos/mesos-maven-deps
Issue: Mismatched Protobuf.jar version
The mesos build already has a dependency on devel/protobuf from ports (currently version 3.12.2). However enabling java bindings in the build also requires protobuf.jar from Maven which has the version hardcoded to 3.5.0 within mesos.pom.in. This version mismatch will cause the build to fail.
Resolution
Created a patch (files/extra-patch-src_java_mesos.pom.in) to replace the harcoded protobuf version with a placeholder @PROTOBUF_VERSION@ string. During the post-patch phase, this placeholder is replaced inline from the PROTOBUF_VERSION Makefile variable which is set to the current ports version of protobuf (3.12.2). Would be better if PROTOBUF_VERSION could be set to the current version of devel/protobuf in the Makefile rather than hardcoding, but I'm not sure how that would be done, any advice appreciated!
Bugzilla
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247419