Monday, October 8, 2012

Cloning a eclipse p2 repository

The following commands will help you to clone a eclipse p2 repository if you want to keep a local copy of a remote one.

Below command will clone the artifacts:

eclipse -nosplash -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -source -destination

Below command will clone the meta data to same location:

eclipse -nosplash -application org.eclipse.equinox.p2.metadata.repository.mirrorApplication -source -destination

Below command is optional,  But if there are any missing meta data it will create them for you:

eclipse -nosplash -application org.eclipse.equinox.p2.publisher.EclipseGenerator -source -features /features -bundles /plugins -artifactRepository file: -metadataRepository file: -destinationName "" -append -verbose -ignoreErrors -inplace

Sources :