3

We have a large OSGi project with some own bundles and hundreds of third parties bundles.

After some tweaking of dependencies, we were able to produce a valid Launch Configuration that runs correctly and a product/feature configuration that builds correctly (via IDE of Eclipse Luna) and generates a valid executable. So far so good with IDE PDE build.

Now we want to run the build in the headless way. We have followed the tutorial for Eclipse Luna (http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Ftasks%2Fpde_feature_build.htm) and set-up a headless build environment. We use the same product/feature files as before but now we got unresolved uses directives and the build fails. The environment looks sane, since we can build headless other (smaller) applications with no problems.

Digging in some of the problems, we have seen that some of them refers to OPTIONAL imports not resolved... To my understanding they should not complain. Example:

 [java] C:\Program Files\eclipse_Luna\plugins\org.eclipse.pde.build_3.9.0.v20140415-2029\scripts\genericTargets.xml:
    111: Processing inclusion from feature snapp.feature: Bundle org.apache.servicemix.bundles.jaxb-impl_2.2.1.1_2 failed to
    resolve.:
 [java]     Package uses conflict: Import-Package: javax.xml.bind; version="[2.2.0,3.0.0)"
 [java]     Package uses conflict: Import-Package: javax.xml.bind.attachment; version="[2.2.0,3.0.0)"
 [java]     Package uses conflict: Import-Package: javax.xml.bind.helpers; version="[2.2.0,3.0.0)"
 [java]     Unsatisfied import package org.jvnet.staxex_0.0.0.

Since we have thousands of third parties uses directives, of course we are not going to hack the manifest of all the involved bundles...

Why does the headless build is so picky about the uses directives? Is there any way to instruct headless PDE to skip this kind of checks?

Thank you in advance!

Jonas
  • 121,568
  • 97
  • 310
  • 388
DocDbg
  • 427
  • 1
  • 5
  • 13
  • Does your product file pass validation from within IDE PDE? Sometimes PDE automatically adds dependencies to launches, which can explain why it runs within PDE. The product validation can show you if a dependency is missing. – Arye Shemesh Jul 19 '15 at 15:39

0 Answers0