Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to make an eclipse p2 provisioning mechanism running *locally*?

Eclipse 3.4[.x] - also known as Ganymede - comes with this new mechanism of provisioning called p2.

"Provisioning" is the process allowing to discover and update on demand some parts of an application, as explained in general in this article on the Sun Web site.

Eclipse has an extended wiki section in which p2 details are presented. Specifically, it says in this wiki page that p2 will look for new components However after reading it.

I suppose (but you may confirm that point by your own experience), that p2 can function file "file://" protocol, which would allow it to provision with local file (either on your computer or on an UNC path '\server\path'), as illustrated here, but also by the files:

  • [eclipse-SDK-3.4-win32]\eclipse\configuration\.settings\org.eclipse.equinox.p2.artifact.repository.prefs
  • [eclipse-SDK-3.4-win32]\eclipse\configuration\.settings\org.eclipse.equinox.p2.metadata.repository.prefs

p2 mechanism is used to update eclipse itself, through an eclipse 3.4 update site, and reference in those '.prefs' files with line like:

repositories/file:_C:_jv_eclipse_eclipse-SDK-3.4-win32_eclipse/url=file:/C:/jv/eclipse/eclipse-SDK-3.4-win32/eclipse/

Now, how could I replicate the eclipse components present in that update site into a local directory and reference those components through the mentioned '.prefs' files, in order to have an upgrade process entirely run locally, without having to access the web?
I suppose that some p2 metadata files present in the distant 'update site' need to be replicated and changed as well.

Do you have any thoughts/advice/tips on that ? (i.e. on how to discover and retrieve and update the complete structure needed for a full eclipse installation, in order to run that installation locally)

like image 350
VonC Avatar asked Sep 25 '08 06:09

VonC


People also ask

What is P2 repository in Eclipse?

The P2 repository format is a provisioning platform for Eclipse components. For more information about the P2 repository format, see the Equinox P2 documentation on the Eclipse Wiki. The following sections detail the procedures for creating and managing P2 repositories.

What is use of. P2 folder?

The . p2 folder is apparently for the Eclipse installer.


2 Answers

Yes, you can specify the repository locations if you use the p2.director

this for example is a snippet of a script that I use to install eclipse (Ganymede) from a local copy of the Ganymede repository

./eclipse\       -nosplash -consolelog -debug\       -vm "${VM}"\       -application org.eclipse.equinox.p2.director.app.application\       -metadataRepository file:${SHARED_REPOSITORY_DIR}\       -artifactRepository file:${SHARED_REPOSITORY_DIR}\       -installIU "${4-org.eclipse.sdk.ide}"\       -destination "${3}"\       -profile "${1}"\       -profileProperties org.eclipse.update.install.features=true\       -bundlepool ${SHARED_BUNDLEPOOL_DIR}\       -p2.os linux\       -p2.ws gtk\       -p2.arch "${2}"\       \       -vmargs\         -Xms64m -Xmx1024m -XX:MaxPermSize=256m\         -Declipse.p2.data.area=${SHARED_P2_DIR} 

Here are some links to use the p2 director

http://eclipse.dzone.com/articles/understanding-eclipse-p2-provi
http://wiki.eclipse.org/Equinox_p2_director_application

like image 51
lothar Avatar answered Sep 24 '22 01:09

lothar


It seems like you need to have one update work via the web which will mirror (download) what you need. But after that it should be able to get the files from the local peer. But I guess that is your question - does it need web access to determine that...

like image 20
Chris Kimpton Avatar answered Sep 20 '22 01:09

Chris Kimpton