Commit Graph

95 Commits

Author SHA1 Message Date
Wouter Born
3b91692be1
Fix build (#3726)
Signed-off-by: Wouter Born <github@maindrain.net>
2023-07-24 09:02:01 +02:00
Kai Kreuzer
5692232e2b Apply spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2023-07-24 01:11:37 +02:00
openhab-bot
fd93f0a766 [unleash-maven-plugin] Preparation for next development cycle. 2023-07-23 17:14:35 +00:00
J-N-K
545ecfee21
Also adjust system channel types for unit (#3649)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-06-11 21:25:16 +02:00
J-N-K
a8a5e86fb9
Fix NPE in UpgradeTool when no pattern present (#3630)
Reported on the forum. State descriptions do no necessarily contain a pattern and thus `.get("pattern")` can return null.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-25 19:19:06 +02:00
J-N-K
3eca30f2c1
Fix Upgradetool does not remember last executed step (#3621)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-20 09:38:28 +02:00
J-N-K
6eb49577fe
Fix UpgradeTool execution log (#3614)
It seems that in some cases GSON is not able to correctly serialize/deserialize ZonedDateTime. Since we do not depend on the value in any case (it's just informational), we can store a String instead.

A missing metadata database also failed the check when upgrading items. This has been fixed, too.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-14 18:43:43 +02:00
J-N-K
fbd7f9cbff
Fix UpgradeTool and enable default=all policy (#3607)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-12 22:22:38 +02:00
J-N-K
9ef076dc6a
[uom] Add unit metadata for NumberItem (#3481)
* Add defaultUnit metadata for NumberItem

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-09 22:42:25 +02:00
Kai Kreuzer
9c59071038
Make --dir param optional for upgradetool (#3591)
* Make --dir param optional for upgradetool

Almost all openHAB installations should have the $OPENHAB_USERDATA env variable set.
If this is the case, the user does not have to provide a directory, so this parameter can be made optional.

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2023-05-04 09:08:26 +02:00
J-N-K
c40dd73d77
Initial contribution of an CLI upgrade-tool (#3268)
* Initial contribution of an upgrade-tool

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-01 21:58:11 +02:00
Holger Friedrich
33233982b3
Code cleanup: Use Java 17 features (#3580)
* Code cleanup: Use Java 17 features

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2023-04-30 18:37:48 +02:00
J-N-K
a32f1e0253
Add ColorUtil for better support of xyY conversion (#3434)
* Add ColorUtil for better support of xyY conversion

This has been refactored to align with the usually used conversion by a lot of ZigBee products like Hue or Deconz.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-03-16 22:25:03 +01:00
Wouter Born
0c792ec89a
Upgrade XStream to 1.4.20 (#3446)
This addresses CVE-2022-40151 and CVE-2022-41966, see:

https://x-stream.github.io/changes.html#1.4.20

This version also fixes an issue with closing streams so the workaround in GenerateDefaultTranslationsMojoTest is no longer needed.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-03-12 12:22:33 +01:00
J-N-K
81accafbe4
Fix i18n-maven-plugin dependencies (#3422)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-03-05 09:50:20 +01:00
J-N-K
dff6f9b984
Refactor XML handling (#3385)
* Refactor XML handling for things
* integrate config.xml and improve naming

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-02-23 20:06:29 +01:00
J-N-K
3d54ee54d2
Introduce metadata for all add-ons (#3050)
* Introduce addon.xml

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-01-15 15:31:42 +01:00
J-N-K
8d64ecfd8d
Update license header to 2023 (#3294)
* Update license header to 2023

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-01-03 09:45:42 +01:00
Wouter Born
687688db7e
Update Eclipse .classpath files (#3250)
Also adds some missing files for recently added projects.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-12-22 14:14:35 +01:00
J-N-K
41ba3ff854
Raise minimum JDK version to 17 (#2994)
* Raise source level to Java 17 (except for model classes)
* Remove Nashorn script engine
* Upgrade spotless and add jvm options  
  See https://github.com/diffplug/spotless/issues/834
* Add suppression for findBugs false positive error
* Upgrade xtext to 2.29.0
* Adjust JNA
* Resolve itests

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-19 19:52:43 +01:00
J-N-K
3fc4d23734
Fix spotless and resolve itests (#3239)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-12-19 11:09:31 +01:00
openhab-bot
35254b3a0a [unleash-maven-plugin] Preparation for next development cycle. 2022-12-18 23:08:22 +00:00
Jerome Luckenbach
0e468d898e
Add doc code examples (#3203)
Signed-off-by: Jerome Luckenbach <github@luckenba.ch>
2022-12-07 10:45:31 +01:00
Wouter Born
7b0b70ca4a
Improve binding archetype for Crowdin usage (#3089)
With these changes the proper translations file will be created.
The updated comments should prevent review comments and rework.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-09-23 18:15:50 +02:00
Kai Kreuzer
61fd47c853
Apply spotless and resolver (#3018)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2022-06-27 13:41:28 +02:00
openhab-bot
8944bdbbe4 [unleash-maven-plugin] Preparation for next development cycle. 2022-06-26 16:37:00 +00:00
J-N-K
2ae3137fec
Bump maven-plugin-plugin to 3.6.4 (#2993)
Needed for Java 17 source level. This also removes build errors with wrong scope and an unused dependency.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-06-02 10:50:07 +02:00
J-N-K
d6c269d95a
[i18n] Allow generation of default translations for automation modules (#2966)
* Allow generation of default translations for automation modules

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-05-29 18:26:23 +02:00
Hilbrand Bouwkamp
3da9570fe7
Improve escaping in i18n-maven-plugin (#2968)
* Also escape special characters in state option values

And escaped space, = and : symbols (all legal according to properties documentation).

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>

* Properly escape : and \ in option

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2022-05-19 18:31:25 +02:00
J-N-K
b52d9f2e4f
Fix "openhab --help" and "help openhab" in Karaf console (#2953)
* Enable "openhab --help" and "help openhab" in Karaf console

Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-05-16 22:39:45 +02:00
J-N-K
b11086ef45
Fix spaces in options not properly handled in i18n-maven-plugin (#2964)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-05-16 22:26:51 +02:00
Wouter Born
05fdc81b27
Improve test stability and OS compatibility (#2878)
This fixes the build being broken when building on Windows.
It also contains many fixes for timing issues which seem to impact macOS and Windows more than Linux.

* Fix .gitattributes and add *.xml_gen to fix line ending issues on Windows
* Derive fork count from CPU details in org.openhab.core tests for more stable tests on machines with fewer cores
* Adjust SafeCallerImplTest timings
* Increase ExecUtilTest timeout
* Increase SchedulerImplTest timeouts
* Increase AudioConsoleTest serveStream timeout
* Increase AudioServletTest serveStream timeout
* Increase SchedulerImplTest test timeouts
* Increase ExpireManagerTest timeout used for checking published events
* Increase PeriodicSchedulerImplTest max allowed delta
* Increase SchedulerImplTest timeouts
* Fix BundleInfoReader file stream not closed causing temp dir deletion issues on Windows
* Fix GenerateDefaultTranslationsMojoTest Windows line endings issues
* Fix GenerateDefaultTranslationsMojoTest Windows temp dir deletion problem
* Fix GenericItemProviderTest tearDown sometimes fails because of queued events
* Fix ChannelLinkNotifierOSGiTest wait for channel link events
* Fix ChannelCommandDescriptionProviderOSGiTest fails if provider not immediately registered
* Fix ChannelStateDescriptionProviderOSGiTest fails if provider not immediately registered
* Fix GenericItemChannelLinkProviderTest not waiting for async updated state to become true
* Fix GenericThingProviderTest failing due to events of previous test
* Fix InboxOSGiTest sometimes fails because of queued events
* Fix ScriptEngineOSGiTest failing because items are not yet added to registry
* Fix ThingManagerOSGiTest failing due to async handleRemoval call

Signed-off-by: Wouter Born <github@maindrain.net>
2022-04-14 23:00:33 +02:00
Wouter Born
f0b53cea34
Fix i18n-maven-plugin project name (#2879)
This makes it follow the naming scheme as used with the other projects.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-03-29 17:05:58 +02:00
Wouter Born
c300410fd9
Support multi bundle bindings in i18n-maven-plugin (#2748)
* Support multi bundle bindings in i18n-maven-plugin

The plugin did not generate translations for bundles of bindings that do not have a binding.xml file.
With this change it should also be possible to generate the default translations of the modbus and mqtt bindings.

Related to openhab/openhab-addons#12220

Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-20 11:57:18 +01:00
Wouter Born
d1a4d226b6
Upgrade XStream to 1.4.19 (#2738)
This addresses CVE-2021-43859, see:

https://x-stream.github.io/changes.html

Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-06 21:33:10 +01:00
Fabian Wolter
f79d17f864
[skeleton] Add Thing config table to readme; minor improvements (#2692)
* [skeleton] Add Thing config table to readme; minor improvements

- put each sentence in a seperate line
- add note that only PNG images are supported. See https://github.com/openhab/openhab-addons/pull/11116#discussion_r775838188
- add examples to "Supported Things"
- add RW column to example Channel table
- add advanced and default config value
- add note that textual config examples are mandatory
- make .sitemap example optional (see small internal discussion)
- put emphasis on initialize() shall return quickly
- add note about logging to INFO
- fix compiler warning
- Add default config value for initialization

Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
2022-01-22 13:45:37 +01:00
Wouter Born
0a778df0ad
Update groovy license headers to 2022 (#2675)
* Update groovy license headers to 2022
* Reuse existing header file and use Groovy 3.0.9

Updates the year in a few groovy file headers that were missed in #2671.

Signed-off-by: Wouter Born <github@maindrain.net>
2022-01-08 17:03:39 +01:00
Christoph Weitkamp
cabb3f7315
Update license headers to 2022 (#2671)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-07 13:16:42 +01:00
Kai Kreuzer
e3b07782b4
pom reference update from http to https (#2644)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-12-23 22:55:20 +01:00
Kai Kreuzer
1ebf7395d9 Apply spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-12-20 06:59:22 +01:00
openhab-bot
5ac05c4968 [unleash-maven-plugin] Preparation for next development cycle. 2021-12-19 21:49:34 +00:00
Wouter Born
bb3224a434
Add i18n-maven-plugin to make internationalization easier (#2544)
* Add i18n-maven-plugin to make internationalization easier

This plugin simplifies generating the default translation .properties files from the add-on XML information files.

It reuses the same XStream parsing classes that are used by openhab-core for parsing the binding/config/thing XML files.
It will also keep any existing default translations already present in property files for translations using `@text/`.
Furthermore it will nicely group and sort the translations.

After building this Maven plugin you can use it on add-ons using:

`mvn org.openhab.core.tools:i18n-maven-plugin:3.2.0-SNAPSHOT:generate-default-translations`

Signed-off-by: Wouter Born <github@maindrain.net>
2021-12-01 18:52:03 +01:00
Wouter Born
569dddd046
Exclude JUnit 4 from Whiteboard and update imports to JUnit 5 (#2534)
* Exclude JUnit 4 from Whiteboard and update imports to JUnit 5

Excludes the transitive JUnit 4 dependency from the Aries JAX-RS Whiteboard.
The Whiteboard should not have a compile scope dependency on JUnit so I've created https://github.com/apache/aries-jax-rs-whiteboard/pull/135 to fix this.
The wrong scope has resulted in some tests using JUnit 4 imports which is also fixed in this PR.

Signed-off-by: Wouter Born <github@maindrain.net>

* Add commonly used JUnit 4 classes to forbidden packages

Signed-off-by: Wouter Born <github@maindrain.net>
2021-10-24 10:35:28 +02:00
Kai Kreuzer
5a667cc868 applied spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-06-27 23:22:02 +02:00
jenkins
b8d2077805 [unleash-maven-plugin] Preparation for next development cycle. 2021-06-27 15:50:02 +00:00
Wouter Born
7579aa4d31
Fix more SAT findings and add a few suppressions (#2335)
* Fix more SAT findings and add a few suppressions

Signed-off-by: Wouter Born <github@maindrain.net>
2021-05-05 20:59:59 +02:00
Christoph Weitkamp
c80719fefa
Renamed Yahoo to ACME (#2304)
* Rename Yahoo to ACME
* Remove Paper UI references

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-04-20 22:31:32 +02:00
Christoph Weitkamp
00c822816c
Use SAT release version 0.11.1 (#2290)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-04-14 15:15:03 +02:00
Fabian Wolter
23c367f51e
[skeleton] Use real world examples; fix imports (#2270)
* [skeleton] Use real world examples in thing-types.xml

* Added some examples as many new bindings don't make use of context tags or supported bridges.
* Adapt config DTO, i18n. Add refresh param. Cleanup imports.

Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
2021-04-08 16:21:31 +02:00
Fabian Wolter
949313744d
[skeleton] Change locale placeholder from xx_XX to xx (#2268)
Closes #2261

Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
2021-04-02 22:28:23 +02:00