[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[p2-dev] p2 Ant tasks

An update on what I had said in today's p2 call, I took a look at Repo2RunnableTask and I was incorrect it will be affected by the proposed patch (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=265550 .)

One of the ideas behind the changes was that repositories should be described in the same way in all the p2 ant tasks. To that end in the patch elements used to represent repositories have been changed to <repository ... /> and where necessary are nested in descriptive elements such as <source> </source>. The 'shortcut' attributes of task elements like destination, and source should still function as expected. Another additional change is that the 'kind' element is optional, and when not specified tasks attempt to use the repository as both types.

To give a better idea of the change here's an example of the existing p2 mirror task:

<p2.mirror>
<destination 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"/>
<destination 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 kind="artifact" location="file:///Users/"/>
<source kind="metadata" [fileset attributes....] />
<iu id="org.eclipse.rcp.feature.group" version="3.5.0.v20090202-9RA1FwwFr-TNqU7GSg_iVTQ"/>
</p2.mirror>

And here is the equivalent post-patch:

<p2.mirror>
<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>

Also mentioned in the p2 call I've written two new tasks: one which combines the 4 existing tasks for add/remove child from composite artifact/metadata repositories, and another which combined the create composite artifact/metadata tasks (and added the ability to add children at creation.) There are a few examples in the wiki @ http://wiki.eclipse.org/Equinox/p2_Ant_Tasks though the changes aren't yet committed.

Matthew