Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] p2 update question

> We just didn't see what we have to do to add the new features defined in the p2.inf file to our product during the build.
Do you mean that when you install your feature-based p2.inf-augmented product using p2-director, the features required in p2.inf are not installed? That would be strange since I actually think that you're on the right track.

Anyway, the description at http://wiki.eclipse.org/Tycho/Packaging_Types#eclipse-repository clarifies things a bit, and even gives examples of how to build products. In brief, when one builds a maven module of type "eclipse-repository", which contains asdf.product and asdf.p2.inf files in its root, the end result is a p2 repo*. "By configuring additional goals, this product can be installed (with the p2 director) and zipped to create ready-to-use product installation". The article then goes on to explain how to use tycho-p2-director plugin. So, this sounds like a pretty standard way of doing things.

* A p2 repo is usually two files: content.{xml,jar} and artifacts.{xml,jar}, where the former is often called a metadata repo, and the latter is called an artifacts repo. These files also usually have two directories next to them: features/ and plugins/ although this is not strictly necessary. You should even be able to manually inspect content.xml in order to confirm that your product has all the necessary <requires>.

/Mikhail


Från: "Cristiano Gavião" <cvgaviao@xxxxxxxxx>
Till: tycho-user@xxxxxxxxxxx
Skickat: tisdag, 10 sep 2013 23:36:50
Ämne: Re: [tycho-user] p2 update question

I had a problem like this sometime ago. maybe that help you too: http://dev.eclipse.org/mhonarc/lists/tycho-user/msg03316.html

regards,

Cristiano

On 10/09/13 15:03, Sonja Subicin wrote:

Från: "Sonja Subicin" <Sonja-Subicin@xxxxxx>
Till: "Tycho user list" <tycho-user@xxxxxxxxxxx>
Skickat: tisdag, 10 sep 2013 17:27:19
Ämne: Re: [tycho-user] p2 update question
 
Hi there,
as already mentioned by Markward, we want to add updatable language features to our tycho-built product.
Following your advices, we have started to try out Andrew's approach by defining our features in the p2.inf file.
---> http://aniefer.blogspot.de/2009/07/composing-and-updating-custom-eclipse.html
 
We have the following setup now:
- a feature-based product named "example.product", containing the features:
    com.ourcompany.feature.application (here we have added a plugin called "com.ourcompany.client.i18n", containing some i18n specific code and default messages)
    com.ourcompany.feature.thirdparty
- "example.p2.inf" file
here we are specifying additional language features containing fragments. The above mentioned plugin "com.ourcompany.client.i18n" is the host plugin of these fragments.
The example.p2.inf file has the following content:
requires.0.namespace = com.ourcompany
requires.0.name = com.ourcompany.client.feature.i18n.de_CH.group
requires.0.range = [1.0.0, 1.2.0]
requires.1.namespace = com.ourcompany
requires.1.name = com.ourcompany.client.feature.i18n.de_DE.group
requires.1.range = [1.0.0, 1.2.0]
requires.2.namespace = com.ourcompany
requires.2.name = com.ourcompany.client.feature.i18n.en.group
requires.2.range = [1.0.0, 1.2.0]
instructions.configure=\
  addRepository(type:0,location:http${#58}//ourcompany.com/language-repository);\
  addRepository(type:1,location:http${#58}//ourcompany.com/language-repository);
- The specified repository provides a tycho build p2 repo containing the required features.
- We have added the p2.inf file to build.properties.
 
At first we were thinking that running the tycho product build would automatically install the feature. This seems not to be the case, as the features cannot be found.
We are wondering, if it is necessary to create an extra ant script to explicitly install the feature (like in Andrew's approach), or if there is a less complicated way of adding updatable features to our product.
As we are new to p2 provisioning, please excuse us if we are not seeing the obvious. Any help would be appreciated!
Greetings,
Sonja Alberts
 
 
Gesendet: Dienstag, 10. September 2013 um 18:58 Uhr
Von: "Mikhail Kalkov" <mikhail.kalkov@xxxxxxxxxxxxxx>
An: "Tycho user list" <tycho-user@xxxxxxxxxxx>
Betreff: Re: [tycho-user] p2 update question
Hi Sonja,

As far as I understood, you've built a p2 repository with your product using tycho. This repository can now be used for example to install your product, or as a target platform to run tests. Product installation is usually done via p2 director (http://help.eclipse.org/juno/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/p2_director.html), but you should be able to use the tycho-p2-director:materialize-products mojo too.

Kind regards,
Mikhail Kalkov

Purple Scout AB
Software Developer

Address: Kyrkogatan 20-22, SE-41110 Gothenburg, Sweden
Phone:   +46 (0) 732 - 051405
E-mail:  mikhail.kalkov@xxxxxxxxxxxxxx
Web:     www.purplescout.se
 
Thank you for your replies!
 
Basically we want to add (language) features to our product that are NOT part of the product definition, because we want to update them without updating the product itself.
We are already building our example.product AND (in a second step) the p2 repository containing the language specific features using the tycho-maven-plugin.
 
We just didn't see what we have to do to add the new features defined in the p2.inf file to our product during the build.
 
As far as I can see now, this can be done using the p2-director application after product build OR tycho-p2-director:materialize-products, right?
If this is the best practice to create our product, is there still a need of the p2.inf file or do we have to define the additional features in a different way?
 
Greetings and thanks a lot,
Sonja
 
 
 
 


_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user


_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user


Back to the top