tycho - Features based on different target platforms in a single p2 site -


i have internal p2 site number of different utility features use in our products. have added new set of plug-ins along new feature utility functions rap (whereas "old" functionality rcp/swt).

in order compile stuff, use 2 different target platforms (one rcp , new 1 rap) , refer these plug-ins , features. have organized modules have usual 2 layers of parent poms:

  • ...parent - common tycho , maven booking
  • ...parent.rcp - container plug-ins depends on/uses rcp/swt functionality - sets target platform include rcp/swt features
  • ...parent.rap - same rap

no problems there. compiles , tests runs.

i have of existing plug-ins in both features (rcp , rap) don't depend on ui functionality (e.g. osgi test utilities). no problems there either.

but... when try make single p2 update site both features (rcp , rap), run problem. following message:

[info] resolving dependencies of mavenproject: com.rcpcompany:com.rcpcompany.uibindings.updatesite:3.0.0-snapshot @ /git/ui-bindings/com.rcpcompany.uibindings.updatesite/pom.xml [info] cannot complete request.  generating details. [info] cannot complete request.  generating details. [info] {osgi.ws=gtk, osgi.os=linux, osgi.arch=x86, org.eclipse.update.install.features=true} [error] cannot resolve project dependencies: [error]   software being installed: com.rcpcompany.uibindings.updatesite raw:3.0.0.'snapshot'/format(n[.n=0;[.n=0;[-s]]]):3.0.0-snapshot [error]   missing requirement: com.rcpcompany.utils.rap.feature.feature.group 1.0.0.qualifier requires 'org.eclipse.rap.ui.forms 0.0.0' not found [error]   cannot satisfy dependency: com.rcpcompany.uibindings.updatesite raw:3.0.0.'snapshot'/format(n[.n=0;[.n=0;[-s]]]):3.0.0-snapshot depends on: com.rcpcompany.utils.rap.feature.feature.group [1.0.0,1.0.1) [error]  [error] internal error: java.lang.runtimeexception: "no solution found because problem unsatisfiable.": ["unable satisfy dependency com.rcpcompany.utils.rap.feature.feature.group 1.0.0.qualifier org.eclipse.rap.rwt.osgi [2.0.0,2.1.0).", "unable satisfy dependency com.rcpcompany.utils.rap.feature.feature.group 1.0.0.qualifier org.eclipse.rap.rwt.testfixture [2.0.0,2.1.0).", "unable satisfy dependency com.rcpcompany.utils.rap.feature.feature.group 1.0.0.qualifier org.eclipse.rap.ui.forms 0.0.0.", "no solution found because problem unsatisfiable."] -> [help 1]     .... 

as update project associated rcp target platform, understand messages above such tycho (or p2) cannot find plug-ins rap target platform , complains.

(if make 2 different update sites, works fine, don't want :-/)

how can convince tycho construct update site both features? have make combined target platform possible dependencies or there way?

let's start obvious: things want aggregate p2 repository need in target platform because build can use things in target platform. doesn't seem problem - there rather problem dependencies of things want aggregate.

currently, dependencies of aggregated content needs in target platform. should able create joint rcp&rap target platform merging configuration both parents.

unfortunately, isn't yet: currently, needs possible install features @ once. tycho simulates during dependency resolution: pretends p2 installation build result of module. if "cannot installed @ once" error during dependency resolution, can may try set target-platform-configuration switch allowconflictingdependencies true. switch introduced support use case in (now deprecated) eclipse-update-site packaging type. i'm not sure if works eclipse-repository though.

if doesn't work, see possibility build 2 separate p2 repositories, , combine them in additional (post-)build step. can either put both p2 repositories on web server , group them logically using so-called composite repository, or copy ("mirror") 2 repositories using p2 mirror tool.


Comments