Where to place resources for dependencies of a binding?

Still developing my addon - getting from one issue in dependency handling to next :wink:

Using ical4j requires a setting for using an internal cache for Timezones. However, the library is configured using a properties file. The file is loaded as Resource (see here: net.fortuna.ical4j.util.ResourceLoader @ github ). Where do i need to place the file that it can be found by the library?

The feature.xml lists ical4j as normal dependency, inside maven it’s declared as compile-scoped.

Thanks again in advance!

Hey,

resources in Java are commonly placed in src/main/resources folder.

Happy coding,
BR

Yes normally this works. However, using a dependency, it did not read out correctly. Maybe it’s because the classpath is modified through OSGi-implementation.

The solution in my case was setting the Property by System.setProperty(String, String), which is a bit dirty as it may pollute.

Ahhh ok, I see. Have a look at https://github.com/openhab/openhab-core/commit/3ae82d15583cb4f682f611b2c655e96a0e54084d , this was added to the Milestone 2.5.0.M5 which was released just 20 minutes ago. I guess this is related to your problem?

Yes maybe. However it turned out in my case there were other issues in the library i’ve used - most from my position unfixable and related with OSGi (the implementation of the functionality was as excpected). The only solution for getting my binding nearer towards mainline was replacing it by another library.