Bug 284465 - [target] Automatically generate EE "a.jre" for target
Summary: [target] Automatically generate EE "a.jre" for target
Status: ASSIGNED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 enhancement with 3 votes (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-23 13:22 EDT by Andrew Niefer CLA
Modified: 2017-04-25 08:25 EDT (History)
12 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Niefer CLA 2009-07-23 13:22:26 EDT
When using the rcp repository from 3.5:
http://download.eclipse.org/eclipse/downloads/drops/R-3.5-200906111540/download.php?dropFile=org.eclipse.rcp-p2repo-3.5.zip

You get an error along the lines of
Missing requirement: Extension Registry Support 3.4.100 (org.eclipse.equinox.registry) requires 'package javax.xml.parsers' but it could not be found.

This is because the rcp.zip does not contain a "a.jre" IU representing the EE.  This IU provides the packages that are expecting to come from the jvm.

It would be good if the target platform automatically generated such an IU according to the EE specified for the target.  The p2.publisher class JREAction can be used to generate this IU.
Comment 1 Curtis Windatt CLA 2009-07-23 13:33:23 EDT
Not sure if we will get to this for M1, but we'll try.
Comment 2 Chris Aniszczyk CLA 2009-07-23 13:45:13 EDT
If you deselect the "install required software box" so we use the slicer instead of the planner, you won't see this problem Andrew.
Comment 3 Andrew Niefer CLA 2009-07-23 13:55:14 EDT
So using the planner essentially allows a target that isn't fully satisfied.  I guess thats why this wasn't done in 3.5.

Kim is going to add the a.jre IU to the rcp download repo, so this bug is perhaps nice-but-not-absolutely-necessary.
Comment 4 Chris Aniszczyk CLA 2009-07-23 14:02:57 EDT
I almost added support for this late in the 3.5 cycle but we pulled it back when we gave the option.

Moving forward, I would like us to do this though.

I recall Pascal having reservations about us calling it "a.jre"
Comment 5 Andrew Niefer CLA 2009-07-23 14:14:58 EDT
Note the JREAction assigned names to the IU by taking the "osgi.java.profile.name", replacing '-', '/', and '_' with '.' and doing toLowerCase().  It also tries to extract a version from the name.

eg:
    EE                       Name                 Version
OSGi/Minimum-1.1         a.jre.osgi.minimum        1.1.0
OSGi/Minimum-1.2         a.jre.osgi.minimum        1.2.0
J2SE-1.3                 a.jre.j2se                1.3.0
J2SE-1.4                 a.jre.j2se                1.4.0
CDC-1.0/Foundation-1.0   a.jre.cdc.1.0.foundation  1.0.0
Comment 6 Curtis Windatt CLA 2009-08-04 15:08:49 EDT
I got ahead of myself marking this for M1.  It is an enhancement that should definitely go in for 3.6, but when it goes in will depend on where it fits in with other target platform changes.  Though we would definitely accept patches :)
Comment 7 Curtis Windatt CLA 2010-01-28 16:34:43 EST
No work has been done on this.  Removing milestone.
Comment 8 Tobias Oberlies CLA 2010-09-21 09:32:35 EDT
Having the "a.jre IU (in) the rcp download repo" may be a solution for RCP developers, but not all target definitions include the RCP repo. We are providing own repositories for Equinox-based server development, and having to ensure that there is a magic a.jre in every repository is a real pain.

Since the target definition files can specify a JRE version, I think it is rather a bug that the p2 resolver doesn't find the packages of the specified JRE (without the magic IUs). Please revise the priority of this bug report.

P.S.: We can't use the slicer mode for compatibility with Tycho. Tycho also uses .target files but only supports the planner mode.
Comment 9 Tobias Oberlies CLA 2012-08-31 04:47:46 EDT
FYI: The target definition file support has been significantly improved in Tycho since my last comment: Tycho now supports both planner and slicer mode (bug 342808) and generates an 'a.jre' IU for the target file resolution according to the EE configured in MANIFEST.MF or pom.xml (bug 364095).
Comment 10 Thomas Schindl CLA 2013-02-04 11:30:27 EST
If a patch would be accepted I could try to work on this for M6 - it really makes a bad user experience that targets who would resolve without problems fail because of this.
Comment 11 Curtis Windatt CLA 2013-02-04 11:48:04 EST
(In reply to comment #10)
> If a patch would be accepted I could try to work on this for M6 - it really
> makes a bad user experience that targets who would resolve without problems
> fail because of this.

Yes, I would review a patch for M6.