[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] How can the product publisher use java profiles ?

I'm going to suggest the creation of a IJREAdvice type that is essentially the profile.  Then the publishing app can populate the advice and all that loading logic gets removed from the JREAction and the action is focused on creating the required IUs and artifacts.

Just a thought.

Jeff


On 2011-01-14, at 12:31 PM, Yousouf, Shenol wrote:

10x, we’ll do that as soon as possible ! J
 
Best regards,
Shenol Yousouf
SAP Labs Bulgaria
 
 
From: p2-dev-bounces@xxxxxxxxxxx [mailto:p2-dev-bounces@xxxxxxxxxxx] On Behalf Of Jeff McAffer
Sent: Friday, January 14, 2011 7:30 PM
To: P2 developer discussions
Subject: Re: [p2-dev] How can the product publisher use java profiles ?
 
These look like bugs/deficiencies to me.  Please open a bug report and, if possible, attach patches.
 
Jeff
 
 
On 2011-01-14, at 4:35 AM, Yousouf, Shenol wrote:


Hi,
 
Thanks for the reply ! See my comments below:
 
AFAIK we do not ship an application that just publishes the JRE IU.
This is not my intention too. J We want to publish a full-bloodied OSGi product to be installable from a p2 repository. Some of the bundles, included in the product, require specific versions of the jdk packages. The versions are described in a java profile file which is loaded through a startup parameter by the OSGi framework.
 
You are free to create your own profile to represent a JRE that you do know about and then publish using that info.
Well, the problem is that I don’t know how to pass that info to the publisher.
 
In fact, I suspect that the publisher can’t read an external profile at all, even though the functionality to use such a profile is there. I judge by the experience I had while debugging the publisher code. I encountered a few interesting moments in the code which I’d like to comment with you.
 
To get a little bit more technical:
1) the JREAction class has two constructors to accept external profiles. However, in productive code, both constructors are called with null parameters (some marked with TODO comments) which make the publisher to resort to a hardcoded profile from a hardcoded location.
2) Even if there are versions specified in the profile, publisher silently ignores them by passing null for a package version to the MetadataFactory in JREAction.generateJRECapability(String id, Version version).
 
My experience is based on the bundles shipped with Eclipse 3.7M4.
Can we fix this behavior ? Or am I simply running the product publisher the wrong way ?
 
Thanks and regards,
Shenol Yousouf
SAP Labs Bulgaria
 
From: p2-dev-bounces@xxxxxxxxxxx [mailto:p2-dev-bounces@xxxxxxxxxxx] On Behalf Of Jeff McAffer
Sent: Thursday, January 13, 2011 8:33 PM
To: P2 developer discussions
Subject: Re: [p2-dev] How can the product publisher use java profiles ?
 
AFAIK we do not ship an application that just publishes the JRE IU.  It is done as a by-product of product publishing.  Users can write their own apps that combine the various actions to best suit their needs to you may need to put something together if you want to run just the JRE action from the command line.
 
As for the content of the JRE IU and version numbers, in general we don't have version numbers for the packages in the JRE. The publisher just uses the content to the .profile file copied from the OSGi bundle.  If we knew what versions packages were included in the various JREs we'd include that info in the .profile file. Unfortunately, this info is not generally/reliably available.  You are free to create your own profile to represent a JRE that you do know about and then publish using that info.  If you find a way of getting definitive package version information for JRE packages, please open a bug against Equinox/Framework. It would be interesting to have that info in the main framework profiles.
 
Jeff
 



 
On 2011-01-13, at 12:09 PM, Yousouf, Shenol wrote:



Hi all,
 
As you know, during product publishing a JRE configuration unit is generated to export a standard set of java packages which installable units may require. However, the default JRE unit exports all the packages with version ‘0.0.0’ which does not suit me.  I want to publish a product along with a java profile file which specifies the exact versions I need.
 
Judging by the code, publishing has support to load such a profile from a specified location (see JREAction class for reference) but I cannot find any entry point from the product publisher application (in the current case, I need to run the application, not call the publisher API programmatically) or from the product definition file to pass such a profile. Can you tell me if there is a common way to do that ?
 
Thanks and regards,
Shenol Yousouf
SAP Labs Bulgaria
 
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev
 
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev
 
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev