Andrew,
Thanks for the info. I got his working now.
I also found that this topic was discussed in http://dev.eclipse.org/newslists/news.eclipse.technology.equinox/msg06116.html.
Best regards,
Alain Lee
Texas
Instruments Canada Ltd
801 - 150 John Street, Toronto ON Canada
M5V 3E3
Phone:
416-340-2136 Fax: 416-599-7171
mailto:a-lee@xxxxxx
From: p2-dev-bounces@xxxxxxxxxxx
[mailto:p2-dev-bounces@xxxxxxxxxxx] On Behalf
Of Andrew Niefer
Sent: Thursday, March 18, 2010
5:26 PM
To: P2 developer discussions
Subject: Re: [p2-dev] how to
install the product and custom actions at the same time
Alain,
I'm
not sure of all the details, but I believe you need to have a "meta
requirement" from the IU that want to use the action (my.feature.feature.group)
to the IU that provides it (my.p2.actions).
Metarequirements
must be present before the IU can be installed, I think p2 will install the
meta requirements first, so your action is then present, then it installs
everything else.
The
p2.inf to add the meta requirements is
metaRequirements.<#>.namespace =
<namespace>
metaRequirements.<#>.name = <name>
metaRequirements.<#>.range = <range> (optional / default: 0.0.0)
metaRequirements.<#>.greedy =
<true|false> (optional / default:
true)
metaRequirements.<#>.optional =
<true|false> (optional / default:
false)
metaRequirements.<#>.multiple = <true|false>
(optional / default: false)
See
http://wiki.eclipse.org/Equinox/p2/Customizing_Metadata.
-Andrew
From:
|
"Lee, Alain"
<a-lee@xxxxxx>
|
To:
|
"p2-dev@xxxxxxxxxxx"
<p2-dev@xxxxxxxxxxx>
|
Date:
|
03/18/2010 04:12 PM
|
Subject:
|
[p2-dev] how to install the product and custom
actions at the same time
|
Sent by:
|
p2-dev-bounces@xxxxxxxxxxx
|
Hello,
I
have a question about custom touchpoint action.
I
am trying to implement a set of custom touchpoint actions
(my.p2.actions.plugin) to install our plugin (my.feature.plugin).
my.p2.actions.plugin is not yet installed in Eclipse.
Could
I package my.p2.actions.plugin and my.feature.plugin into one feature and tell
P2 to import actions from my.p2.actions.plugin?
I
included these 2 plugin in the feature.xml but the following error was seen:
An
error occurred while configuring the installed items
session
context was:(profile="" phase=org.eclipse.equinox.interna
l.p2.engine.phases.Configure,
operand=null --> [R]my.feature.feature.group 1.0.0
.201003181555,
action="">
No
action found for: my.p2.actions.myAction.
Caused
by: Application failed, log file location: C:\Documents and Settings\a038
9314\workspace\.metadata\.log
The
p2.inf for and my.feature.plugin is as follows:
instructions.configure=\
myAction(path:"ssdfd");
instructions.configure.import=\
my.p2.actions.myAction
I
am including the content.xml for your reference:
<units size='4'>
<unit id='my.feature.feature.jar' version='1.0.0.201003181555'>
<properties size='3'>
<property name='org.eclipse.equinox.p2.name'
value='Feature Feature'/>
<property name='org.eclipse.equinox.p2.description'
value='[Enter Feature Description here.]'/>
<property name='org.eclipse.equinox.p2.description.url'
value='http://www.example.com/description'/>
</properties>
<provides size='3'>
<provided namespace='org.eclipse.equinox.p2.iu'
name='my.feature.feature.jar' version='1.0.0.201003181555'/>
<provided
namespace='org.eclipse.equinox.p2.eclipse.type' name='feature'
version='1.0.0'/>
<provided namespace='org.eclipse.update.feature'
name='my.feature' version='1.0.0.201003181555'/>
</provides>
<filter>
(org.eclipse.update.install.features=true)
</filter>
<artifacts size='1'>
<artifact classifier='org.eclipse.update.feature'
id='my.feature' version='1.0.0.201003181555'/>
</artifacts>
<touchpoint id='org.eclipse.equinox.p2.osgi'
version='1.0.0'/>
<touchpointData size='1'>
<instructions size='1'>
<instruction key='zipped'>
true
</instruction>
</instructions>
</touchpointData>
<licenses size='1'>
<license uri='http://www.example.com/license'
url=''>
[Enter License Description here.]
</license>
</licenses>
<copyright uri='http://www.example.com/copyright'
url=''>
[Enter Copyright Description here.]
</copyright>
</unit>
<unit id='my.feature.feature.group' version='1.0.0.201003181555'
singleton='false'>
<update id='my.feature.feature.group'
range='[0.0.0,1.0.0.201003181555)' severity='0'/>
<properties size='4'>
<property name='org.eclipse.equinox.p2.name'
value='Feature Feature'/>
<property name='org.eclipse.equinox.p2.description'
value='[Enter Feature Description here.]'/>
<property name='org.eclipse.equinox.p2.description.url'
value='http://www.example.com/description'/>
<property name='org.eclipse.equinox.p2.type.group'
value='true'/>
</properties>
<provides size='1'>
<provided namespace='org.eclipse.equinox.p2.iu'
name='my.feature.feature.group' version='1.0.0.201003181555'/>
</provides>
<requires size='3'>
<required namespace='org.eclipse.equinox.p2.iu'
name='my.plugin' range='[1.0.0.201003181555,1.0.0.201003181555]'/>
<required namespace='org.eclipse.equinox.p2.iu'
name='my.p2.actions' range='[5.0.0.201003181555,5.0.0.201003181555]'/>
<required namespace='org.eclipse.equinox.p2.iu'
name='my.feature.feature.jar'
range='[1.0.0.201003181555,1.0.0.201003181555]'>
<filter>
(org.eclipse.update.install.features=true)
</filter>
</required>
</requires>
<touchpoint id='null' version='0.0.0'/>
<touchpointData size='1'>
<instructions size='1'>
<instruction key='configure'
import='my.p2.actions.myAction'>
myAction(path:"ssdfd");
</instruction>
</instructions>
</touchpointData>
<licenses size='1'>
<license uri='http://www.example.com/license'
url=''>
[Enter License Description here.]
</license>
</licenses>
<copyright uri='http://www.example.com/copyright'
url=''>
[Enter Copyright Description here.]
</copyright>
</unit>
<unit id='my.plugin' version='1.0.0.201003181555'>
<update id='my.plugin' range='[0.0.0,1.0.0.201003181555)'
severity='0'/>
<properties size='1'>
<property name='org.eclipse.equinox.p2.name'
value='Plugin Plug-in'/>
</properties>
<provides size='3'>
<provided namespace='org.eclipse.equinox.p2.iu'
name='my.plugin' version='1.0.0.201003181555'/>
<provided namespace='osgi.bundle' name='my.plugin'
version='1.0.0.201003181555'/>
<provided namespace='org.eclipse.equinox.p2.eclipse.type'
name='bundle' version='1.0.0'/>
</provides>
<requires size='2'>
<required namespace='osgi.bundle' name='org.eclipse.ui'
range='0.0.0'/>
<required namespace='osgi.bundle'
name='org.eclipse.core.runtime' range='0.0.0'/>
</requires>
<artifacts size='1'>
<artifact classifier='osgi.bundle' id='my.plugin'
version='1.0.0.201003181555'/>
</artifacts>
<touchpoint id='org.eclipse.equinox.p2.osgi'
version='1.0.0'/>
<touchpointData size='1'>
<instructions size='2'>
<instruction key='manifest'>
Bundle-ManifestVersion:
2
Bundle-Name: Plugin Plug-in
Bundle-Version:
1.0.0.201003181555
Require-Bundle: org.eclipse.ui,org.eclipse.core.runtime
Eclipse-LazyStart:
true
Bundle-RequiredExecutionEnvironment:
J2SE-1.4
Bundle-SymbolicName: my.plugin;
singleton:=true
Manifest-Version: 1.0
Bundle-Activator:
my.plugin.Activator
</instruction>
<instruction key='zipped'>
true
</instruction>
</instructions>
</touchpointData>
</unit>
<unit id='my.p2.actions' version='5.0.0.201003181555'>
<update id='my.p2.actions' range='[0.0.0,5.0.0.201003181555)'
severity='0'/>
<properties size='2'>
<property name='org.eclipse.equinox.p2.name' value='My
P2 Actions'/>
<property name='org.eclipse.equinox.p2.provider'
value='TI'/>
</properties>
<provides size='4'>
<provided namespace='org.eclipse.equinox.p2.iu'
name='my.p2.actions' version='5.0.0.201003181555'/>
<provided namespace='osgi.bundle' name='my.p2.actions'
version='5.0.0.201003181555'/>
<provided namespace='java.package' name='my.p2.actions'
version='0.0.0'/>
<provided
namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle'
version='1.0.0'/>
</provides>
<requires size='4'>
<required namespace='osgi.bundle'
name='org.eclipse.core.runtime' range='0.0.0'/>
<required namespace='osgi.bundle'
name='org.eclipse.equinox.p2.engine' range='0.0.0'/>
<required namespace='osgi.bundle'
name='org.eclipse.equinox.p2.touchpoint.eclipse' range='0.0.0'/>
<required namespace='osgi.bundle' name='org.eclipse.equinox.p2.touchpoint.natives'
range='0.0.0'/>
</requires>
<artifacts size='1'>
<artifact classifier='osgi.bundle' id='my.p2.actions'
version='5.0.0.201003181555'/>
</artifacts>
<touchpoint id='org.eclipse.equinox.p2.osgi'
version='1.0.0'/>
<touchpointData size='1'>
<instructions size='1'>
<instruction key='manifest'>
Bundle-Vendor:
TI
Bundle-ManifestVersion: 2
Bundle-Activator:
my.p2.actions.Activator
Bundle-RequiredExecutionEnvironment:
JavaSE-1.6
Require-Bundle:
org.eclipse.core.runtime,org.eclipse.equinox.p2.engine,org.eclipse.equinox.p2.touchpoint.eclipse,org.eclipse.equinox.p2.touchpoint.natives
Bundle-Name:
My P2 Actions
Bundle-ActivationPolicy: lazy
Manifest-Version:
1.0
Bundle-SymbolicName:
my.p2.actions;singleton:=true
Bundle-Version:
5.0.0.201003181555
Export-Package: my.p2.actions
</instruction>
</instructions>
</touchpointData>
</unit>
</units>
Best
regards,
Alain Lee
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev