Commit Graph

84 Commits

Author SHA1 Message Date
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
Fabian Wolter
55d2aaf5e8
[skeleton] Remove license header from feature.xml (#2063)
Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
2021-01-03 19:11:58 +01:00
Wouter Born
774b9d607b
Update license headers to 2021 (#2041)
Signed-off-by: Wouter Born <github@maindrain.net>
2021-01-01 16:43:46 +01:00
t2000
f1276c56e2 Fix spotless issue in binding archtype (#2011)
Fixes openhab/openhab-addons#9528

Signed-off-by: Stefan Triller <github@stefantriller.de>
2020-12-28 09:21:58 +01:00
Wouter Born
bf14e1077f
Apply Spotless, resolve itest runbundles for 3.1.0 (#1982)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-22 10:01:42 +01:00
jenkins
965531696b [unleash-maven-plugin] Preparation for next development cycle. 2020-12-20 22:24:39 +00:00
Kai Kreuzer
89767cee9e
removed deprecated author information from bindings (#1844)
* removed deprecated author information from bindings
* removed author tag from itests

Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-11-24 19:01:50 +01:00
Wouter Born
289ad31afd
Remove Eclipse project files from binding archetype (#1660)
Related to openhab/openhab-addons#8451

Signed-off-by: Wouter Born <github@maindrain.net>
2020-09-21 22:49:13 +02:00
Fabian Wolter
39d6986df7
[skeleton] Make example logging compliant to Coding Guidelines (#1646)
See https://www.openhab.org/docs/developer/guidelines.html#f-logging point 4
Also give an example for the logging severities, as many binding PRs log to info or error.

Signed-off-by: Fabian Wolter <github@fabian-wolter.de>
2020-09-15 15:33:30 +02:00
Wouter Born
057604cc2d
Use new Collection API methods (#1598)
Using the new methods there will be less and more readable code.

Signed-off-by: Wouter Born <github@maindrain.net>
2020-08-22 23:04:11 +02:00
Kai Kreuzer
b7193a0acb
re-added log action to script scope and cleaned up imported extensions (#1590)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-08-14 10:06:42 +02:00
Wouter Born
61e17ce39e
Upgrade SAT and Spotless, apply Spotless and enable check (#1446)
* Update SAT and Spotless dependencies
* Apply Spotless and enable check

Signed-off-by: Wouter Born <github@maindrain.net>
2020-04-26 11:15:24 +02:00