Build an start binding in addons folder

Hi all!

I installed OpenHAB2 in my Raspberry Pi 3 and I am working to configure the system to work with the BTicino MyHome system.
The binding for the BTicino system (available for OH v1) I found in the addons list of Paper UI works great, but I would like to develop some custom functions because the list of commands available in the binding is limited. I’m not very experienced with Java (I mostly program in C++) so I would like to test the applet locally.

I downloaded the Eclipse IDE with the full OH package on Windows 10 and it seems that the binding compiles correctly (if I start a debug session in Eclipse I get the console output I added in the binding). I tried to place the compiled jar file in “/usr/etc/openhab2/addons/” folder, but the file is never loaded or started by OH2.

What am I doing wrong? How do I force OH2 to load the content of the addons folder?
I read online that I have to configure maven, but I am not sure how and I may have done something the wrong way. What are the steps to properly configure it to export the jar file?

Ok, in the end I figured out how to set up the software. I write here the missing steps.

  1. Install Eclipse following the tutorial on the website (advanced mode, github packages)
  2. Install Maven, follow tutorial on apache website if working on Windows
  3. In Win add JAVA_HOME system environment variable (pointing to the jdk folder) and in the “Path” variable add Maven’s bin folder and %JAVA_HOME%\bin
  4. Now it is possible to go to the “git” folder in Eclipse’s setup location and run mvn clean install
  5. The jar file will be placed in the target folder of the binding of interest

Hope this can help others!