I am developing a custom add-on/on that require websocket-server and websocket-servlet . If I add these 2 jars into /lib manually (because they are missing from Eclipse IDE’s OpenHab environment) , I can run the custom add-on in Eclipse IDE debug mode and no issue (websockets are created properly). However, as soon as I move the add-on to OpenhHab 2.2 release environment, I am getting castexception error on WebSocketServerFactory. I suspect it has to do with the websocket-server and -servlet jars that i included via /lib(though same version as jetty’s which is 9.3.22) that crash with existing websocket-server -servlet preinstalled in Openhab2.2 karaf.
So, instead of including those jars manually, i want to use Maven to pull these jars for me so that i can select them as Imported plugins in MANIFEST.MF screen so that i can compile my new custom addon (without manually add those 2 jars in /lib) and test on Openhab2.2 release environments by using the Openhab2.2 Karaf version of websocket-server and -servlet jars.
Question is how can i use Maven to pull those jars into Eclipse IDE (i tried to convert my custome add-on to Maven but it creates all bunch of errors)? What settings do I need configure? Thanks