Using headless Buckminster to create p2 reporsitory with multiple versions [message #517228] |
Fri, 26 February 2010 11:11  |
Eclipse User |
|
|
|
Hi!
In the Eclipse IDE from the popup of a feature I can select
Export... -> Plug-in Development -> Deployable features.
Then I can select the features (and plug-ins) I want to deploy and a destination directory.
The I get a work p2 repository, than I can use as an update site.
If I go ahead and change the version on some of the features selected earlier
and possibly push the version number to the contained plug-ins,
I can repeat the above procedure, use the same destination directory
and I will now have a p2 repository containing both the old and the new versions.
How can I accomplish this using headless Buckminster?
I have created a my.site.feature representing the features I want in my p2 repository,
which is what I'm effectively doing in the dialog as described above.
I then execute headless the action site.p2 and get a working p2 repository.
But I can't see that I can use an old destination for the headless build.
The only part of the destination I have influence on is buckminster.output.root.
But the actual site is created in ${buckminster.output.root}/my.site.feature_version-eclipse.f eature/site.p2.
This is the folder that equivalates to the destination directory mentioned above.
Is it possible to get headless Buckminster to generate a p2 repository containg also older versions?
Or must it be done in some other way?
Could somebody please help me out with hao to achieve this?
Thanks.
/John
|
|
|
|
|
|
Re: Using headless Buckminster to create p2 reporsitory with multiple versions [message #519716 is a reply to message #519445] |
Tue, 09 March 2010 13:24   |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------010208020400080206060501
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Hi Bernhard and John,
I'm currently in the process of modularizing my build process to something more akin to maven, i.e. build a single plugin, test it, then
publish it to an integration site from where the other plugins can pick it up for their build.
The small ant snippet I use to publish the plugin to the site from a buckminster action should be easily adaptable to push a whole local
single-version site as produced by buckminster to a main site containing other versions.
The script currently has one noteworthy limitation: It will only publish the first fileset of the input path group since the p2 task I use
cannot handle Buckminster's path groups (hence the 2 actions grouped together in my cspex). I don't think that's a problem in your case
though, because the site.p2 action should return a single path.
HTH,
Carsten
On 08.03.2010 21:36, Bernhard Merkle wrote:
> Thanks John,
>
> today i stumbled exactly over the same problem :-)
>
> Bernhard.
>
> On 26.02.2010 18:46, John wrote:
>> Hi Thomas!
>>
>>
>> Thanks for the response. The enhancement request is here:
>>
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=304063
>>
>>
>> If I understand you correctly you suggest something in the line of
>> creating an aggregated repository. I've seen that suggested in the p2
>> documentation somewhere as a way to manage large update sites.
>>
>> I can of course create this using the Aggregator. But is it possible to
>> do it without manual intervention? I can only see this happen by running
>> a headless job creating the new p2 repository using the site.p2 action.
>> Then edit the Aggregator model to include the new site and trigger a
>> headless build of the aggregated site.
>>
>> This is of course doable, but are there some secret commands I can use
>> to update an exisiting p2 repository with the conents of the newly
>> generated p2 repository?
>>
>> I've found some commands in the p2 documentation, but they seem to be
>> more focuse on generating p2 metadata from other sources or install from
>> p2 repositories into an Eclipse target.
>>
>> Is there anything I can do to make this automated, without generating
>> the metadata files myself?
>>
>> Thanks.
>>
>> /John
>
--------------010208020400080206060501
Content-Type: text/xml;
name="buckminster.cspex"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="buckminster.cspex"
PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxjc3Bl Y0V4dGVuc2lv
bg0KICAgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hNTFNj aGVtYS1pbnN0
YW5jZSINCiAgIHhtbG5zOmJjPSJodHRwOi8vd3d3LmVjbGlwc2Uub3JnL2J1 Y2ttaW5zdGVy
L0NvbW1vbi0xLjAiDQogICB4bWxucz0iaHR0cDovL3d3dy5lY2xpcHNlLm9y Zy9idWNrbWlu
c3Rlci9DU3BlYy0xLjAiPg0KICAgPGFjdGlvbnM+DQogICAgICA8cHVibGlj IG5hbWU9InB1
Ymxpc2guYnVuZGxlLmphciIgYWN0b3I9ImFudCI+DQogICAgICAgICA8YWN0 b3JQcm9wZXJ0
aWVzPg0KICAgICAgICAgICAgPHByb3BlcnR5IGtleT0iYnVpbGRGaWxlIiB2 YWx1ZT0iYnVp
bGQvcHVibGlzaC5hbnQiLz4NCiAgICA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IDxwcm9kdWN0cyBhbGlhcz0iYWN0aW9uLm91dHB1dCIg YmFzZT0iJHtw
dWJsaXNoLnNpdGUucDJ9Ij4NCiAgICAgICAgIDwvcHJvZHVjdHM+DQogICAg ICA8L3B1Ymxp
Yz4NCiAgIDwvYWN0aW9ucz4NCiAgIDxncm91cHM+DQogICAgICA8cHVibGlj IG5hbWU9InB1
Ymxpc2giPg0KICAgICAgICAgPGF0dHJpYnV0ZSBuYW1lPSJwdWJsaXNoLmJ1 bmRsZS5qYXIi
Lz4NCiAgICAgICAgIDxhdHRyaWJ1dGUgbmFtZT0icHVibGlzaC5zb3VyY2Uu YnVuZGxlLmph
ciIgZmlsdGVyPSIoIShjYmkuaW5jbHVkZS5zb3VyY2U9ZmFsc2UpKSIvPg0K ICAgICAgPC9w
dWJsaWM+DQogICA8L2dyb3Vwcz4NCjwvY3NwZWNFeHRlbnNpb24+
--------------010208020400080206060501
Content-Type: text/plain;
name="publish.ant"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="publish.ant"
PHByb2plY3Q+DQogICA8YnVja21pbnN0ZXIudmFsdWVmaWxlc2V0IGlkPSJi dW5kbGVzIiB2
YWx1ZT0iJHtmczphY3Rpb24ucmVxdWlyZW1lbnRzfSIgaW5jbHVkZXM9Iiou amFyIi8+DQog
ICANCiAgIDx1cHRvZGF0ZSBwcm9wZXJ0eT0ic2l0ZS51cHRvZGF0ZSIgdmFs dWU9InllcyI+
DQogICAgICA8c3JjZmlsZXMgcmVmaWQ9ImJ1bmRsZXMiLz4NCiAgICAgIDxj aGFpbmVkbWFw
cGVyPg0KICAgICAgICA8ZmxhdHRlbm1hcHBlci8+DQogICAgICAgIDxnbG9i bWFwcGVyIGZy
b209IioiIHRvPSIke3NwOmFjdGlvbi5vdXRwdXR9L3BsdWdpbnMvKiIvPg0K ICAgICAgPC9j
aGFpbmVkbWFwcGVyPg0KICAgPC91cHRvZGF0ZT4NCiAgIDx0YXJnZXQgbmFt ZT0icHVibGlz
aCIgdW5sZXNzPSJzaXRlLnVwdG9kYXRlIj4NCiAgICAgIDxwYXRoY29udmVy dCBwcm9wZXJ0
eT0iaW5wdXQuYnVuZGxlcyIgcmVmaWQ9ImJ1bmRsZXMiLz4NCiAgICAgIDxt a2RpciBkaXI9
IiR7c3A6YWN0aW9uLm91dHB1dH0iLz4NCiAgICAgIDxwMi5wdWJsaXNoLmZl YXR1cmVzQW5k
QnVuZGxlcyByZXBvc2l0b3J5PSJmaWxlOi8vLyR7c3A6YWN0aW9uLm91dHB1 dH0iPg0KICAg
ICAgICAgPGJ1bmRsZXMgcmVmaWQ9ImJ1bmRsZXMiLz4NCiAgICAgIDwvcDIu cHVibGlzaC5m
ZWF0dXJlc0FuZEJ1bmRsZXM+DQogICA8L3RhcmdldD4NCjwvcHJvamVjdD4=
--------------010208020400080206060501--
|
|
|
|
Re: Using headless Buckminster to create p2 reporsitory with multiple versions [message #519885 is a reply to message #519759] |
Wed, 10 March 2010 05:56  |
Eclipse User |
|
|
|
Hi John,
Sure, here you go.
buckminster.cspex:
<?xml version="1.0" encoding="UTF-8"?>
<cspecExtension
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0"
xmlns="http://www.eclipse.org/buckminster/CSpec-1.0">
<actions>
<public name="publish.bundle.jar" actor="ant">
<actorProperties>
<property key="buildFile" value="build/publish.ant"/>
<property key="targets" value="publish"/>
</actorProperties>
<prerequisites alias="action.requirements">
<attribute name="bundle.jar"/>
</prerequisites>
<products alias="action.output" base="../site.p2/">
</products>
</public>
<public name="publish.source.bundle.jar" actor="ant">
<actorProperties>
<property key="buildFile" value="build/publish.ant"/>
<property key="targets" value="publish"/>
</actorProperties>
<properties>
<property key="publish.site.p2" value="../site.p2"/>
</properties>
<prerequisites alias="action.requirements">
<attribute name="source.bundle.jar"/>
</prerequisites>
<products alias="action.output" base="${publish.site.p2}">
</products>
</public>
</actions>
<groups>
<public name="publish">
<attribute name="publish.bundle.jar"/>
<attribute name="publish.source.bundle.jar" filter="(!(cbi.include.source=false))"/>
</public>
</groups>
</cspecExtension>
build/publish.ant:
<project>
<buckminster.valuefileset id="bundles" value="${fs:action.requirements}" includes="*.jar"/>
<uptodate property="site.uptodate" value="yes">
<srcfiles refid="bundles"/>
<chainedmapper>
<flattenmapper/>
<globmapper from="*" to="${sp:action.output}/plugins/*"/>
</chainedmapper>
</uptodate>
<target name="publish" unless="site.uptodate">
<pathconvert property="input.bundles" refid="bundles"/>
<mkdir dir="${sp:action.output}"/>
<p2.publish.featuresAndBundles repository="file:///${sp:action.output}">
<bundles refid="bundles"/>
</p2.publish.featuresAndBundles>
</target>
</project>
On 09.03.2010 22:07, John wrote:
> Hi Carsten!
>
>
> Thanks for the input.
>
> I've found some p2 commands that I hoped might help me, but I haven't got around to investigating it yet. It will happen in the next few weeks.
>
> I would like to look at your solution also, but when I read your post with my browser, it shows up as some text representation of a mime attachment.
>
> Could you just paste the contents of the file(s) instead?
>
> Thanks.
>
>
> /John.
|
|
|
Powered by
FUDForum. Page generated in 0.04154 seconds