Warning 'Unused Export-Package instructions' during build

I am developing my first binding and have some questions and struggles (for another topic). One of the questions is that I noticed two warnings and would like to know if it is because of me doing something wrong, or an ‘issue’ with the current setup of the build system. Of course, being only warnings, I could just ignore them, but I like to get a full understanding of the whole process of developing, building and testing bindings, and if possible, get rid of all warnings.
The warnings are (you can probably tell I am developing a Philips Air Purifier binding…):

[INFO] --- bnd-maven-plugin:4.2.0:bnd-process (default) @ org.openhab.binding.philipsair ---
[WARNING] /opt/oh25-dev/openhab2-addons/bundles/org.openhab.binding.philipsair/pom.xml [0:0]: Unused Export-Package instructions: [org.openhab.*] 
[WARNING] /opt/oh25-dev/openhab2-addons/bundles/org.openhab.binding.philipsair/pom.xml [0:0]: Unused Import-Package instructions: [io.swagger.annotations.*, javax.annotation.security.*, org.eclipse.jdt.annotation.*, org.openhab.core.automation.annotation.*, org.openhab.*, com.google.common.*] 
[INFO] 

For the record: I have followed the instructions in the developer docs here and the build is successful.
The pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.openhab.addons.bundles</groupId>
    <artifactId>org.openhab.addons.reactor.bundles</artifactId>
    <version>2.5.0-SNAPSHOT</version>
  </parent>

  <artifactId>org.openhab.binding.philipsair</artifactId>

  <name>openHAB Add-ons :: Bundles :: PhilipsAir Purifier Binding</name>

</project>

You can ignore those. Nothing wrong at your side. The reason are default export instructions that are unused in your case (but needed for some other).

1 Like