Awesome, thank you Christian, that worked. I missed the part about escaping colons in the doc, but I see it now.
I have one other question. What is the ${installFolder} that is referred to in
a few places? It says on the Eclipse reference page that it is the “root
folder for this profile”, but I have no idea what that means. Is this the
plugin’s installed location in <eclipse root>/plugins/com.foo.whatever, or is
it the Eclipse install root? Is there a way to get access to any other
variables, like the workspace location or anything like that?
Thanks!
Kristina
From: [email protected] [mailto:[email protected]] On Behalf
Of Bourgeois, Christian
Sent: July-30-12 10:14 AM
To: P2 developer discussions
Subject: Re: [p2-dev] Using p2 provisioning actions and touchpoints
Hi Kristina,
You shouldn’t use quotes (") in your action arguments. In addition, if you have
colon characters, they should be represented in their escaped format (${#58})
since that character is the key-value delimiter.
It should look like:
instructions.configure=unzip(source:C ${#58}/data/somefile.zip,target:C
${#58}/data/somedirectory);
Hope that helps,
Christian
[cid:[email protected]]
Le contenu de ce courriel s'adresse au destinataire seulement. Il contient de
l'information pouvant être confidentielle. Vous ne devez ni le copier ni
l'utiliser ni le divulguer à qui que ce soit à moins que vous soyez le
destinataire ou une personne désignée autorisée. Si vous le receviez par
erreur, veuillez nous aviser immédiatement et le détruire.
The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose it
to anyone else. If you received it in error please notify us immediately and
then destroy it.
From: [email protected]<mailto:[email protected]>
[mailto:[email protected]]<mailto:[mailto:[email protected]]>
On Behalf Of Taylor, Kristina
Sent: 30 juillet 2012 09:49
To: [email protected]<mailto:[email protected]>
Subject: [p2-dev] Using p2 provisioning actions and touchpoints
I’m trying to use the p2 provisioning actions and touchpoints on plugin
install, but I can’t seem to get anything to happen (and no errors are being
logged).
My goal is to be able to unzip a file somewhere (preferably a user-configurable
location). A nice-to-have would be to be able to run some additional java code
afterwards. The native touchpoint’s “unzip” provisioning action seemed like a
great place to start, but I can’t work out how to get it to work. Here’s my
p2.inf (I figured I would start with hard-coded values, and work my way up from
there):
instructions.configure=org.eclipse.equinox.p2.touchpoint.natives.unzip(source:"C:/data/somefile.zip",target:"C:/data/somedirectory");
Both locations already exist. Am I missing something obvious, or maybe this
just doesn’t work in Juno? Do I need to also add anything to my plugin.xml or
Manifest.mf?
I’ve read (and tried various things from) all of the following:
http://chamibuddhika.wordpress.com/2011/05/18/installing-configuration-files-with-p2-inf-feature-installation/
http://chamibuddhika.wordpress.com/2011/05/18/installation-of-folders-during-p2-provisioning-with-p2-inf/
http://help.eclipse.org/juno/topic/org.eclipse.platform.doc.isv/guide/p2_actions_touchpoints.html?cp=2_0_20_1_3
http://stackoverflow.com/questions/6154367/a-working-example-of-custom-p2-provisioning-action
Since I couldn’t get the built-in ones to work, I figured I would try using the
projects in the example, and after I fixed some compile issues due to changes
in locations of classes, and added these plugins to a feature and an update
site, again, nothing happens on install (I modified the code to log an error,
then create a file somewhere, still nothing):
http://www.eclipse.org/forums/index.php/mv/msg/39856/129768/#msg_129768
This is unrelated to this particular mailing list, but in reality, my end goal
is to create a server adapter that is installable from a zip embedded in the
plugin, but I want my server to be recognized as a Virgo server so that we can
leverage the Virgo tooling. It’s really virgo+some extras.
Kristina Taylor
Senior Software Development Engineer
Integrity Business Unit
T 226.772.3478
E [email protected]<mailto:[email protected]>
This e-mail message may contain information that is confidential and/or legally
privileged. It is intended only for the named addressee(s) and any use or
disclosure by others is strictly prohibited. If you have received this e-mail
in error please notify the sender immediately and destroy all copies of the
e-mail. Thank you.
*** eSafe scanned this email for malicious content ***
*** IMPORTANT: Do not open attachments from unrecognized senders ***
<<inline: image001.jpg>>
_______________________________________________ p2-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/p2-dev
