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/Ant Tasks"

< Equinox‎ | p2
(Mirror Task)
(Indicatation that changes are proposed rather than active)
Line 1: Line 1:
==General Format==
+
==Current Tasks==
===Repositories===
+
===Create Composite Repository===
 +
The create composite repository tasks can be used to create an artifact or a metadata composite repository.  An existing repository can be used as an example and the new repository will match the properties of the example.
 +
<source lang=xml>
 +
<p2.composite.artifact.repository.create compressed="true" name="My new Repo" location="file:///myNewRepo"  />
 +
<p2.composite.metadata.repository.create compressed="false" name="My new Repo" location="file:///myNewRepo" />
 +
</source>
 +
 
 +
===Modifying Children of a Composite Repository===
 +
To add a single child to a composite repository:
 +
<source lang=xml>
 +
<p2.composite.artifact.repository.add location="file:///myRepo" child="file:///myChildRepo" />
 +
<p2.composite.metadata.repository.add location="file:///myRepo" child="file:///myChildRepo" />
 +
</source>
 +
 
 +
To remove a single child from a composite repository:
 +
<source lang=xml>
 +
<p2.composite.artifact.repository.remove location="file:///myRepo" child="file:///myChildRepo" />
 +
<p2.composite.metadata.repository.remove location="file:///myRepo" child="file:///myChildRepo" />
 +
</source>
 +
 
 +
Or all children could be removed from a repository:
 +
<source lang=xml>
 +
<p2.composite.artifact.repository.remove location="file:///myRepo" allChildren="True"/>
 +
<p2.composite.metadata.repository.remove location="file:///myRepo" allChildren="True"/>
 +
</source>
 +
==Proposed changes==
 +
For more information, see [https://bugs.eclipse.org/bugs/show_bug.cgi?id=265550 bug 265550]
 +
===General Format===
 +
====Repositories====
 
The input format used by repositories in p2 Ant tasks:
 
The input format used by repositories in p2 Ant tasks:
 
<source lang=xml>
 
<source lang=xml>
Line 51: Line 79:
 
|}
 
|}
  
==Mirror Task==
+
===Mirror Task===
 
<source lang=xml>
 
<source lang=xml>
 
<p2.mirror source="file:///Users/Pascal/Downloads/builds/transfer/files/updates/3.5-I-builds/I20090203-1200">
 
<p2.mirror source="file:///Users/Pascal/Downloads/builds/transfer/files/updates/3.5-I-builds/I20090203-1200">
Line 68: Line 96:
 
Note: No space should precede ''source'' it is present due to a technical limitation in the wiki software
 
Note: No space should precede ''source'' it is present due to a technical limitation in the wiki software
  
==Validate Task==
+
===Validate Task===
 
This task is used to validate an artifact repository using a comparator (the examples are using an md5 comparator.) A single use example:
 
This task is used to validate an artifact repository using a comparator (the examples are using an md5 comparator.) A single use example:
 
<source lang=xml>
 
<source lang=xml>
Line 82: Line 110:
 
</source>
 
</source>
  
==Creating a Composite Repository==
+
===Creating a Composite Repository===
 
The create composite repository tasks can be used to create an artifact or a metadata composite repository.  An existing repository can be used as an example and the new repository will match the properties of the example.
 
The create composite repository tasks can be used to create an artifact or a metadata composite repository.  An existing repository can be used as an example and the new repository will match the properties of the example.
  
Line 96: Line 124:
 
</source>
 
</source>
  
==Modifying Children of a Composite Repository==
+
===Modifying Children of a Composite Repository===
 
It's also possible to add, or to remove children from a repository with an ant task.
 
It's also possible to add, or to remove children from a repository with an ant task.
  
Line 121: Line 149:
 
</p2.modify.composite.repository.children>
 
</p2.modify.composite.repository.children>
 
</source>
 
</source>
 
==Old Tasks==
 
===Create Composite Repository===
 
The create composite repository tasks can be used to create an artifact or a metadata composite repository.  An existing repository can be used as an example and the new repository will match the properties of the example.
 
<source lang=xml>
 
<p2.composite.artifact.repository.create compressed="true" name="My new Repo" location="file:///myNewRepo"  />
 
<p2.composite.metadata.repository.create compressed="false" name="My new Repo" location="file:///myNewRepo" />
 
</source>
 
 
===Modifying Children of a Composite Repository===
 
 
To add a single child to a composite repository:
 
<source lang=xml>
 
<p2.composite.artifact.repository.add location="file:///myRepo" child="file:///myChildRepo" />
 
<p2.composite.metadata.repository.add location="file:///myRepo" child="file:///myChildRepo" />
 
</source>
 
 
To remove a single child from a composite repository:
 
<source lang=xml>
 
<p2.composite.artifact.repository.remove location="file:///myRepo" child="file:///myChildRepo" />
 
<p2.composite.metadata.repository.remove location="file:///myRepo" child="file:///myChildRepo" />
 
</source>
 
 
Or all children could be removed from a repository:
 
<source lang=xml>
 
<p2.composite.artifact.repository.remove location="file:///myRepo" allChildren="True"/>
 
<p2.composite.metadata.repository.remove location="file:///myRepo" allChildren="True"/>
 
</source>
 
 
  
 
[[Category:Equinox_p2|Ant Tasks]]
 
[[Category:Equinox_p2|Ant Tasks]]

Revision as of 12:55, 13 April 2009

Current Tasks

Create Composite Repository

The create composite repository tasks can be used to create an artifact or a metadata composite repository. An existing repository can be used as an example and the new repository will match the properties of the example.

<p2.composite.artifact.repository.create compressed="true" name="My new Repo" location="file:///myNewRepo"  />
<p2.composite.metadata.repository.create compressed="false" name="My new Repo" location="file:///myNewRepo" />

Modifying Children of a Composite Repository

To add a single child to a composite repository:

<p2.composite.artifact.repository.add location="file:///myRepo" child="file:///myChildRepo" />
<p2.composite.metadata.repository.add location="file:///myRepo" child="file:///myChildRepo" />

To remove a single child from a composite repository:

<p2.composite.artifact.repository.remove location="file:///myRepo" child="file:///myChildRepo" />
<p2.composite.metadata.repository.remove location="file:///myRepo" child="file:///myChildRepo" />

Or all children could be removed from a repository:

<p2.composite.artifact.repository.remove location="file:///myRepo" allChildren="True"/>
<p2.composite.metadata.repository.remove location="file:///myRepo" allChildren="True"/>

Proposed changes

For more information, see bug 265550

General Format

Repositories

The input format used by repositories in p2 Ant tasks:

<repository location="file:///Users/Pascal/Downloads/builds/transfer/files/updates/3.5-I-builds/I20090203-1200" append="true" compressed="true" 
	format="file:///Users/Pascal/Downloads/builds/transfer/files/updates/3.5-I-builds/I20090203-1200" kind="metadata" name="" remove="false" />

In general the location is always required, other attributes may not be used by individual tasks.

Attribute Type Default Description
location URI null The location of the repository
append boolean true Determines if the task should append to an existing repository or empty it first
compressed boolean true Determines if the repository should be compressed
format URI null Location of a repository to copy format from
kind "metadata" or "artifact" Both Specifies the type of the repository. Default is to add both a metadata and artifact repository
name String null The name of the repository
remove boolean false Defines if the repository be removed

Mirror Task

<p2.mirror source="file:///Users/Pascal/Downloads/builds/transfer/files/updates/3.5-I-builds/I20090203-1200">
   <repository kind="metadata" location="file:///Users/Pascal/tmp/mirrorTest9" name="RCP Repo" 
      format="file:///Users/Pascal/Downloads/builds/transfer/files/updates/3.5-I-builds/I20090211-0900"/>
   <repository kind="artifact" location="file:///Users/Pascal/tmp/mirrorTest9" name="RCP Repo" 
      format="file:///Users/Pascal/Downloads/builds/transfer/files/updates/3.5-I-builds/I20090211-0900"/>
   < source>
      <repository kind="artifact" location="file:///Users/"/>
      <fileset kind="metadata" .... />
   < /source>
   <iu id="org.eclipse.rcp.feature.group" version="3.5.0.v20090202-9RA1FwwFr-TNqU7GSg_iVTQ"/>
</p2.mirror>

Note: No space should precede source it is present due to a technical limitation in the wiki software

Validate Task

This task is used to validate an artifact repository using a comparator (the examples are using an md5 comparator.) A single use example:

<p2.composite.artifact.repository.validate comparatorID="org.eclipse.equinox.artifact.md5.comparator" location="file:///myfile"/>

An example task to validate multiple repositories using the same comparator:

<p2.composite.artifact.repository.validate comparatorID="org.eclipse.equinox.artifact.md5.comparator">
	<repository location="file:///myRepo"/>
	<repository location="file:///myRepo"/>
</p2.composite.artifact.repository.validate>

Creating a Composite Repository

The create composite repository tasks can be used to create an artifact or a metadata composite repository. An existing repository can be used as an example and the new repository will match the properties of the example.

<p2.create.composite.repository>
	<repository kind="metadata" compressed="true" location="file:///myNewRepo1" format="file:///anExampleRepo" name="My New Metadata Repo" />
	<repository kind="artifact" compressed="true" location="file:///myNewRepo2" format="file:///anExampleRepo" name="My New Artifact Repo" />
	<add>
		<repository location="http://eclipse.org/childRepo1"/>
		<repository location="http://eclipse.org/childRepo2"/>
	</add>
</p2.create.composite.repository>

Modifying Children of a Composite Repository

It's also possible to add, or to remove children from a repository with an ant task.

<p2.modify.composite.repository.children>
   <repository kind="metadata" location="file:///Users/Pascal/tmp/mirrorTest9"/>
   <repository kind="artifact" location="file:///Users/Pascal/tmp/mirrorTest9"/>
   <add>
      <repository kind="metadata" location="file:///childRepo"/>
   </add>
   <remove>
      <repository kind="artifact" location="file:///childRepo2"/>
    </remove>
</p2.modify.composite.repository.children>

If the append attribute of the destination is set to false then existing children are removed before other operations are performed:

<p2.modify.composite.repository.children>
    <destination kind="metadata" location="file:///Users/Pascal/tmp/mirrorTest9" append="False"/>
    <add>
	<repository kind="metadata" location="file:///childRepo"/>
    </add>
</p2.modify.composite.repository.children>

Back to the top