Unable to enable plugin after adding licensing API support

I followed Adding licensing support to server apps and Understanding generated license API support instructions and used atlas-create-bitbucket-plugin-module to add the licensing support. On the dev environment the plugin works with licensing as expected, but then the JAR is installed on another instance the plugin cannot be enabled.

Logs indicate that the problem is with loading the com.atlassian.upm.license.storage.plugin.

com.atlassian.plugin.osgi.container.OsgiContainerException: Cannot start plugin: com.myplugin.myplugin
	at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:424)
	at com.atlassian.plugin.impl.AbstractPlugin.enable(AbstractPlugin.java:260)
	at com.atlassian.plugin.manager.PluginEnabler.actualEnable(PluginEnabler.java:120)
	at com.atlassian.plugin.manager.PluginEnabler.enable(PluginEnabler.java:97)
	at com.atlassian.plugin.manager.DefaultPluginManager.lambda$enableDependentPlugins$24(DefaultPluginManager.java:1245)
	at com.atlassian.plugin.manager.PluginTransactionContext.wrap(PluginTransactionContext.java:63)
	at com.atlassian.plugin.manager.DefaultPluginManager.enableDependentPlugins(DefaultPluginManager.java:1229)
	at com.atlassian.plugin.manager.DefaultPluginManager.lambda$addPlugins$22(DefaultPluginManager.java:1214)
	at com.atlassian.plugin.manager.PluginTransactionContext.wrap(PluginTransactionContext.java:63)
	at com.atlassian.plugin.manager.DefaultPluginManager.addPlugins(DefaultPluginManager.java:1114)
	at com.atlassian.stash.internal.plugin.StashPluginManager.addPlugins(StashPluginManager.java:79)
	at com.atlassian.plugin.manager.DefaultPluginManager.lambda$scanForNewPlugins$14(DefaultPluginManager.java:921)
	at com.atlassian.plugin.manager.PluginTransactionContext.wrap(PluginTransactionContext.java:63)
	at com.atlassian.plugin.manager.DefaultPluginManager.scanForNewPlugins(DefaultPluginManager.java:877)
	at com.atlassian.plugin.manager.DefaultPluginManager.lambda$installPlugins$13(DefaultPluginManager.java:837)
	at com.atlassian.plugin.manager.PluginTransactionContext.wrap(PluginTransactionContext.java:63)
	at com.atlassian.plugin.manager.DefaultPluginManager.installPlugins(DefaultPluginManager.java:823)
	at com.atlassian.stash.internal.plugin.ClusteredPluginController.installPlugins(ClusteredPluginController.java:77)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
	at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
	at com.atlassian.upm.core.install.AbstractPluginInstallHandler$1.doInTransaction(AbstractPluginInstallHandler.java:139)
	at com.atlassian.upm.core.install.AbstractPluginInstallHandler$1.doInTransaction(AbstractPluginInstallHandler.java:134)
	at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:21)
	at com.atlassian.stash.internal.sal.spi.HostContextAccessorImpl.doInTransaction(HostContextAccessorImpl.java:54)
	at jdk.internal.reflect.GeneratedMethodAccessor366.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:18)
	at jdk.internal.reflect.GeneratedMethodAccessor360.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
	at jdk.internal.reflect.GeneratedMethodAccessor360.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
	at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
	at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
	at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
	at com.atlassian.upm.core.install.AbstractPluginInstallHandler.installArtifacts(AbstractPluginInstallHandler.java:133)
	at com.atlassian.upm.core.install.AbstractPluginInstallHandler.installArtifact(AbstractPluginInstallHandler.java:119)
	at com.atlassian.upm.core.install.JarPluginInstallHandler.installPluginInternal(JarPluginInstallHandler.java:52)
	at com.atlassian.upm.core.install.AbstractPluginInstallHandler.installPlugin(AbstractPluginInstallHandler.java:60)
	at com.atlassian.upm.core.install.DefaultPluginInstallationService.execute(DefaultPluginInstallationService.java:133)
	at com.atlassian.upm.core.install.DefaultPluginInstallationService.install(DefaultPluginInstallationService.java:101)
	at com.atlassian.upm.install.UpmPluginInstallationService.install(UpmPluginInstallationService.java:120)
	at com.atlassian.upm.core.rest.resources.install.InstallTask.installFromFile(InstallTask.java:156)
	at com.atlassian.upm.core.rest.resources.install.InstallFromFileTask.executeTask(InstallFromFileTask.java:37)
	at com.atlassian.upm.core.rest.resources.install.InstallTask.run(InstallTask.java:81)
	at com.atlassian.upm.core.async.AsynchronousTaskManager.executeTask(AsynchronousTaskManager.java:124)
	at com.atlassian.upm.core.async.AsynchronousTaskManager$1.call(AsynchronousTaskManager.java:102)
	at com.atlassian.upm.core.async.AsynchronousTaskManager$1.call(AsynchronousTaskManager.java:99)
	at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:38)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.lang.Thread.run(Thread.java:829)
	... 41 frames trimmed
Caused by: org.osgi.framework.BundleException: Unable to resolve com.myplugin.myplugin [137](R 137.0): missing requirement [com.myplugin.myplugin [137](R 137.0)] osgi.wiring.package; (osgi.wiring.package=com.atlassian.upm.license.storage.plugin) Unresolved requirements: [[com.myplugin.myplugin [137](R 137.0)] osgi.wiring.package; (osgi.wiring.package=com.atlassian.upm.license.storage.plugin)]
	at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4149)
	... 64 common frames omitted

At least the Understanding generated license API support page seems to be a bit out of date, as it refers to <component-import> and <component> entries on atlassian-plugin.xml which are not supported.

[ERROR]
[ERROR] atlassian-plugin.xml contains a definition of component. This is not allowed when Atlassian-Plugin-Key is set.
[ERROR]
[ERROR] Please check the documentation of https://bitbucket.org/atlassian/atlassian-spring-scanner or https://developer.atlassian.com/display/DOCS/Configuration+of+Instructions+in+Atlassian+Plugins for further details.

Did you ever figure this out ?