Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Equinox p2 Repository Mirroring"

Line 30: Line 30:
 
   -overwrite
 
   -overwrite
  
If only metadata are desired in the destination then you can remove the line:
+
If only metadata are desired in the destination then you can remove the line: '''-ius all'''
  
  -ius all
+
or if only the artifacts are desired then remove the line: '''-artifacts all'''
  
or if only the artifacts are desired then remove the line:
+
For a compressed destination repository, add the line: '''-compressed'''
  
  -artifacts all
+
and the resulting destination artifact or content xml will be in compressed jar format.
  
For a compressed destination repository, add the line
+
===Selective Mirroring===
  
  -compressed
+
If only a piece of the source repository should be mirrored, then you can specify the individual components as arguments. For ius the format is
 
+
and the resulting destination artifact or content xml will be in compressed jar format.
+
  
 +
  -ius IU,IU2/Version,IU3/[VersionRange]
 +
  or
 +
  -ius org.eclipse.sdk.examples.source,org.eclipse.ui.examples.undo.source/3.2.100,org.eclipse.jdt.ui.examples.projects.source /[3.1.0,3.2.0]
  
 +
For artifacts, the format is
  
For more selective mirroring of exclusively metadata or artifacts see example [http://wiki.eclipse.org/Equinox_p2_Repository_Selective_Mirroring Selective Mirroring].
+
  -artifacts {classifier,iu,version},{classifier,iu,version}
 +
  or
 +
  -artifacts {osgi.bundle,org.eclipse.swt.examples.browser,3.1.100.v3320c},{osgi.bundle,org.eclipse.sdk.examples.source,3.1.100.v20070605}

Revision as of 10:03, 6 June 2008

Introduction

p2 artifact repositories can hold many different forms of the same artifact. For example, a JAR artifact may exist as

  • a canonical (unmolested) JAR
  • a compressed JAR (assuming the original was not compressed)
  • a pack200 JAR
  • a delta relative to another version of the artifact
  • ...

p2 metadata repositories are like artifact profiles that describe dependencies needed to function.

This Repository Mirroring application can be used to mirror artifact and metadata repositories. In addition, this application can perform selective mirroring where the user can specify parts of a repository and create a more specific mirror (e.g. only mirror latest code).

This example demonstrates how to mirror a repository using the repository mirror application available in the equinox p2 tools.

Getting the Mirroring Tools

Get the p2 agent from the provisioning section of: Equinox Stable Build: 3.4RC3.

Running the Mirroring Tools

Run from the command line by running the Admin tool with the args you have below (e.g. eclipse.exe -application org.eclipse.equinox.p2.tools.MirrorApplication -source ...).

The attached example performs the basic mirroring of an artifact and metadata repository into a target repository. The target repository will be an exact mirror of the source repositories. This means any information on the target repository prior to mirroring will be lost, and if there is no target repository to begin with then a new repository will be created.

 -console -consolelog -application org.eclipse.equinox.p2.tools.MirrorApplication
 -source Insert Source URL (e.g. http://download.eclipse.org/eclipse/updates/3.4milestones/)
 -destination Insert Destination URL (e.g. file:/tmp/3.4milestonesMirror/)
 -ius all
 -artifacts all
 -overwrite

If only metadata are desired in the destination then you can remove the line: -ius all

or if only the artifacts are desired then remove the line: -artifacts all

For a compressed destination repository, add the line: -compressed

and the resulting destination artifact or content xml will be in compressed jar format.

Selective Mirroring

If only a piece of the source repository should be mirrored, then you can specify the individual components as arguments. For ius the format is

 -ius IU,IU2/Version,IU3/[VersionRange]
 or
 -ius org.eclipse.sdk.examples.source,org.eclipse.ui.examples.undo.source/3.2.100,org.eclipse.jdt.ui.examples.projects.source /[3.1.0,3.2.0]

For artifacts, the format is

 -artifacts {classifier,iu,version},{classifier,iu,version}
 or
 -artifacts {osgi.bundle,org.eclipse.swt.examples.browser,3.1.100.v3320c},{osgi.bundle,org.eclipse.sdk.examples.source,3.1.100.v20070605}

Back to the top