What is an OSGI version qualifier
Asked Answered
C

1

7

I need to confirm what I suspect as I cannot find any documentation on it, so this would appear a silly question, and since I am a learner at eclipse PDE.

Initially,

I had a parent project pom of an eclipse plugin project with

<version>1.1.0-SNAPSHOT</version>

with two child projects, with both their poms referring to the parent pom as version 1.1.0-SNAPSHOT.

I was able to build the projects successfully and had a site which I use to install the plugin into eclipse.

Then, I wanted my personal temp version called 1.1.1-mine. So I modified the three poms to 1.1.1-mine

I also updated the META-INF/MANIFEST.MF and feature.xml from

0.13.0.qualifier

to

0.13.1.qualifier

However, the build encountered the following error.

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:0.15.0:validate-version (default-validate-version) on project org.sonatype.m2e.subclipse: OSGi version 1.1.1.qualifier in META-INF/MANIFEST.MF does not match Maven version 1.1.1-mine in pom.xml

Does qualifier have to be a maven version keyword? Because, the build proceeded without error after I changed mine to SNAPSHOT in the poms.

If not, what did I do wrong?

What can I do to allow me to have version 1.1.1-mine?

Chevet answered 21/1, 2014 at 11:13 Comment(1)
FWIW, you can use this tool to compare maven & OSGi versions: versionatorr.appspot.comGoosefish
B
3

In a nutshell, OSGi .qualifier means the same thing as -SNAPSHOT.

Since OSGi doesn't allow for more than 3 numbers in a version (+ qualifier), creating a -mine version is a bit tricky.

According to the FAQ, you can tell Tycho a string that it should be use to replace qualifier with:

 mvn -DforceContextQualifier=mine 

Note that this disables all the goodness you get from SNAPSHOT versions (namely that you can deploy the bundle several times).

Brazee answered 21/1, 2014 at 16:21 Comment(1)
... plus this disables all goodness you get from auto-qualified versions: In p2/Tycho, a id/version pair uniquely identifies an artifact, so if you modify something in the artifact, and don't have the version change (automatically), your changes may not be picked up downstream!Gallows

© 2022 - 2024 — McMap. All rights reserved.