* 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>
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>
* 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>
* [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>
* 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>
* 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>
* 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>
* [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>
When generating a new binding with the maven archetype it should refer to openhab core via the variable `ohc.version` In the feature.xml.
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Suppresses the SystemPrintln SAT findings because this class is a Karaf shell command which prints to the console.
Signed-off-by: Wouter Born <github@maindrain.net>
* Bump SAT version; Fixed high priority findings
* Defined path to feature file to avoid warnings
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
This change handles the following cases:
- New binding that will be the first entry in the list
- New binding that is placed after/between multi project bindings. Like bluetooth and mqtt (reported in openhab/openhab2-addons#5860)
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
Due to changes in the archetype maven it generated multi module name with tabs prefixed. This caused the module name to be inserted twice because the added module by maven plugin was not removed when the module is moved by the groovy script.
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
This archetype generates bindings for the new bnd based build system.
It also updates specific bundle files that need information about the new binding.
This doesn't yet include generation of test projects.
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
* updated license headers
* added NOTICE files
* moved about.html to NOTICE files
* changed main project license
* updated build.properties
* added files to check to prevent error about missing about.html
* removed license info on p2 feature
Signed-off-by: Kai Kreuzer <kai@openhab.org>
* Add config file to the build
* Change to new artifact ID and version of SAT
* Bump to new version
Signed-off-by: Svilen Valkanov <svilen.valkanov@musala.com>