[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Smooth transition for EclEmma

Seems that I made a stupid copy-pasteÂmistake - m2e-wtp has osgi bundle "org.eclipse.m2e.wtp", but in our case should be "com.mountainminds.eclemma.core" instead of "com.mountainminds.eclemma":

requires.0.name=com.mountainminds.eclemma.core
units.1.id=com.mountainminds.eclemma.core
units.1.provides.0.name=com.mountainminds.eclemma.core

So excuse me for a noise - all seems to work fine after this fix.

Still interested in explanation of values for "units.1.properties.0.name" and "units.1.properties.0.valuesince can't manage to see them in UI, but this is minor.

Thanks.


On Sat, Oct 29, 2016 at 3:27 PM, Evgeny Mandrikov <mandrikov@xxxxxxxxx> wrote:
Hi P2 experts,

We are preparing initial release of EclEmma <https://projects.eclipse.org/projects/technology.eclemma> under Eclipse Foundation umbrella.
And we would like to provide for our users smooth transition from its ancestor <https://github.com/jacoco/eclemma>.

So as was advised by our mentor Mickael Istria - based on <https://github.com/eclipse/m2e.wtp/blob/master/org.eclipse.m2e.wtp.feature/p2.inf> I've tried to create p2.inf
Here is its content with comments describing my assumptions:

###

# can update any "com.mountainminds.eclemma.feature" and previous versions of "org.eclipse.eclemma.feature"
update.matchExp = providedCapabilities.exists(pc | pc.namespace \=\= 'org.eclipse.equinox.p2.iu' && (pc.name \=\= 'com.mountainminds.eclemma.feature.feature.group' || pc.name \=\= 'org
.eclipse.eclemma.feature.feature.group' && pc.version < '$version$'))

# requires additional IU described below
requires.0.namespace=osgi.bundle
requires.0.name=com.mountainminds.eclemma
requires.0.range=[$version$, $version$]

units.1.id=com.mountainminds.eclemma
units.1.version=$version$
units.1.singleton=true
units.1.provides.0.namespace=osgi.bundle
units.1.provides.0.name=com.mountainminds.eclemma
units.1.provides.0.version=$version$

# to not overwrite the main artifact, the additional IU should have classifier (https://bugs.eclipse.org/bugs/show_bug.cgi?id=430728)
units.1.properties.1.name=maven-classifier
units.1.properties.1.value=p2inf

# TODO explain
units.1.properties.0.name=org.eclipse.equinox.p2.name
units.1.properties.0.value=This version cannot be installed on top of the already installed EclEmma plugin. Uninstall the previous version and try the install again.

###

And below is a description of performed testing with undesirable outcome.

Using:
Âfresh installation of Eclipse IDE for Java Developers (Version: Neon.1a Release (4.6.1) Build id: 20161007-1200)
Given:
Âold 2.3.3.201602231923 installed from <http://update.eclemma.org/>
When:
Âinstalling new one from local build directory
Then:
Âcorrectly upgraded to 2.3.4.201610291259
When:
Ânew build is available and checking for update
Then:
Âcorrectly upgraded to more newer 2.3.4.201610291310
When:
Âinstalling old one from <http://update.eclemma.org/>
Expected:
Âfailure
Actual:
Âboth (2.3.3.201602231923 and 2.3.4.201610291310) are installed

Any help/ideas are more than welcome.

Regards,
Evgeny





--
Best regards,
Evgeny Mandrikov aka Godin <http://godin.net.ru>
http://twitter.com/_godin_