[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] non-OSGi artifact with p2

Hi,

 

I am not quite sure how you build your features, but I can hint at one of two approaches to achieve this:

 

1. In your feature project create a folder and unzip the contents of your current config.zip there. Add the following line to the build.properties file (if none exists, create it) in the feature project: “root=<folder>”, pointing the root property to the folder name (i.e. not file path), created in the previous step. On publishing, a binary artifact will be created and the result repository will contain an IU with pre-generated touchpoint instructions to unzip it. Unfortunately, they always unzip to ${installFolder}, which might not suit you.

 

2. The other way is to use a bundle instead of a feature but use the “bin.includes” property in the build.properties file instead of “root” to point to the bundle subdirectory with the content to unzip. Then, include a p2.inf in the META-INF folder of the bundle with instruction like:

instructions.configure=\
    org.eclipse.equinox.p2.touchpoint.natives.unzip(source:${artifact}, target:${installFolder}/<target_folder>);

which should unzip the bundle to the desired location. The disadvantage is that you will have one extra bundle with static content installed on the system.

 

HTH,

Shenol Yousouf

SAP Labs Bulgaria

 

From: p2-dev-bounces@xxxxxxxxxxx [mailto:p2-dev-bounces@xxxxxxxxxxx] On Behalf Of Dmytro Pishchukhin
Sent: Wednesday, February 16, 2011 5:50 PM
To: P2 developer discussions
Subject: Re: [p2-dev] non-OSGi artifact with p2

 

Thx for your samples.

I have one more question:
I've added to my feature a zip file that I like to unzip during configure phase. I can set target folder with ${installFolder}/<target folder>.

How can I define path to the zip file for source param?

this does not work for me.
instructions.configure=\
    org.eclipse.equinox.p2.touchpoint.natives.unzip(source:${artifact}/config.zip, target:${installFolder});

Are there any variables I can use to access feature installation folder? (e.g. /features/<my_feature>)

Thanks.

Best regards,
Dmytro Pishchukhin

On Sat, Feb 12, 2011 at 03:51, Pascal Rapicault <pascal@xxxxxxxxxxxx> wrote:

You need to use the addJvmArg action in a configure phase. 

It should give something like that: addJvmArg(jvmArg:-Xbooclasspath/a=${artifact.location})

 

Attached is an example of a bundle doing this.

 

 

 

hth

 

 

On 2011-02-11, at 12:08 AM, Dmytro Pishchukhin wrote:



Thank you, Pascal.

I found the way how to add my library to launcher class path (it works fine for my case): add option "-Xbooclasspath/a=" to lancher.ini (eclipse.ini)

Best regards,
Dmytro Pishchukhin

On Fri, Feb 11, 2011 at 03:21, Pascal Rapicault <pascal@xxxxxxxxxxxx> wrote:

 

On Thu, Feb 10, 2011 at 10:11 AM, Dmytro Pishchukhin <dmytro.pishchukhin@xxxxxxxxx> wrote:

Hello All,

I'd like to add to my product non-OSGi artifact that contains folders/configuration files/JARs that should be added to launcher classpath.

      Without even p2 involved, I'm not sure that what you are trying to do is in fact possible. To add something to the launcher you need to pass several arguments to -startup in the eclipse.ini which I don't if it is possible. If you tell me in which eclipse file you need to modify (e.g. eclipse.ini, config.ini) then I should be able to help more.

 


How should I describe this artifact (as plugin, as zip file)? Which touchpoints should I use to unzip it and change class path options?

    If they are just a bunch of files, I think you should use a "binary" artifact, and the touchpoint action to drive where the unzipping should be done. Here is an example of XML for a similar case in the eclipse sdk. 

ATM, the main difficulty with this is that there is no tooling provided out of the box with p2 to create such an IU (e.g. no editor like we have for features) and you will have to generate the XML as part of your build.

 

 

Are there any samples/docs that can help me with my requirements?

Thank you in advance.

Best regards,
Dmytro Pishchukhin

_______________________________________________
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

 


_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev