Home » Eclipse Projects » Equinox » How To Package P2 Binary Artifacts
How To Package P2 Binary Artifacts [message #130259] |
Thu, 30 April 2009 10:57  |
Eclipse User |
|
|
|
Originally posted by: mark_melvin.amis.com
Hello Again,
I am trying to write a feature combined with a p2.inf file that will use a
native touchpoint to install some files (via the unzip action). How do I
actually package these binary files so that they are available on the
update site? I assume I do not want to just zip them up in the wrapper
feature JAR.
I mirrored the Galileo repository and noticed that there is a "binaries"
folder in the repository containing files meant to be installed with an
unzip native touchpoint action (these are platform-specific root files).
How were those files created? Is there a built-in P2 or PDE build
mechanism for this?
Thanks,
Mark.
|
|
|
Re: How To Package P2 Binary Artifacts [message #130296 is a reply to message #130259] |
Thu, 30 April 2009 17:28   |
Eclipse User |
|
|
|
Originally posted by: mark_melvin.amis.com
Sorry, but I am at a complete loss here. Is this even doable from a
feature + p2.inf file? How do I get PDE build (or is there perhaps a P2
Ant task?) to generate the artifacts XML desriptions and the contents of
the "binary" subdirectory? I see there is supposedly an 'artifacts'
prefix in the p2.inf file (at least it is mentioned in a bug). Is this
usable? No matter what incantation I try I get nothing out of a PDE
export operation, and it seems to ignore my p2.inf changes and just
generate its own idea of the metadata. I'm digging through a HEAD version
of the source code, but frankly it isn't telling me much.
Let's simplify things. I have a zipfile (lets call it binaries.zip) that
contains one file (let's say readme.txt). I want this zipfile to be
unzipped to my installation directory whenever my main feature is
installed (let's call it "my.feature"), and removed when it is
uninstalled. What do I have to do to generate the P2 metadata to make
this happen?
Ideally, I would like "my.feature" to declare that it includes an IU that
unzips "binaries.zip" via a native touchpoint action. Should I be looking
at creating another feature that wraps "binaries.zip"? Is there a way to
do this and have *something* generate the appropriate metadata for me as
part of a build process?
I appreciate the help so far, but can I humbly suggest something? A
little time now writing a quick specification of the p2.inf format (it has
to be frozen by now I assume!?), or even an explanation of the metadata
XML schema will gain you a lot more P2 adopters for this release. If we
can't figure out how to use it we can't move to it, and I'm sure there are
a lot of other companies out there that like to start adopting the latest
version of Eclipse at or around M6/M7 so they can release when the Galileo
train leaves the station.
Once I figure it out I'd be happy to write up my experiences in a blog
post - but I can't even get started at this point and I am quickly
approaching my drop dead date for adopting Eclipse 3.5.
Mark.
Mark Melvin wrote:
> Hello Again,
> I am trying to write a feature combined with a p2.inf file that will use a
> native touchpoint to install some files (via the unzip action). How do I
> actually package these binary files so that they are available on the
> update site? I assume I do not want to just zip them up in the wrapper
> feature JAR.
> I mirrored the Galileo repository and noticed that there is a "binaries"
> folder in the repository containing files meant to be installed with an
> unzip native touchpoint action (these are platform-specific root files).
> How were those files created? Is there a built-in P2 or PDE build
> mechanism for this?
> Thanks,
> Mark.
|
|
|
Re: How To Package P2 Binary Artifacts [message #130388 is a reply to message #130296] |
Fri, 01 May 2009 16:02   |
Eclipse User |
|
|
|
You don't need a p2.inf to accomplish this.
Features have always had the ability to contribute "root files" in a
headless build. These files have always shown up in the root of the
resulting archives.
There are some docs on this here:
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.pde.doc.user/tasks/pde_rootfiles.htm
Essentially you have a feature something like this:
org.foo.feature
- rootfiles/readme.txt
- build.properties : root = rootfiles/readme.txt
- feature.xml
So far everything above is historical.
Now, when using the pde.build with publisher to build this feature (ie,
export from the UI starting just after M6, or headless builds with
p2.gathering=true), you automatically get the following IU structure
IU my.feature.feature.group
- my.feature.jar -> artifact my.feature_1.0.0.jar
- my.feature_root -> binary my.feature_root_1.0.0
You can specify per-platform root files (and get *_root.win32.win32.x86,
etc), and also permissions and link instructions. (Though there are
still a few bugs here, I think links may be broken right now).
This is new and requires pde.build set up to use the publisher. Old 3.4
style builds with metadata generation using p2.generate.metadata won't
do this. Turn this on with p2.gathering=true, which will publish
metadata directly from source during what used to be the
gather.bin.parts phase of the build. (This is instead of generating
metadata from binary jars).
Try is out by getting something recent, I20090430-2300 is the current M7
candidiate. Create a feature with root properties and export it with
metadata.
-Andrew
Mark Melvin wrote:
> Sorry, but I am at a complete loss here. Is this even doable from a
> feature + p2.inf file? How do I get PDE build (or is there perhaps a P2
> Ant task?) to generate the artifacts XML desriptions and the contents of
> the "binary" subdirectory? I see there is supposedly an 'artifacts'
> prefix in the p2.inf file (at least it is mentioned in a bug). Is this
> usable? No matter what incantation I try I get nothing out of a PDE
> export operation, and it seems to ignore my p2.inf changes and just
> generate its own idea of the metadata. I'm digging through a HEAD
> version of the source code, but frankly it isn't telling me much.
>
> Let's simplify things. I have a zipfile (lets call it binaries.zip)
> that contains one file (let's say readme.txt). I want this zipfile to
> be unzipped to my installation directory whenever my main feature is
> installed (let's call it "my.feature"), and removed when it is
> uninstalled. What do I have to do to generate the P2 metadata to make
> this happen?
>
> Ideally, I would like "my.feature" to declare that it includes an IU
> that unzips "binaries.zip" via a native touchpoint action. Should I be
> looking at creating another feature that wraps "binaries.zip"? Is there
> a way to do this and have *something* generate the appropriate metadata
> for me as part of a build process?
>
> I appreciate the help so far, but can I humbly suggest something? A
> little time now writing a quick specification of the p2.inf format (it
> has to be frozen by now I assume!?), or even an explanation of the
> metadata XML schema will gain you a lot more P2 adopters for this
> release. If we can't figure out how to use it we can't move to it, and
> I'm sure there are a lot of other companies out there that like to start
> adopting the latest version of Eclipse at or around M6/M7 so they can
> release when the Galileo train leaves the station.
>
> Once I figure it out I'd be happy to write up my experiences in a blog
> post - but I can't even get started at this point and I am quickly
> approaching my drop dead date for adopting Eclipse 3.5.
>
> Mark.
>
>
> Mark Melvin wrote:
>
>> Hello Again,
>
>> I am trying to write a feature combined with a p2.inf file that will
>> use a native touchpoint to install some files (via the unzip action).
>> How do I actually package these binary files so that they are
>> available on the update site? I assume I do not want to just zip them
>> up in the wrapper feature JAR.
>
>> I mirrored the Galileo repository and noticed that there is a
>> "binaries" folder in the repository containing files meant to be
>> installed with an unzip native touchpoint action (these are
>> platform-specific root files). How were those files created? Is
>> there a built-in P2 or PDE build mechanism for this?
>
>> Thanks,
>> Mark.
>
|
|
|
Re: How To Package P2 Binary Artifacts [message #130400 is a reply to message #130388] |
Fri, 01 May 2009 16:15   |
Eclipse User |
|
|
|
Originally posted by: mark_melvin.amis.com
Hi Andrew,
Yes, I realize this and I guess I should have been more specific. I was
attempting to simplify the situation to give a very basic scenario to work
from.
In reality, I want to place files elsewhere (not just in the root of
Eclipse). I also want to deal with multiple features depending on the
same common feature (that may install files). My install handlers used
to handle all of this for me, and I am still looking for a way to replace
them in P2. The old "root files" approach that has been around for ages
is simply not good enough for what I need to do.
Mark.
Andrew Niefer wrote:
> You don't need a p2.inf to accomplish this.
> Features have always had the ability to contribute "root files" in a
> headless build. These files have always shown up in the root of the
> resulting archives.
> There are some docs on this here:
>
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.pde.doc.user/tasks/pde_rootfiles.htm
> Essentially you have a feature something like this:
> org.foo.feature
> - rootfiles/readme.txt
> - build.properties : root = rootfiles/readme.txt
> - feature.xml
> So far everything above is historical.
> Now, when using the pde.build with publisher to build this feature (ie,
> export from the UI starting just after M6, or headless builds with
> p2.gathering=true), you automatically get the following IU structure
> IU my.feature.feature.group
> - my.feature.jar -> artifact my.feature_1.0.0.jar
> - my.feature_root -> binary my.feature_root_1.0.0
> You can specify per-platform root files (and get *_root.win32.win32.x86,
> etc), and also permissions and link instructions. (Though there are
> still a few bugs here, I think links may be broken right now).
> This is new and requires pde.build set up to use the publisher. Old 3.4
> style builds with metadata generation using p2.generate.metadata won't
> do this. Turn this on with p2.gathering=true, which will publish
> metadata directly from source during what used to be the
> gather.bin.parts phase of the build. (This is instead of generating
> metadata from binary jars).
> Try is out by getting something recent, I20090430-2300 is the current M7
> candidiate. Create a feature with root properties and export it with
> metadata.
> -Andrew
> Mark Melvin wrote:
>> Sorry, but I am at a complete loss here. Is this even doable from a
>> feature + p2.inf file? How do I get PDE build (or is there perhaps a P2
>> Ant task?) to generate the artifacts XML desriptions and the contents of
>> the "binary" subdirectory? I see there is supposedly an 'artifacts'
>> prefix in the p2.inf file (at least it is mentioned in a bug). Is this
>> usable? No matter what incantation I try I get nothing out of a PDE
>> export operation, and it seems to ignore my p2.inf changes and just
>> generate its own idea of the metadata. I'm digging through a HEAD
>> version of the source code, but frankly it isn't telling me much.
>>
>> Let's simplify things. I have a zipfile (lets call it binaries.zip)
>> that contains one file (let's say readme.txt). I want this zipfile to
>> be unzipped to my installation directory whenever my main feature is
>> installed (let's call it "my.feature"), and removed when it is
>> uninstalled. What do I have to do to generate the P2 metadata to make
>> this happen?
>>
>> Ideally, I would like "my.feature" to declare that it includes an IU
>> that unzips "binaries.zip" via a native touchpoint action. Should I be
>> looking at creating another feature that wraps "binaries.zip"? Is there
>> a way to do this and have *something* generate the appropriate metadata
>> for me as part of a build process?
>>
>> I appreciate the help so far, but can I humbly suggest something? A
>> little time now writing a quick specification of the p2.inf format (it
>> has to be frozen by now I assume!?), or even an explanation of the
>> metadata XML schema will gain you a lot more P2 adopters for this
>> release. If we can't figure out how to use it we can't move to it, and
>> I'm sure there are a lot of other companies out there that like to start
>> adopting the latest version of Eclipse at or around M6/M7 so they can
>> release when the Galileo train leaves the station.
>>
>> Once I figure it out I'd be happy to write up my experiences in a blog
>> post - but I can't even get started at this point and I am quickly
>> approaching my drop dead date for adopting Eclipse 3.5.
>>
>> Mark.
>>
>>
>> Mark Melvin wrote:
>>
>>> Hello Again,
>>
>>> I am trying to write a feature combined with a p2.inf file that will
>>> use a native touchpoint to install some files (via the unzip action).
>>> How do I actually package these binary files so that they are
>>> available on the update site? I assume I do not want to just zip them
>>> up in the wrapper feature JAR.
>>
>>> I mirrored the Galileo repository and noticed that there is a
>>> "binaries" folder in the repository containing files meant to be
>>> installed with an unzip native touchpoint action (these are
>>> platform-specific root files). How were those files created? Is
>>> there a built-in P2 or PDE build mechanism for this?
>>
>>> Thanks,
>>> Mark.
>>
|
|
|
Re: How To Package P2 Binary Artifacts [message #130413 is a reply to message #130388] |
Fri, 01 May 2009 16:24  |
Eclipse User |
|
|
|
Originally posted by: mark_melvin.amis.com
Hey Andrew,
Let's saw I *wanted* to accomplish this via p2.inf and generate my own IUs
and artifacts, and use a native touchpoint unzip action to install the
file. How would I go about doing it? Is it a very simple procedure?
Seeing how this simple case is done would shave days off my P2 prototyping
efforts (see my other thread "Generating Configuration Metadata" that is
gradually converging to the same theme as this one).
Thanks,
Mark.
Andrew Niefer wrote:
> You don't need a p2.inf to accomplish this.
> Features have always had the ability to contribute "root files" in a
> headless build. These files have always shown up in the root of the
> resulting archives.
> There are some docs on this here:
>
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.pde.doc.user/tasks/pde_rootfiles.htm
> Essentially you have a feature something like this:
> org.foo.feature
> - rootfiles/readme.txt
> - build.properties : root = rootfiles/readme.txt
> - feature.xml
> So far everything above is historical.
> Now, when using the pde.build with publisher to build this feature (ie,
> export from the UI starting just after M6, or headless builds with
> p2.gathering=true), you automatically get the following IU structure
> IU my.feature.feature.group
> - my.feature.jar -> artifact my.feature_1.0.0.jar
> - my.feature_root -> binary my.feature_root_1.0.0
> You can specify per-platform root files (and get *_root.win32.win32.x86,
> etc), and also permissions and link instructions. (Though there are
> still a few bugs here, I think links may be broken right now).
> This is new and requires pde.build set up to use the publisher. Old 3.4
> style builds with metadata generation using p2.generate.metadata won't
> do this. Turn this on with p2.gathering=true, which will publish
> metadata directly from source during what used to be the
> gather.bin.parts phase of the build. (This is instead of generating
> metadata from binary jars).
> Try is out by getting something recent, I20090430-2300 is the current M7
> candidiate. Create a feature with root properties and export it with
> metadata.
> -Andrew
> Mark Melvin wrote:
>> Sorry, but I am at a complete loss here. Is this even doable from a
>> feature + p2.inf file? How do I get PDE build (or is there perhaps a P2
>> Ant task?) to generate the artifacts XML desriptions and the contents of
>> the "binary" subdirectory? I see there is supposedly an 'artifacts'
>> prefix in the p2.inf file (at least it is mentioned in a bug). Is this
>> usable? No matter what incantation I try I get nothing out of a PDE
>> export operation, and it seems to ignore my p2.inf changes and just
>> generate its own idea of the metadata. I'm digging through a HEAD
>> version of the source code, but frankly it isn't telling me much.
>>
>> Let's simplify things. I have a zipfile (lets call it binaries.zip)
>> that contains one file (let's say readme.txt). I want this zipfile to
>> be unzipped to my installation directory whenever my main feature is
>> installed (let's call it "my.feature"), and removed when it is
>> uninstalled. What do I have to do to generate the P2 metadata to make
>> this happen?
>>
>> Ideally, I would like "my.feature" to declare that it includes an IU
>> that unzips "binaries.zip" via a native touchpoint action. Should I be
>> looking at creating another feature that wraps "binaries.zip"? Is there
>> a way to do this and have *something* generate the appropriate metadata
>> for me as part of a build process?
>>
>> I appreciate the help so far, but can I humbly suggest something? A
>> little time now writing a quick specification of the p2.inf format (it
>> has to be frozen by now I assume!?), or even an explanation of the
>> metadata XML schema will gain you a lot more P2 adopters for this
>> release. If we can't figure out how to use it we can't move to it, and
>> I'm sure there are a lot of other companies out there that like to start
>> adopting the latest version of Eclipse at or around M6/M7 so they can
>> release when the Galileo train leaves the station.
>>
>> Once I figure it out I'd be happy to write up my experiences in a blog
>> post - but I can't even get started at this point and I am quickly
>> approaching my drop dead date for adopting Eclipse 3.5.
>>
>> Mark.
>>
>>
>> Mark Melvin wrote:
>>
>>> Hello Again,
>>
>>> I am trying to write a feature combined with a p2.inf file that will
>>> use a native touchpoint to install some files (via the unzip action).
>>> How do I actually package these binary files so that they are
>>> available on the update site? I assume I do not want to just zip them
>>> up in the wrapper feature JAR.
>>
>>> I mirrored the Galileo repository and noticed that there is a
>>> "binaries" folder in the repository containing files meant to be
>>> installed with an unzip native touchpoint action (these are
>>> platform-specific root files). How were those files created? Is
>>> there a built-in P2 or PDE build mechanism for this?
>>
>>> Thanks,
>>> Mark.
>>
|
|
|
Goto Forum:
Current Time: Thu Jul 17 15:26:19 EDT 2025
Powered by FUDForum. Page generated in 0.07764 seconds
|