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
* Resolve itest runbundles
* Fix dependency issues
* Catch proper exception when starting hueemulation UpnpServer
Also-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Wouter Born <github@maindrain.net>
* Switch to version used by openhab-core
* Apply patch from #2359 for upgrading dependency on plexus
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
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>
Generated Swagger/OpenAPI code can be messy resulting in a lot of compiler warnings obscuring more important compiler warnings.
Fixes#12498
Signed-off-by: Wouter Born <github@maindrain.net>
* Syncs the karaf.version so the new Maven plugin is used
* Resolves itest runbundles for the new runtime dependencies
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.
Signed-off-by: Wouter Born <github@maindrain.net>
* Adds --add-opens to the surefire-maven-plugin config required for deserialization using Gson/XStream
* Upgrades plugin dependencies to JDK 17 compatible versions
* Replaces some reflection that no longer works on JDK 17
* Fixes issues when mocking Random
* Run Nashorn dependant tests only on JDK < 15
Signed-off-by: Wouter Born <github@maindrain.net>
* Syncs the karaf.version so the new Maven plugin is used
* Resolves itest runbundles for the new runtime dependencies
Signed-off-by: Wouter Born <github@maindrain.net>
* Syncs the karaf.version so the new Maven plugin is used
* Resolves itest runbundles for the new runtime dependencies
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
```
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 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 https://github.com/openhab/openhab-core/pull/2551
Signed-off-by: Wouter Born <github@maindrain.net>
This allows bnd to resolve multi release jar files.
A number of people have posted they have troubles adding dependancies on the forum with this error.
`Classes found in the wrong directory: {META-INF/versions/9/module-info.class=module-info}`
Issue about it is here:
https://github.com/bndtools/bnd/issues/2227
An alternative fix is to add the following into each bindings pom.xml
```
<properties>
<bnd.fixupmessages>"Classes found in the wrong directory"; is:=warning</bnd.fixupmessages>
</properties>
```
Not sure what the correct way to handle this is but these are two ways I have tested.
Signed-off-by: Matthew Skinner <matt@pcmus.com>
* Syncs the karaf.version so the new Maven plugin is used
* Resolves itest runbundles for the new runtime dependencies
Signed-off-by: Wouter Born <github@maindrain.net>
* Syncs the karaf.version so the new Maven plugin is used
* Resolves itest runbundles for the new runtime dependencies
Signed-off-by: Wouter Born <github@maindrain.net>