[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Is it possible to install a feature into an RCP app at build time?

Brian, 

I already have a <<product-id>>.p2.inf file alongside my <<product-id>>.product, and currently, it looks like this...

instructions.configure=\
 org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//mydomain.com/myp2repository/myrequiredfeature/,type:0,name:My Required Feature Name,enabled:true);\
 org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}// mydomain.com/myp2repository/myrequiredfeature/ ,type:1,name: My Required Feature Name ,enabled:true);


This entry successfully adds the repository to my RCP application during build time.

I've added the entries you suggested and I ran by full build for my RCP app using "mvn clean install", and the feature doesn't not get installed in my RCP application.  

Is there something else I need to do to get your proposed solution to work?

Thanks,
Trace Windham


 

On Tue, May 15, 2012 at 6:17 PM, Brian de Alwis <briandealwis@xxxxxxxxx> wrote:
Since you're using Tycho, you can save yourself a step and add a <<product-id>>.p2.inf file alongside your <<product-id>>.product file containing something like:

requires.101.namespace=org.eclipse.equinox.p2.iu
requires.101.name=my.feature.name.feature.group
requires.101.range=[0.9.1,1.0.0)

Repeat that for the features you'd like to have pre-installed, incrementing the "101" for each feature.

Brian.

On 15-May-2012, at 4:25 PM, Trace Windham wrote:

Thanks Paul, that worked like a charm.

Since Tycho had already zipped up my deliverable product, I had to add an ant zip task to re zip the product after I modified it using your ant task below.  

It was no big deal, but I thought I should mention it for the next guy that reads this someday.

Thanks again!
TW
 

On Tue, May 15, 2012 at 12:19 PM, Paul Webster <pwebster@xxxxxxxxxxxxxxxxxxx> wrote:
You can use the p2 director as a final step in your build.

basebuilder/eclipse \
-application org.eclipse.equinox.p2.director \
-noSplash \
-repository \
http://download.eclipse.org/releases/juno \
-destination \
/path/to/rcp/build \
-bundlepool \
/path/to/rcp/build \
-installIUs \
org.eclipse.emf.sdk.feature.group

It can be called from your postBuild ant target as well, for example see http://git.eclipse.org/c/platform/eclipse.platform.releng.eclipsebuilder.git/tree/eclipse/buildConfigs/sdk.tests/testScripts/test.xml#n289

PW

--
Paul Webster
Hi floor.  Make me a sammich! - GIR

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




--
Trace Windham

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


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




--
Trace Windham