This cleanup includes:
* Fix deprecations
* Fix JavaDocs
* Remove redundant toString calls
* Remove redundant semicolons
* Simplify boolean expressions
* Use diamond operator
* Use enhanced for loops
* Use instanceof pattern matching
* Use isEmpty instead of 0 comparisons
* Use lambdas
* Use static inner classes
* Use StandardCharsets
Also adds the SA_LOCAL_SELF_COMPARISON suppression similar as used in
other repositories for https://github.com/spotbugs/spotbugs/issues/1992.
Signed-off-by: Wouter Born <github@maindrain.net>
Using this configuration the maven-compiler-plugin will also use the
Eclipse External Annotations. This results in more similar build results
when not using Eclipse like CI, on the CLI and when using other IDEs.
Signed-off-by: Wouter Born <github@maindrain.net>
This fixes deprecation warnings when runnings tests with Maven 3.9.x:
`[WARNING] Parameter 'localRepository' is deprecated core expression;
Avoid use of ArtifactRepository type. If you need access to local
repository, switch to '${repositorySystemSession}' expression and get
LRM from it instead.`
See: https://issues.apache.org/jira/browse/SUREFIRE-2154
Related to openhab/openhab-core#3512
Signed-off-by: Wouter Born <github@maindrain.net>
* Rework Servlets to use Http Whiteboard annotations in favor of
proprietary `org.openhab.core.io.http.servlet` classes
Depends on openhab/openhab-core#3252
Fixes#1172
Signed-off-by: Wouter Born <github@maindrain.net>
* Aggregate features like in the openhab-addons repository
* Verify features in bundle projects
* Add basicui.cfg file for Basic UI in openhab-ui-external
* Fix CometVisu rrd4j/jackson dependency version mismatch
Also-by: Sebastian Gerber <git@sgerber.de>
Signed-off-by: Wouter Born <github@maindrain.net>
This prevents the following warnings when executing: `mvn i18n:generate-default-translations`
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 was not found in https://openhab.jfrog.io/openhab/libs-snapshot during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of openhab-snapshot has elapsed or updates are forced
Signed-off-by: Wouter Born <github@maindrain.net>
* Add GHA CI build (Java 11/17)
* Add GHA build status badge
* Update required Java version range used by the enforcer plugin
Signed-off-by: Wouter Born <github@maindrain.net>
Adds the default translation strings so the UI configuration can be translated with Crowdin.
Other fixes/improvements:
* Adds config for this to crowdin.yml
* Adds the i18n Maven plugin dependency so it can be more easily used
* Fixes a few encoding issues
* Uses the ConfigurableService annotation
Signed-off-by: Wouter Born <github@maindrain.net>
This helps to identify what tests cause builds to get stuck and it will more quickly end such builds.
When builds get stuck in tests, they would keep running for hours and then eventually when a timeout occurs, the job is killed without knowing why it got stuck.
Furhermore precious Jenkins executors will not keep being occupied by such jobs.
See: https://junit.org/junit5/docs/current/user-guide/#writing-tests-declarative-timeouts
It helps with identifying the root cause of issues like openhab/openhab-core#2551
Signed-off-by: Wouter Born <github@maindrain.net>
Ignores warnings like:
```
Warning: /home/runner/work/openhab-addons/openhab-addons/bom/runtime-index/pom.xml [0:0]: Unused Export-Package instructions: [org.openhab.*]
Warning: /home/runner/work/openhab-addons/openhab-addons/bom/runtime-index/pom.xml [0:0]: Unused Import-Package instructions: [io.swagger.v3.oas.annotations.*,
```
These are safe to ignore because the import/export packages are globally defined and not every bundle imports/exports all these packages.
The `skipIfEmpty` configuration furthermore prevents warnings when the bnd-maven-plugin runs on projects that don't have any code like BOMs.
More important compiler/SAT warnings standout more when there are fewer useless warnings.
Signed-off-by: Wouter Born <github@maindrain.net>