Naive scripts for mirroring P2 repositories

Eclipse has a large ecosystem. So large that it is reasonable to assume that most people will not know many of the available tools.

That can be a problem in the corporate world, where you would like all the developers using the same tools, and have those tools installed easily and fast.

One simple way of achieving this is to setup a corporate p2 mirror with the standarized extensions that all developers can/should/must install. To achive that, this simple script can be used to create a mirror on the p2-mirror folder:

mirror.cmd


@echo off
SET ECLIPSE=D:\usuarios\java\eclipse-jee-galileo-RC4

echo Mirroring metadata for %1
java -jar %ECLIPSE%\plugins\org.eclipse.equinox.launcher_*.jar ^
 -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication ^
 -source %1 ^
 -destination p2-mirror ^
 -destinationName "Corporate P2 Repo" ^
 -verbose ^
 -compare

echo Mirroring artifacts for %1
java -jar %ECLIPSE%\plugins\org.eclipse.equinox.launcher_*.jar ^
 -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication ^
 -source %1 ^
 -destination p2-mirror ^
 -destinationName "Corporate P2 Repo" ^
 -verbose ^
 -compare

Just invoke it with the url of the repository you want to mirror, and call it as many times as needed.

For instance:


mirror http://q4e.googlecode.com/svn/trunk/updatesite-iam
mirror http://q4e.googlecode.com/svn/trunk/p2-nightly
mirror http://eclipse-cs.sf.net/update/
mirror http://findbugs.cs.umd.edu/eclipse/
mirror http://pmd.sourceforge.net/eclipse
mirror http://download.eclipse.org/technology/subversive/0.7/update-site/
mirror http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/

Now you only have to make the p2-mirror folder available (in shared network folder or published on an http server) so everyone can access it.

This is quite rough, so any suggestions for improvements are welcome!

Advertisements

  • My Open Source

  • Twitter Updates

    • @micho Infovia anyone? 2 hours ago
    • After days in Elixir, I write Ruby like: class Scoped.Thing do def baz do do_something() end end And wonder why it doesn’t parse 7 hours ago
    • RT @islomar: A piece of advice for anyone applying for a job: clearly transmit your MOTIVATIONS, GOALS and WHYS, not just a bunch of topics… 11 hours ago
    • RT @realntl: @wycats We want to say "sorry mgmt, we made a mess and need time to rewrite" but "the lang/framework sucks and we need to migr… 21 hours ago
    • @MarkVillacampa Al menos con todo esto, alguna gente aprenderá a actualizarse y por qué. Sobre todo la oposición! 21 hours ago
  • Enter your email address to follow this blog and receive notifications of new posts by email.

    Join 9 other followers

  • Flickr Photos


%d bloggers like this: