Different link depending on the targeted version


As I’m finalizing development for my binding, I’m preparing for its publication on the marketplace.
I have seen the template that I need to fill in the Bundles category and I’m fine with it.
However, there are a few things that I could not find an explanation for:

  1. How do I specify the minimum/maximum supported versions? From other addons, I believe this is the [3.4.x,4.1.x] syntax but I could not find a definite source for that.
  2. How do I specify which download link to use for a given openHAB version / java version combination?

Thanks for the clarifications.

It uses the Maven version ranges syntax.

My understanding is you’ll need a different post in the marketplace for each version. The range in the title indicates which versions of OH that one post is compatible with. So if you have a different jar for OH 3.4 and OH 4, you’ll need two different post to the marketplace.

To be precise it uses own version range syntax under the hood. It is distinct from Maven and OSGi version ranges: openhab-core/bundles/org.openhab.core.addon.marketplace/src/main/java/org/openhab/core/addon/marketplace/BundleVersion.java at main · openhab/openhab-core · GitHub

Difference is within handling of last segment (qualifier), maven puts more logic there than OSGi. For example 2.0.0-RC1, 2.0-M1 is not considered to match version 2.0.0. For OH ranges only RC is excluded.

OK, thanks for the correction. I was told Maven at some point and knowing it’s not totally Maven is useful information. I think I have run into some of those differences before on my rule templates and just though I was doing it wrong or misunderstanding the syntax.

Ah thanks for the link to the code, I see that the separator is not a comma like in Maven but a semi colon.

As to the link to different jar files, using WinMerge, I figured out that I may not need it as the only changes between my three jar files are metadata information.
I believe that if I post a link to the “OpenHAB 3.4 - Java 11” jar file, then it will work with all versions.

See also: