How to build a specific binding with Maven

Tags: #<Tag:0x00007f51ef8bf1f8> #<Tag:0x00007f51ef8bf0b8> #<Tag:0x00007f51ef8bef50>

(Geert Vancompernolle) #1

I’ve tried several times to get openHAB built with the Yoxos method, but failed over and over again (due to the famous Mwe2 stuff…).

  • Giving it up in the end, I moved to the Maven way of working (‘Pure Eclipse’ Instructions) and finally got openHAB built in the end.
    But it’s not clear to me what Eclipse is still doing in this setup, since it cannot be used to build openHAB from within Eclipse itself. Can someone explain?

  • Next to this, I would like to know if it’s possible to build only one binding (e.g. JointSpace) after having run once “mvn clean install”. I’m currently using “mvn -o install” after I modified a binding, but still, all the bindings are at least checked again, some of them build again.
    Is there an option one can give to Maven to only “recompile” that one binding?

openHAB not authorized to access Hue bridge (SOLVED)
(John Cocula) #2

If you cd bundles/binding/org.openhab.binding.<name> and type mvn -o clean install it ought to put the target files in the target subdirectory.

Compile a z-wave XML File with Eclipse for OH2
(Geert Vancompernolle) #3

Well, that’s simply perfect! Exactly what I was looking for. Nice thing is that you have the .jar file immediately available and don’t have to extract it from the addon zip file each and every time.
Very useful information, much appreciated!

(lucian) #4

Hi there,
Is this valid for OH2 as well?

(Attila Nagy) #5

for everyone like me getting back to this topic again and again, there is a better solution to this:
You should cd to the parent directory of your binding then execute:

mvn -pl org.openhab.binding.<name> -am clean install

This will build the given binding, download any requirements and also build any modules this modules is dependant on.