[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [p2-dev] Help with creating P2 update site
- From: Kristina Taylor <Kristina.Taylor@xxxxxxx>
- Date: Thu, 22 Oct 2009 15:28:36 -0400
- Accept-language: en-US, en-CA
- Acceptlanguage: en-US, en-CA
- Delivered-to: firstname.lastname@example.org
- Thread-index: AcpDlnpgnVKvdSUCR4SmVdsRVmZZTwPsCO7g
- Thread-topic: [p2-dev] Help with creating P2 update site
Thank you for the reply. I'm finally getting back to this problem after getting sidetracked yet again. I'm not really getting anywhere, unfortunately. I'm by no means a build expert/release engineer of any sort, so please bear with me.
We don't use CVS at all, so for me, the gef example fails saying "[build] [eclipse.fetch] Could not retrieve feature.xml and/or build.properties: java.io.IOException: Cannot run program "cvs" (in directory "C:\tmp\build\N200910221443\eclipse\tempFeature"): CreateProcess error=2, The system cannot find the file specified.". I'm not sure installing and configuring CVS is a good use of my time, just to make an example work. So, for simplicity's sake, I figured I'd try again to get it working manually within the PDE UI before I tried making sense of the scripts and ant tasks. If I can't get it working manually, I can't see how I have any hope of automating it. So, this is what I did:
1. Created a feature that contains all of my plugins (3) and fragments (2), and includes my feature (which in turn also includes the 3 plugins).
2. Created an update site
2a. Added my master feature
2b. Built the site. It generated jars for the master feature, my feature, and for each of my 5 plugins/fragments, as well as the artifacts.jar and contents.jar.
3. Start a clean debug instance of eclipse with none of my workspace plugins enabled.
3a. Add the local update site
3b. Install the "all in one" feature
3c. Let Eclipse it restart itself.
My feature is listed as installed software (under Help -> About -> Installation Details), but none of my plugins are listed in the plugin registry, nor are the GUI elements being loaded. It's also not showing up under "Features" in the Installation Details box. I'm obviously missing something fundamental. If in step 2a, I also add my other (non-master) feature to the update site, then in step 3b try to install that one instead, I get the same result. What I find rather odd is that in the list of installed software, the ID is feature.a.feature.group. Where's this "feature.group" thing coming from? I don't get the error I was having previously any more (I think there may have been a spurious dependency on one of my plugins in my feature), but I'm not exactly getting any further, either.
Thanks for your help,
From: p2-dev-bounces@xxxxxxxxxxx [mailto:p2-dev-bounces@xxxxxxxxxxx] On Behalf Of Nick Boldt
Sent: October 2, 2009 3:28 PM
To: P2 developer discussions; Tools for Committer Community
Subject: Re: [p2-dev] Help with creating P2 update site
Assuming you need to build, and *rebuild* this once in a while, and have little overhead involved in doing so, have you considered doing a headless (not with Eclipse PDE/UI) build, and generating an update site zip?
Easiest way to do that, IMHO, is to use Athena. It will also run your JUnit Plugin Tests, if you have any, as part of the build. If you're on Linux. (On Mac/Win, YMMV.)
Getting started w/ an Athena-style build (which is really Eclipse PDE/Build wrapped with some goodies to make it easier):
The sample project outlined there is for the GEF project; once you get it working, you can use the same concept to do a build for your own plugins/features, and by default you'll end up with an update site zip (complete with p2 metadata). Unpack that zip onto some server, and voom
- update site!
Only requirement is that you create a feature which contains everything you want on the site, often called the "all-in-one" or "master" feature.
It can contain both features & plugins (feature.*, plugin.*, fragments).
Once you have it working in Eclipse, you can then wrap it with some CI engine (like Hudson, Cruise Control, etc.) and have it run automatically on a schedule or when your sources change.
If you have any problems, don't hesitate to ask here or in dash-dev@xxxxxxxxxxxx
Kristina Taylor wrote:
> I asked about this a while back, but got sidetracked with other work
> before I could figure it out. If this is the wrong place to ask,
> please point me to the right place.
> I have a feature that has several plugins and plugin fragments, that
> was originally developed for 3.2. It's been updated along the way,
> but it continues to work with every version of Eclipse since then, up
> until now (3.5). It will install and runs just fine on Eclipse 3.5,
> but only if installed via the classic updates capability (by adding an
> extension location). I want to get it to work properly with p2. I'm
> assuming that the best way to do this is to create a proper update
> site, but the tools are creating something uninstallable.
> I have this dependency structure: feature.a provides plugin.b,
> plugin.c, plugin.d. plugin.b is independent (help content). plugin.c
> requires plugin.d. I have two plugin fragments (language packs) for
> plugin.c and plugin.d.
> I created an update site in Eclipse, using the wizard, and basically
> just left everything as generated. I added feature.a and clicked
> build. It generates a feature.a.version.jar file in a features
> directory, and the plugin.b.version.jar, plugin.c.version.jar and
> plugin.d.version.jar files in a plugins directory. Neither c or d
> seem to have any reference to their fragments, and while that's not my
> primary concern right now, I would like to know how to make sure those
> are included properly. It also generates an artifacts.jar and
> content.jar, which each contain xml files of the same name. I can send
> copies if these files would be useful in solving my problem. Speaking
> of which...
> My problem: everything appears to build and generate without issues,
> but I can't install from the update site. I get 4 errrors, all identical:
> Operation Details
> -> Cannot complete the install because one or more required
> items could not be found.
> -> Missing requirement: 1254503723371
> 0.0.0.1254503723371 requires 'feature.a.feature.group [4.10.1]' but it
> could not be found
> I have nothing named anything like "feature.group", and the ID of the
> "plugin" that it's complaining about appears to be the timestamp of
> the attempted install (it's different each time I try to install, even
> if I haven't rebuilt in between). What's going on?
> Kristina Taylor
> Software Developer, MKS Inc.
> Waterloo, ON, Canada
> 519 883 3478
> p2-dev mailing list
Nick Boldt :: http://nick.divbyzero.com
Release Engineer :: Eclipse Modeling & Dash Athena _______________________________________________
p2-dev mailing list