Hi
I have some problems with a new generated binding I have made with help of the script “create_openhab_binding_skeleton.cmd”
The problem is when it comes to dependencies and building the binding using the "mvn clean install"
I see this kind of problem with almost all dependencies I add via the MANIFEST.MF file.
For example these two dependencies I’m trying to install:
package com.google.gson 2.7.0 and package com.google.common.collect, when I save the MANIFEST.MF these packages are added to the Plug-in Dependencies folder as it should.
But when it comes to generate the JAR file inside the target folder, I have to trigger a maven install build.
Either I do it with the command “mvn clean install” or I right click on pom.xml and run as “maven installer”.
When building it keeps telling me it could not find the package like:
[ERROR] Cannot resolve project dependencies:
[ERROR] Software being installed: org.openhab.binding.northq 2.2.0.qualifier
[ERROR] Missing requirement: org.openhab.binding.northq 2.2.0.qualifier requires ‘package com.google.gson 2.7.0’ but it could not be found
[INFO] Adding repository https://dl.bintray.com/openhab/p2/openhab-deps-repo/1.0.15
[INFO] Resolving dependencies of MavenProject: org.openhab.binding:org.openhab.binding.northq:2.2.0-SNAPSHOT @ C:\Users\M\Documents\Programmering\Openhab\openhab2-master\git\openhab2-addons\addons\binding\org.openhab.binding.northq\pom.xml
[INFO] {osgi.os=linux, osgi.ws=gtk, org.eclipse.update.install.features=true, osgi.arch=x86}
[ERROR] Cannot resolve project dependencies:
[ERROR] Software being installed: org.openhab.binding.northq 2.2.0.qualifier
[ERROR] Missing requirement: org.openhab.binding.northq 2.2.0.qualifier requires ‘package com.google.common.collect 15.0.0’ but it could not be found
[ERROR]
If I don’t add any dependencies, I will build just fine. I have placed my binding inside i addons/binding folder where all other OH2 bindings are placed, so the parent as you see in the pom.xml should be valid.
My pom.xml file
<?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.binding</groupId>
<artifactId>pom</artifactId>
<version>2.2.0-SNAPSHOT</version>
</parent>
<artifactId>org.openhab.binding.northq</artifactId>
<version>2.2.0-SNAPSHOT</version>
<name>NorthQ Binding</name>
<packaging>eclipse-plugin</packaging>
</project>