How to deploy own binding in open hab 2?

I’ve created my own binding. Now I want to deploy it with open hab 2 on my RPi 3. How this should be done? From where can I take open hab OSGi package? How to build my binding to OSGi service?

I did it like this, but I don’t know if this is the best way:

  1. Install openHAB2 Snapshot on Raspberry Pi (described here)
  2. Setup development environment on your development machine (described here)
  3. Develop and build your binding (described here)
  4. Move the target binary file ***.jar to addons/ folder of openHAB2 installation on Raspberry Pi

I hope it helps.

Thank you very much!

Could you look at my problem with binding? My own bundle doen't want to start, because it can't import log4j