* Sync runtime dependencies with Karaf 4.4.4, most notably:
* Jetty 9.4.52.v20230823
* JNA 5.13.0
* SLF4J 2.0.6
* Pax Logging 2.2.3
* Pax Web 8.0.22
* Resolve itest runbundles
* Use new Pax Web features to simplify dependency management
* Add specs features because Pax Web now depends on "asm"
Signed-off-by: Wouter Born <github@maindrain.net>
This fixes the following warnings:
```
[WARNING] Parameter 'compilerArguments' is deprecated: use {@link #compilerArgs} instead.
```
Related to openhab/openhab-core#3512
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 #3512
Signed-off-by: Wouter Born <github@maindrain.net>
* Sync runtime dependencies with Karaf 4.4.3, most notably:
* Jetty 9.4.50.v20221201
* Pax Logging 2.2.0
* Pax Web 8.0.15
* Use OSGi R8 as compile dependency
* Rework Servlets to use Http Whiteboard annotations in favor of proprietary `org.openhab.core.io.http.servlet` classes
* Resolve itest runbundles
Also-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Wouter Born <github@maindrain.net>
* 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>
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>
This adds Java 17 to the GitHub Actions CI build matrix so we can make sure the build keeps working with both Java 11 and Java 17.
It also updates the required Java version range used by the enforcer plugin so it is also possible to build with the supported Java versions.
Furthermore it prevents duplicate error annotations being added by only adding these in the Java 11 matrix build.
Signed-off-by: Wouter Born <github@maindrain.net>
* Adds some --add-opens to maven-surefire-plugin for:
* modbus transport tests (java.net)
* tests using Gson/XStream (java.util)
* Only run ScriptScopeOSGiTest when Nashorn is available as it has been removed since JDK 15
Signed-off-by: Wouter Born <github@maindrain.net>
* 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>
When the plugin dependency is managed you can also use the plugin without adding GAV parameters to commands.
E.g. it allows for using it with:
```
mvn i18n:generate-default-translations
```
Related to #2544
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 there are fewer useless warnings.
Signed-off-by: Wouter Born <github@maindrain.net>
This helps to identify what tests cause builds to fail and it will more quickly end builds.
For instance the WebClientFactoryImplTest currently often hangs on my local builds.
With this configuration in place it is easy to see and it will timeout after 15 minutes:
[ERROR] Tests run: 5, Failures: 0, Errors: 1, Skipped: 4, Time elapsed: 900.207 s <<< FAILURE! - in org.openhab.core.io.net.http.internal.WebClientFactoryImplTest
[ERROR] org.openhab.core.io.net.http.internal.WebClientFactoryImplTest.testGetClients Time elapsed: 900.194 s <<< ERROR!
java.util.concurrent.TimeoutException: tearDown() timed out after 15 minutes
See: https://junit.org/junit5/docs/current/user-guide/#writing-tests-declarative-timeouts
Signed-off-by: Wouter Born <github@maindrain.net>