views:

292

answers:

2

I need to install an eclipse plugin to a machine not connected to the Internet and I cannot find a dist to use for a local install.

Is there a tool for downloading a plugin from an update site and create a local installation archive (or a local update site)? Rumors says you can do this with eclipse, but I cant find any info on how to do it.

A: 

You might find Building a custom Eclipse package helpful, although it's probably a bit more heavyweight that what you need.

Robert Munteanu
+2  A: 

You can use P2 mirror tool (or P2 mirror in Galileo documentation) to mirror remote metadata and artifacts repository.

Here is sample command to mirror Galileo artifacts repository locally:

eclipse\eclipsec.exe -nosplash -verbose 
-application org.eclipse.equinox.p2.metadata.repository.mirrorApplication
-source http://download.eclipse.org/releases/galileo
-destination file:d:/temp/galileo/

eclipse\eclipsec.exe -nosplash -verbose
-application org.eclipse.equinox.p2.artifact.repository.mirrorApplication
-source http://download.eclipse.org/releases/galileo
-destination file:d:/temp/galileo/

(First command mirrors metadata, second mirrors artifacts. Command should be on one line in windows)

After you run these commands, you can use file:d:/temp/galileo as a local mirror.

Alternatively, you can use P2 Mirror Ant Task, which lets you specify installable units (plugins or features) to mirror. Note: when specifying feature, don't forget to use .feature.group suffix)

Peter Štibraný
Exactly the tool I was looking for - thanks!
mafro
To be honest, I am still not sure how it works exactly: whether to mirror only artifacts and let P2 Publisher generate metadata, or whether to mirror both artifacts and metadata. Please share your findings when you succeed. Thank you.
Peter Štibraný
Updated answer: when I run both commands (mirror metadata, mirror repository), I got correct update site for local use. I tested with http://download.eclipse.org/tools/mylyn/update/weekly/e3.4
Peter Štibraný
I used the mirror artifact command and used the downloaded files locally and it worked like a charm. Have not trided the ant task (yet). Thanks Peter for your help.
mafro