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)

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


Need Your Help

Memory leak in boost::regex library

c++ windows boost memory-leaks mfc

I'm not big on the Boost library. I need it for a regular expression matching in my legacy C++/MFC project that is compiled in the VS 2008.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.