简体   繁体   中英

Generating p2 repository with Tycho

Let's say I have bundle A which depends on Spring, so during development I use target platform pointing to directories containing the following Spring bundles:

  • org.springframework.aop
  • org.springframework.beans
  • org.springframework.context
  • org.springframework.core
  • org.springframework.expression
  • org.springframework.jdbc
  • org.springframework.transaction

So to build bundle A w/ Tycho I need to generate a p2 repository with the following steps:

  1. Create Eclipse Feature project that lists all the bundles.
  2. Create Eclipse Update Site project and add feature created on step 1.
  3. Turn all project into Maven modules & adjust the POM files.
  4. Execute 'mvn clear verify' on update site project to generate p2 repository.

The step 4 above expectedly fails since Tycho is missing dependencies that should be satisfied via p2 repository we're about to generate.

This sounds like chicken egg problem or am I missing some extra steps.

Any help would be greatly appreciated.

Thanks & Regards, Setya

We are using p2-maven-plugin and it works well. You will find also some good documentation about how to use it. But it isn't maintained anymore and has some flaws and bugs. But maybe they do not bother you. And may be you even have some time to provide some pull requests.

Can you show us your output? Does tycho fail because it does not find something in your bundle? Or because it cannot find spring modules?

Tycho does not look in maven repositories to resolve dependencies. You may need to add a repository in the tag.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM