It took a while but an implementation of the Maven plugin for core22 just landed on the Snapcraft repository and should be available for testing in the edge channel soon. Please test and report problems so we can fix them before the next stable version is released.
There are some differences in this plugin compared to the old core18 plugin, and the main one is that the JDK and JRE should now be provided manually (in most cases this means listing them in
stage-packages, but you can also do a custom install to use something that’s not from the distribution archives).
You may also want to add a lint filter to prevent Snapcraft from showing false positives about missing libraries, something like the following should work:
Here is an example of how a part definition using the new plugin could look like: