I am working on a twitter binding for openHAB 3 and I cannot get the twitter4j dependency to work when building with maven. I get the following errors.
“Unable to create resource for bundle mvn:org.twitter4j/twitter4j-core/4.0.7”
feature.xml
<bundle dependency="true">mvn:org.twitter4j/twitter4j-core/4.0.7</bundle>
pom.xml
<dependency>
<groupId>org.twitter4j</groupId>
<artifactId>twitter4j-core</artifactId>
<version>4.0.7</version>
<scope>compile</scope>
</dependency>
I also tried launching the code in Eclipse and I get a cannot resolve dependency error.
Thanks,
Scott Hanson
hilbrand
(Hilbrand Bouwkamp)
February 21, 2021, 8:20pm
2
If you use scope compile you don’t need to add it to the feature file, because with compile the code of the library is included in your binding.
I tried it before without the bundle dependency in the feature xml and it didn’t work either.
hilbrand
(Hilbrand Bouwkamp)
February 21, 2021, 8:48pm
4
What error does it givein that case?
I just noticed its different, after I removed it again.
missing requirement [org.openhab.binding.twitter/3.1.0.202102212029] osgi.wiring.package; filter:="(osgi.wiring.package=android.os)"]]
hilbrand
(Hilbrand Bouwkamp)
February 21, 2021, 9:31pm
6
I reran it again and I get the first error now. It seems very random.