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>
* Aligns compile dependencies with OSGi R7
* Aligns runtime dependencies with Karaf 4.3.1
* Fixes issues due to dependency changes:
* AudioServletTest never ending due to Jetty upgrade
* Feature resolution failing due to Karaf activation-api no longer visible
* Uses Pax Logging as runtime dependency instead of Felix Log
This dependency change makes itests and Demo App behave more like the actual distro
To change the log level in itests, change the value of org.ops4j.pax.logging.DefaultServiceLog.level in itest-include.bndrun
* Adds --add-opens and nashorn.args in itest-include.bndrun to prevent some warnings being logged in itests
Related to openhab/openhab-distro#1167
Signed-off-by: Wouter Born <github@maindrain.net>
* Exclude commons-net from core dependencies so it is no longer automatically a transitive compile dependency
* Update nrjavaserial compile dependency to a version that no longer includes commons-net packages
* Define and use commons.net.version property
* Rework features so commons-net is only installed when required
Signed-off-by: Wouter Born <github@maindrain.net>
Upgrades to:
* Xtext 2.23.0
* Xtend 2.23.0
* LSP 0.9.0
For Xtext release notes see: https://www.eclipse.org/Xtext/releasenotes.html#/releasenotes/2020/09/01/version-2-23-0
The Xtext dependencies are now managed using their BOM which makes it easier to keep them in sync.
Because Xtext depends on a newer ASM version some runtime dependencies were also upgraded:
* ASM 8.0.1
* Pax Web 7.2.15
* XBean 4.17.0
Signed-off-by: Wouter Born <github@maindrain.net>
Upgrades the compiler and its dependencies so the compiler results of Maven builds are more similar to those generated in recent Eclipse versions.
To fix compilation issues in Eclipse for add-ons using classes from javax.xml.stream several dependencies were upgraded/excluded.
Signed-off-by: Wouter Born <github@maindrain.net>
* Migrates all tests to the JUnit 5 Jupiter API
* Updates bnd to 5.1.2
* Updates maven-surefire-plugin to 3.0.0-M5
* Updates Mockito to 3.4.6
* Updates Hamcrest to 2.2
* Removes org.openhab.core.boot POM dependencies
Signed-off-by: Wouter Born <github@maindrain.net>