Project structure for multiple operators in one plugin

I am developing couple of new operatros to SNAP. I would like to have them in single plugin. So one .nbm file that contains multiple operators.

I have tried this approach snap-desktop-basic-multi , but it builds the plugins separately (multiple .nbm), so that is not what I am looking for.

So I have decided to make it a kit module like s1tbx-kit. I made project structure and pom files like in that repo. I have parent project with operator module and kit module. Kit module has one and only dependency – operator module.I thought that operator module would be included in kit module .nbm file. But it seems not to be the case. When I try to install kit .npm via Plugins in SNAP, I am getting following error:

I would like to ask if this is the good approach and if yes, what am I doing wrong. Or if this approach is not the recommended one, please point me to some some.

Thank you.

Hi! In your case you don’t need a kit module or a multi-module project.

I would suggest that you just follow the example snap-engine-java-operator.
This example has only one operator but you can add more to the source code. You just have to adapt the layer.xml and the org.esa.snap.core.gpf.OperatorSpi in META-INF/services for your additional Operator implementations. Then you will get one .nbm file at the end.

1 Like

I searched repos and it is right there, exactly what I need. It seems that I overlook the easiest solution with more complex ones. Thank you for pointing me to right direction.

1 Like