openhab / openhab-core

Core framework of openHAB
https://www.openhab.org/
Eclipse Public License 2.0
932 stars 429 forks source link

Add Apache commons-codec feature #4418

Closed fabgio closed 1 month ago

fabgio commented 1 month ago

Title

Add Apache commons-codec library to openhab-core

Description

The goal of this PR is to add Apache commons codec library https://commons.apache.org/proper/commons-codec/ as an OSGi feature to Openhab-core in order to be used in Openhab-addons. With the aim to integrate the Meross Internet things https://www.meross.com/en-gc in openhab; the library will consent to the upcoming binding to achieve the ability of generating MD5 hashes required to perform Http and Mqtt requests/messages to the Meross host and broker. In fact, I I didn't find any library in openab to perform this task and I believe the whole openhab ecosystem could benefit from it. That said, I already posted about my intention to go with manufectoring a binding for Meross IOT: Unsatisfied Requirements: Declarative Services and multiple OSGi dependences

Unfortunatelly, OSGi is "a strange beast" so it took time for me to comprehend the framework and how it menages dependencies which turned out to be way different from maven's fashion.

I kindly request support by the reviewer(s) for this P.R as I have a limited background in OSGi and Openhab Core as well!

holgerfriedrich commented 1 month ago

@fabgio thanks for contributing to openHAB.

We have tried to remove dependencies on Apache Commons libraries from core and add-ons over the last few months. See also https://github.com/openhab/openhab-addons/issues/7722

If it is just about the MD5 hashes, my personal recommendation is to look at bouncycastle (which is already used by core and some add-ons). Maybe @lsiepel or the other addon-maintainers can give a better recommendation how to proceed.