Suppress bnd warnings for unused imports/exports (#1196)

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>
pull/1206/head
Wouter Born 2021-11-14 17:30:01 +01:00 committed by GitHub
parent 36170518cb
commit a65fb3792e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -103,11 +103,15 @@ Import-Package: \\
-noimportjava: true
-sources: false
-contract: *
-includeresource: -${.}/NOTICE, -${.}/*.xsd]]></bnd>
-includeresource: -${.}/NOTICE, -${.}/*.xsd
-fixupmessages: \\
'Unused Import-Package instructions';is:=ignore,\\
'Unused Export-Package instructions';is:=ignore]]></bnd>
<!--
-dsannotations-options: norequirements
-->
<!-- Bundle-SymbolicName: ${project.groupId}.${project.artifactId} -->
<skipIfEmpty>true</skipIfEmpty>
</configuration>
<executions>
<execution>