Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Equinox/p2/Getting Started"

< Equinox‎ | p2
Line 32: Line 32:
  
  
[[Category:Provisioning]]
+
[[Category:Provisioning|Getting Started]]
 
[[Category:Equinox|Provisioning]]
 
[[Category:Equinox|Provisioning]]

Revision as of 17:42, 26 June 2007

Getting the code

  1. Create a CVS repository connection to ":pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse". Hint: Select the quoted text, open the CVS Repositories view, and select "Paste Connection" or hit Ctrl+V to add the connection
  2. Expand HEAD -> equinox-incubator > provisioning
  3. Checkout org.eclipse.equinox.prov.releng
  4. File > Import > Team Project Set. Select "projectSet.psf" in the releng project checked out above
  5. Follow the instructions in com.thoughtworks.xstream/README.txt to load the xstream code (this is temporary until we sort out a story for XML serialization)

Setting up selfhosting

Self-hosting is the ability to develop Eclipse bundles using Eclipse and then run them from Eclipse. This just works for free in normal cases but when doing provisioning work, there are some challenges. Under the covers PDE uses Update Manager to discover and manage the set of bundles to be run. Of course, with the new provisioning work, we don't have Update Manager. So, until the provisioning support solidifies and PDE support is added, you have to do a few tricks to be really effective. For those who care, this process is somewhat similar to the traditional "Feature-based selfhosting" you had to do when developing Update Manager code. Here's what you do...

  1. Launch Eclipse and create a workspace that targets your current Eclipse SDK and has all of the projects from the provisioning .psf file checked out (see above). Let's call this workspace "LEFT".
  2. Create an Eclipse launch configuration that includes all of the Eclipse SDK and the provisioning projects you just checked out. For fun, call that launch config "MIDDLE".
  3. Run the launch configuration and create another workspace (say "WORK"). It is easiest to just set this workspace location in the launch configuration. This workspace is where you will be doing the bulk of your work.
  4. In the MIDDLE workspace, once again, check out all of the provisioning projects you need.
  5. Now to setup self-hosting you have to create an OSGi launch configuration (say "RIGHT") that includes the things you want to run and, for simplicity, all of the provisioning related projects. In practice you only need the provisioning projects required to run the agent but that list will change over time and is/will be detailed elsewhere.
  6. With the RIGHT launch config setup, you can now run you code. When you run RIGHT, the provisioning selfhosting code that is loaded in LEFT and running in the MIDDLE Eclipse will kick in and generate some metadata and modify the launch to hook everything together. The net result is RIGHT will be running a Profile that has all the proper IUs installed and there will be a metadata repository containing all the IUs in your workspace and associated target platform. These IUs can, for example, then be installed into RIGHT using the provisioning console (whatever).

Hint: You can leave LEFT running for a long time and simply minimize it. It is also useful change the look of LEFT's workspace so you don't confuse its content with that of WORK. Perhaps just set the editor font large. It is also useful to run MIDDLE with -consolelog and -console.

Running the tests

First, you need to populate an artifact and metadata server with some installable units to install. Do this by running the "Metadata Generator SDK" launch configuration in the "OSGi Framework" launch category. You may need to alter some of the properties on the "Arguments" tab in the launch configuration dialog before you run. At the least you will probably need to modify the argument "-Declipse.prov.metadataGenerator.eclipseBase=" to point to a valid Eclipse SDK install. 3.3 M6 is a good build to use as the eclipse base.

Next, run the provisioning by executing the "Test Director SDK" launch configuration. Again, you may need to tweak some of the launch configuration arguments based on your local drive structure.

Using the console

To use the provisioning console, you can run the "Provisioning Console" launch configuration. Type "help" on the console to get a list of available commands.

Back to the top