openhab / jamod

A fork of Java Modbus Library (jamod) - http://jamod.sourceforge.net/
Apache License 2.0
17 stars 26 forks source link

[openhab/jamod] Remove org.apache.commons.* dependencies #9

Closed andrewfg closed 3 years ago

andrewfg commented 3 years ago

References..

@ssalonen @splatch @cweitkamp

NOTES

  1. I am not 100% comfortable with my 'brute' refactoring of IOUtils.closeQuietly() => please check!!
  2. The PR https://github.com/openhab/openhab-core/pull/2127 depends on a new version of this JAR file, so merges must be done in the right order!
ssalonen commented 3 years ago

Thanks @andrewfg .

To me the closequietly replacement is correctly implementated

cweitkamp commented 3 years ago

You maybe directly want to remove the dependencies from the POM:

https://github.com/openhab/jamod/blob/b2c2692c8ea69e93070eb24b06900aba75f5ff3e/pom.xml#L66-L77

This additionally ensures the code will compile without apache.commons.

splatch commented 3 years ago

:+1: LGTM

kaikreuzer commented 3 years ago

@ssalonen Does this get your approval?

ssalonen commented 3 years ago

Absolutely! Good work.

andrewfg commented 3 years ago

NB the removal of the Apache dependencies does not actually change the interface between jamod and the OH core module. So I think the solution is just to increment the version number in the pom of this jamod PR, and in the OH core allow both the prior and the new versions of jamod in the core module’s respective pom dependency entry. Or??

andrewfg commented 3 years ago

Bumped version ID

andrewfg commented 3 years ago

PS you might want to merge https://github.com/openhab/jamod/pull/7 as well (???)

kaikreuzer commented 3 years ago

New version has been published: https://bintray.com/openhab/mvn/jamod/1.3.1.OH

andrewfg commented 3 years ago

Thank you @kaikreuzer