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!

About these ads

  • My Open Source

  • Twitter Updates

    • @jmbeas me irrita la gente ociosa #troll 👹 7 hours ago
    • @1Password on first contact, I'm a bit confused by the in-browser behavior (keyboard shortcut vs clicking icon)… still exploring!! 8 hours ago
    • @mariotux un cliente de correo… te interesa si usas la versión iOS (más antigua) 8 hours ago
    • Just upgraded to 1password 4 because it is that awesomely useful and I have been using version 3 every single day (almost as much as iTerm). 10 hours ago
    • Si alguien quiere probar Mailbox para Mac, tengo tres betacoins para repartir. 11 hours ago
  • Enter your email address to follow this blog and receive notifications of new posts by email.

    Join 9 other followers

  • Flickr Photos

    Apertura Agile Open Spain 2011 - 32

    Apertura Agile Open Spain 2011 - 31

    Apertura Agile Open Spain 2011 - 30

    More Photos

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: