Discussion:
[tycho-user] Tycho and classifier
LE FEVRE FRANCOIS
2017-06-30 06:42:32 UTC
Permalink
Dear all,
I would like to know if it is a good or bad idea to add classifier for each of my eclipse artifact/plugin to match the eclipse version I am targeting
For instance to add
<classifier>oxygen</classifier>

<classifier>photon</classifier>

Because sometimes we have version problem where the same eclipse plugin exists for Oxygen and Mars.
So it will allwo to distinguish all artifacts of our project Papyrus.

Good or bad idea?
What are the Advandages and Drawbacks ?

Thanks

Francois
Mickael Istria
2017-06-30 07:05:44 UTC
Permalink
In general, using classifier isn't a convention properly understood by
OSGi, PDE, API Tools nor p2. See how Version Numbering is supposed to
happen: https://wiki.eclipse.org/Version_Numbering
If you have some bundles which are targeting different versions of the
simultaneous release, I think it's better to give them different names, and
to deal with version constraint on their Require-Bundle to make sure both
don't get installed simultaneously, and use Import-Package in clients
instead of Require-Bundle to let p2 find the artifact that works best for
the current installation profile.
It is usually a good thing to extract out the parts that are common in
their own common bundle in order to minimize the amount of code concerned
by this problem.

HTH
LE FEVRE FRANCOIS
2017-06-30 08:46:36 UTC
Permalink
Thanks a lot for your clear answer
Have a good day

De : tycho-user-***@eclipse.org [mailto:tycho-user-***@eclipse.org] De la part de Mickael Istria
Envoyé : vendredi 30 juin 2017 09:06
À : Tycho user list <tycho-***@eclipse.org>
Objet : Re: [tycho-user] Tycho and classifier

In general, using classifier isn't a convention properly understood by OSGi, PDE, API Tools nor p2. See how Version Numbering is supposed to happen: https://wiki.eclipse.org/Version_Numbering
If you have some bundles which are targeting different versions of the simultaneous release, I think it's better to give them different names, and to deal with version constraint on their Require-Bundle to make sure both don't get installed simultaneously, and use Import-Package in clients instead of Require-Bundle to let p2 find the artifact that works best for the current installation profile.
It is usually a good thing to extract out the parts that are common in their own common bundle in order to minimize the amount of code concerned by this problem.
HTH

Loading...