How-to have Oomph generate a *.target file with non-0.0.0 version to resolve com.ibm.icu conflict [message #1697838] |
Mon, 08 June 2015 19:21 |
Michael Vorburger Messages: 103 Registered: July 2009 |
Senior Member |
|
|
HELO p2 gurus,
I'm attempting to migrate something to use Oomph, incl. having a generated *.target file (BTW about which I just added some doc at the end of https://wiki.eclipse.org/Eclipse_Oomph_Authoring, after reading earlier posts in this Forum; also see https://bugs.eclipse.org/bugs/show_bug.cgi?id=469654).
The respective *.setup model includes a number of Repositories, which have several versions of com.ibm.icu. Oomph itself appears to be able to "do the right thing" (however it does it; I'll have to admit here that the full details of this are still a bit of mystery to me...), and I can see e.g. by peeking at the Modular Target in the Target Platform UI of the PDE Preference that it chose com.ibm.icu 4.4.2.v20110823 - wonderful, thank you.
Now in the gen. *.target there is only <unit id="com.ibm.icu" version="0.0.0"/>. This then causes a Tycho-based build to fail with this error:
[ERROR] Cannot resolve target definition:
[ERROR] Software being installed: com.ibm.icu 52.1.0.v201404241930
[ERROR] Software being installed: org.eclipse.xtend.typesystem.emf.ui 1.0.1.v201108020519
[ERROR] Only one of the following can be installed at once: [com.ibm.icu 4.2.1.v20100412, com.ibm.icu 52.1.0.v201404241930, com.ibm.icu 4.4.2.v20110208, com.ibm.icu 4.4.2.v20110823, com.ibm.icu 50.1.1.v201304230130, com.ibm.icu 50.1.0.v20121116-2]
[ERROR] Cannot satisfy dependency: org.eclipse.xtend.shared.ui 1.0.1.v201108020519 depends on: bundle com.ibm.icu [4.0.1.v20090822,5.0.0)
[ERROR] Cannot satisfy dependency: org.eclipse.xtend.typesystem.emf.ui 1.0.1.v201108020519 depends on: bundle org.eclipse.xtend.shared.ui [1.0.1,2.0.0)
I've attempted to use a versionRange in the *.setup (<requirement name="com.ibm.icu" versionRange="[4.2.1.v20100412,5.0.0)"/>) but that doesn't seem to cause Oomph to do anything different (in the *.target its still version="0.0.0").
I've also attempted to manually edit the *.target as a temp. workaround and noticed that with <unit id="com.ibm.icu" version="4.4.2.v20110823"/> (but not version="4.4.2") it's happy, so ... shouldn't Oomph be setting that then?
Is this a Oomph limitation / bug because it really should be writing something else than version="0.0.0" into the *.target file it generates? Open a Bugzilla? Or am I still completely misunderstanding the mysteries of p2?
This problem is blocking adoption of Oomph.
Any help much appreciated.
PS: Before looking into Oomph we used what Tycho calls "Simple target platform configuration", so just listed all Repositories in the pom.xml, without explicitly declaring "Requirements", which seemed to have let Tycho (p2 Resolver) choose what it needs, and that worked... am I correct in understanding that this cannot be done like this with Oomph anymore?
QUIT
|
|
|
Re: How-to have Oomph generate a *.target file with non-0.0.0 version to resolve com.ibm.icu conflic [message #1697886 is a reply to message #1697838] |
Tue, 09 June 2015 11:01 |
Abel Hegedus Messages: 197 Registered: September 2015 |
Senior Member |
|
|
Hi,
you may have already tried this, but if not, here goes: you can add a generateVersions detail to the TargetDefinitionGenerator, as seen here: https://github.com/FTSRG/massif/blob/master/setup/hu.bme.mit.massif.setup/Massif.setup#L403
Quote:
PS: Before looking into Oomph we used what Tycho calls "Simple target platform configuration", so just listed all Repositories in the pom.xml, without explicitly declaring "Requirements", which seemed to have let Tycho (p2 Resolver) choose what it needs, and that worked... am I correct in understanding that this cannot be done like this with Oomph anymore?
You don't have to use the target generation from Oomph, instead you can keep using the simple config. However, you will have to manually keep the pom.xml up-to-date.
Cheers
|
|
|
|
Powered by
FUDForum. Page generated in 0.04068 seconds