Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315385 - p2 chooses RAP over SWT/JFace in target components install
Summary: p2 chooses RAP over SWT/JFace in target components install
Status: CLOSED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-02 08:30 EDT by Christian Campo CLA
Modified: 2019-11-26 02:32 EST (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Campo CLA 2010-06-02 08:30:24 EDT
There is a preliminary RC3 composite repo for the soon to be RC3 version at Helios Staging - http://download.eclipse.org/releases/staging

For Riena there is now only one entry "Riena Target Components". If I install just Riena Target Components and let p2 decide what else to choose, it will pick RAP for reasons that I dont quit understand. There are 5 bundles of Riena which have an optional dependency in their manifest.mf to say "org.eclipse.swt" and "org.eclipse.rap.rwt" (and others). Both dependencys are optional in manifest.mf. There is a p2.inf file that defines the RAP pieces as non-greedy. What actually happens is that it install org.eclipse.swt but non of the platform specific fragments. And it installs the rap bundles org.eclipse.rap.jface.databinding, org.eclipse.rap.jface, org.eclipse.rap.rwt, org.eclipse.rap.ui.workbench and org.eclipse.rap.ui. So you end up with something that you cannt use out of the box.

What you have to do is install equinox target components, rcp sdk and then riena target components. That does the trick. Still I wonder what the reason is here.

One of the bundles distributed with Riena "org.apache.commons.beanutils" imports org.apache.commons.logging. Now the Helios repo has the bundle org.apache.logging and org.slf4j.jcl which also exports org.apache.commons.logging. Now the slf4j bundles exports the version 1.1.1 of o.a.c.logging while the standalone bundle is 1.0.4. It picks the slf4j version which is unexpected but probably because its the higher version number.




The same is true for an import or org.apache.commons.logging. It
Comment 1 ekkehard gentz CLA 2010-06-02 09:03:13 EDT
christian, 

in target platforms it can help if you add under
-environment
----implicite plugin dependencies
<implicitDependencies>
<plugin id="org.eclipse.jface"/>
<plugin id="org.eclipse.swt"/>
<plugin id="org.eclipse.ui"/>
<plugin id="org.eclipse.jface.databinding"/>
<plugin id="org.eclipse.ui.workbench"/>
</implicitDependencies>

--
with commons logging - in my TP I always use slf4j to provide the packages for commons logging etc,
so this is ok for my situations (but was a problem with RC1 where wrong orbit bundles of slf4j caused problems, but this is fixed now)

if you really need o.a.c.logging then perhaps
also add it to implicite plugin dependencies

or add the commons logging bundle to your TP:

cmd-alt-shift-A on mac
then select org.apache.commons.logging

ekke
Comment 2 Christian Campo CLA 2010-06-02 09:42:34 EDT
So the next step I did was that I installed Equinox Target Components and then RCP SDK. So I had o.e.jface and org.eclipse.swt and org.eclipse.swt.win32........ in my target platform together with many other components.

Then I installed Riena Target Components and I get the RAP components in the target platform.....

org.eclipse.rap.jface.databinding
org.eclipse.rap.jface
org.eclipse.rap.rwt
org.eclipse.rap.ui.workbench
org.eclipse.rap.ui

So now I need to manually disable them in order to run my application (either in the target platform or the launch config). Pretty annoying.....
Comment 3 Christian Campo CLA 2010-06-02 09:50:13 EDT
A workaround I have identified is to disable "Include required software" when you install Riena Target Components. That works ok, although its not very intuitive....
Comment 4 Jeff McAffer CLA 2010-06-02 10:05:17 EDT
unfortunately, for many of these multiversion, cross platform , target platform cases it seem that you have to disable that option.  That's why its there :-/  Perhaps you can enter a PDE bug to suggest improvements to this workflow.
Comment 5 ekkehard gentz CLA 2010-06-02 10:23:07 EDT
(In reply to comment #3)
> A workaround I have identified is to disable "Include required software" when
> you install Riena Target Components. That works ok, although its not very
> intuitive....

..and it makes TP more complicated if you rely on this feature
that dependencies will be fetched automatically
Comment 6 ekkehard gentz CLA 2010-06-02 10:25:11 EDT
(In reply to comment #4)
> unfortunately, for many of these multiversion, cross platform , target platform
> cases it seem that you have to disable that option.  That's why its there :-/ 
> Perhaps you can enter a PDE bug to suggest improvements to this workflow.

from my POV:

- checking 'include required software' should only include required, but not optional dependencies
- there ould be 2nd option 'include also all optional dependencies'

ekke
Comment 7 ekkehard gentz CLA 2010-06-03 13:22:34 EDT
(In reply to comment #2)
> So the next step I did was that I installed Equinox Target Components and then
> RCP SDK. So I had o.e.jface and org.eclipse.swt and
> org.eclipse.swt.win32........ in my target platform together with many other
> components.
> 
> Then I installed Riena Target Components and I get the RAP components in the
> target platform.....
> 
> org.eclipse.rap.jface.databinding
> org.eclipse.rap.jface
> org.eclipse.rap.rwt
> org.eclipse.rap.ui.workbench
> org.eclipse.rap.ui
> 
> So now I need to manually disable them in order to run my application (either
> in the target platform or the launch config). Pretty annoying.....

Christian,

my workaround to put the RCP/SWT plug-ins as implicit plugin dependencies into the TP
doesn't help with newest repositiores.

so you're right there are only 3 ways to deal with this:
* remove them from the TP
* remove them from Launch configs
* uncheck 'include required software' and add all needed dependencies into the TP

ekke
Comment 8 ekkehard gentz CLA 2010-06-03 14:43:11 EDT
would it make sense to add a new checkbox to fine-tune how required software will be added ?

* include required software
   * include optional dependencies

then one could decide if optional dependencies should be resolved

ekke
Comment 9 Lothar Werzinger CLA 2010-06-03 20:07:18 EDT
(In reply to comment #6)
> (In reply to comment #4)
> > unfortunately, for many of these multiversion, cross platform , target platform
> > cases it seem that you have to disable that option.  That's why its there :-/ 
> > Perhaps you can enter a PDE bug to suggest improvements to this workflow.
> 
> from my POV:
> 
> - checking 'include required software' should only include required, but not
> optional dependencies
> - there ould be 2nd option 'include also all optional dependencies'
> 
> ekke

+1 for that suggestion
Comment 10 Eclipse Genie CLA 2019-10-18 07:03:47 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.