Hi,
i need some help adding my own dependency to my new binding.
Currently i’m writing a new binding. For the new binding a need a special dependency to https://mvnrepository.com/artifact/com.microsoft.signalr/signalr/3.1.2 .
I’m adding the dependency to my pom.xml:
com.microsoft.signalr
signalr
3.1.2
Now i got the following error while i’m building my project:
The default package ‘.’ is not permitted by the Import-Package syntax.
Can anyone please help me? I’m not an expert in maven dependency
BR
Christian
J-N-K
(Jan N. Klug)
February 19, 2020, 8:58pm
2
Can you commit your code to GitHub? I guess the problem is in one of your own files. In most cases there are Java classes which are not in a package.
splatch
(Łukasz Dywicki)
February 20, 2020, 12:03am
3
From my perspective problem is not related to dependency itself but OSGi manifest.
The .
package is not used anywhere (it is invalid pkg). Have you modified any of bnd files, maven pom or project properties there?
It is also possible that microsoft lib has an invalid manifest but I can not verify that with my mobile now.
Best,
Łukasz
Hi,
you can find a folk of openhab-addon here:
My new binding is called /org.openhab.binding.ojelectronics
I hope you can have a look and solve the problem. For adding the dependency i only added some line in the binding’s pom.xml
Thank you for your help
Christian
Hi,
thank you for your questions. I only changed my pom.xml to add the dependency. I have no idea about the microsoft package it self.
Thank you for your help
Christian
J-N-K
(Jan N. Klug)
February 20, 2020, 7:41pm
6
The dependency is missing in the committed pom.xml
. Can you fix that and report back? I can’t check what’s wrong if the code is incomplete.
Did you mean this file?
bundles/org.openhab.binding.ojelectronics/pom.xml
J-N-K
(Jan N. Klug)
February 20, 2020, 9:07pm
8
My fault. I checked the ojelectronics branch, but it seems that master is the correct branch. Will check that tomorrow
Is is possible to simply reference a jar file?
J-N-K
(Jan N. Klug)
February 22, 2020, 5:26pm
11
Please check the PR against your fork. That compiles for me after some fixes.
Some further comments:
Please do not catch Exception
, catch something more specific.
Add null-annotations (@NonNullByDefault
, @Nullable
)
1 Like
Hi,
thanks for your support. I will look at your changes. And thanks for your code review. I will follow your advice.
Christian
1 Like
system
(system)
Closed
April 4, 2020, 12:50pm
13
This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.