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:
@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.
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!