Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Buckminster » Buckminster 3.6 - Headless - customize products(How to cutomize product generation)
Buckminster 3.6 - Headless - customize products [message #747686] Mon, 24 October 2011 08:16 Go to next message
Philippe EUGENE is currently offline Philippe EUGENEFriend
Messages: 58
Registered: January 2011
Member
Hi,
I have three products build with Hudson/Buckminster.
I tried to customize two things into the products:

1. create.product.zip
This action create a .zip: product_name.win32.win32.x86.zip
with a folder inside product_name.win32.win32.x86
Is there a way with buckminster to remove the subfolder and create all the files at the root of the archive ?


2. Adding a file into a product:
Is there a way to add some files into the root products ( at the same level of the launcher) ?
I add the files into the build.properties of the product, but the file is not included into the product.

Thanks,
--
Philippe
Re: Buckminster 3.6 - Headless - customize products [message #748430 is a reply to message #747686] Mon, 24 October 2011 17:35 Go to previous messageGo to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 561
Registered: November 2009
Senior Member
Hi Philippe,

1. create.product.zip is just a general implementation of packaging your product. You can create new or change this action to call your own ant scripts - in your case move all artifacts directly under generated zip. Taking default create.product.zip:
 <public name="create.product.zip" actor="ant">
            <actorProperties>
                <property key="buildFileId" value="buckminster.pdetasks" />
                <property key="targets" value="create.zip" />
            </actorProperties>
            <prerequisites alias="action.requirements">
                <attribute name="create.product" />
            </prerequisites>
            <products alias="action.output" base="${buckminster.output}">
                <path path="mail.${target.ws}.${target.os}.${target.arch}.zip" />
            </products>
        </public>


I believe you might specify base as ${buckminster.output}/** to take files directly under that directory. I didn't test this, so it might not actually work like that. I am just showing that you can customize what goes in your final deliverable.

2. Not sure what files you are trying to add, but using prerequisite directive you can call your own action that will copy needed files in the final product. For example:

 <public name="create.product" actor="ant">
            <actorProperties>
                <property key="buildFile" value="build/product.ant" />
                <property key="targets" value="create.product" />
            </actorProperties>
            <properties>
                <property key="profile" value="MailProfile" />
                <property key="iu" value="com.example.mail.product" />
            </properties>
            <prerequisites alias="repository">
                <attribute name="site.p2" />
            </prerequisites>
            <products alias="destination" base="${buckminster.output}">
                <path path="mail.${target.ws}.${target.os}.${target.arch}/" />
            </products>
        </public>


Here, create.product will call repository action which will do whatever it suppose to do prior to create.product executing.

HTH,
Alex
Re: Buckminster 3.6 - Headless - customize products [message #749597 is a reply to message #748430] Tue, 25 October 2011 10:11 Go to previous messageGo to next message
Carsten Reckord is currently offline Carsten ReckordFriend
Messages: 139
Registered: July 2009
Senior Member
2. can be done using PDE's root file directives in your build.properties.

See
http://help.eclipse.org/galileo/topic/org.eclipse.pde.doc.user/tasks/pde_rootfiles.htm
for more information.

This way you'll also get P2 artifacts for your root files in case you want
to make the whole product (executable and all) available on an update site.
Re: Buckminster 3.6 - Headless - customize products [message #749837 is a reply to message #749597] Tue, 25 October 2011 13:25 Go to previous messageGo to next message
Philippe EUGENE is currently offline Philippe EUGENEFriend
Messages: 58
Registered: January 2011
Member
Carsten Reckord wrote on Tue, 25 October 2011 06:11
2. can be done using PDE's root file directives in your build.properties.



This way you'll also get P2 artifacts for your root files in case you want
to make the whole product (executable and all) available on an update site.


I must admit that basics concept and workflow of Buckminster is not enought clear for me.
The root directives works fine into a PDE Build, but does not into Buckminster.
I must omit something somewhere into my headless process.
I just set up the process using the sample files into tke buckminster tutorial repository.

Thanks for help.
Regards.


Re: Buckminster 3.6 - Headless - customize products [message #750020 is a reply to message #749837] Tue, 25 October 2011 15:28 Go to previous messageGo to next message
Carsten Reckord is currently offline Carsten ReckordFriend
Messages: 139
Registered: July 2009
Senior Member
In my setup, this worked out of the box.

I have a feature that contains the product definition file and at the same
time is the product's only root feature. Pretty much as in the buckminster
tutorial project.

In that feature I have in the build.properties:

root=file:.options,file:.eclipseproduct

(I don't know if this makes any difference, but those files are not listed
in the bin.includes property)

This gives me a binary/org.myproduct.name_root artifact in the p2 site
generated as part of the product build, as well as the .options and
..eclipseproduct files in the product zip archive.


On 25.10.2011 15:25, peugene wrote:
> Carsten Reckord wrote on Tue, 25 October 2011 06:11
>> 2. can be done using PDE's root file directives in your build.properties.
>>
>>
>>
>> This way you'll also get P2 artifacts for your root files in case you want
>> to make the whole product (executable and all) available on an update site.
>
>
> I must admit that basics concept and workflow of Buckminster is not enought clear for me.
> The root directives works fine into a PDE Build, but does not into Buckminster.
> I must omit something somewhere into my headless process.
> I just set up the process using the sample files into tke buckminster tutorial repository.
>
> Thanks for help.
> Regards.
>
>
>
Re: Buckminster 3.6 - Headless - customize products [message #752417 is a reply to message #750020] Wed, 26 October 2011 11:38 Go to previous messageGo to next message
Philippe EUGENE is currently offline Philippe EUGENEFriend
Messages: 58
Registered: January 2011
Member
The root properties works fine and include the expected file into the zipped product. Thanks for the solution.

In fact, the problem is into my rmap file.
When i commit updated files into the SVN repository, the build does not take account
the modifications.
I thought that the SVN reader provider was updated the workspace before building the product.
It is not the case ?
My rmap below.

<?xml version="1.0" encoding="UTF-8"?>
<rm:rmap xmlns:bc="h**p://www.eclipse.org/buckminster/Common-1.0" xmlns:rm="h**p://www.eclipse.org/buckminster/RMap-1.0">
  <rm:locator searchPathRef="plugins" failOnError="false"/>
  <rm:locator searchPathRef="features" failOnError="false"/>
  <rm:searchPath name="plugins">
    <rm:provider componentTypes="osgi.bundle,eclipse.feature,buckminster" readerType="svn">
      <rm:uri format="svn://*****/plugins/{0}">
        <bc:propertyRef key="buckminster.component"/>
      </rm:uri>
    </rm:provider>
  </rm:searchPath>
  <rm:searchPath name="features">
    <rm:provider componentTypes="osgi.bundle,eclipse.feature,buckminster" readerType="svn">
      <rm:uri format="svn://******/features/{0}">
        <bc:propertyRef key="buckminster.component"/>
      </rm:uri>
    </rm:provider>
  </rm:searchPath>
</rm:rmap>


Re: Buckminster 3.6 - Headless - customize products [message #752452 is a reply to message #752417] Wed, 26 October 2011 11:53 Go to previous message
Thomas Hallgren is currently offline Thomas HallgrenFriend
Messages: 3240
Registered: July 2009
Senior Member
On 2011-10-26 13:38, peugene wrote:
> The root properties works fine and include the expected file into the zipped product. Thanks for the solution.
>
> In fact, the problem is into my rmap file.
> When i commit updated files into the SVN repository, the build does not take account
> the modifications.
> I thought that the SVN reader provider was updated the workspace before building the product.
> It is not the case ?

No, that's not the case unless you add an advice node to your cquery where you exclude the workspace as source for
resolution. By doing that you will force Buckminster to consult the remote location and perform an update.

HTH,
Thomas Hallgren
Previous Topic:Getting older versions from p2
Next Topic:Tip: blog post - migrating build to git
Goto Forum:
  


Current Time: Fri Apr 19 03:06:37 GMT 2024

Powered by FUDForum. Page generated in 0.02413 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top