Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 311878

Summary: Same packages in different bundles causes p2 build problems
Product: [SOA] JWT Reporter: Marc Dutoo <marc.dutoo>
Component: WEAssignee: Project Inbox <jwt.we-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3    
Version: 0.7.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Marc Dutoo CLA 2010-05-06 09:31:14 EDT
See attached log.

Says Mickael Istria, our in-house build expert :

This is probably because CBI build is p2-based (uses p2.gathering=true property), and is more rigorous, and far better, about dependency resolution, whereas the old builder was not p2-based (standard old-school build + p2 generation on the old-school update-site).

I think having the same package in several bundles is indeed the cause of the problem. That's one of OSGi worst practices, so that it can be the cause of such troubles. Basically for a bundle org.eclipse.jwt.my_bundle, all classes inside of it must be in a org.eclipse.jwt.my_bundle or child package. Otherwise, it could be confusing for developers, install-time resolver (p2) and runtine resolver (Equinox).


Other links :

http://code9.com/2008/08/22/tip-split-packages-and-visibility/
which says that
"Now the resolver is aware that when you import the ‘com.company.util’ package, you should be wired to B and C if you want the com.company.util package"
HOWEVER no plugin does an Import org.eclipse.jwt.we.conf.aspects.event so maybe it's not that, as also said at http://www.vogella.de/blog/2009/03/27/required-bundle-import-package/ ...

Though something else that says the same : http://dev.eclipse.org/newslists/news.eclipse.modeling.m2m/msg02433.html
"

Equinox cannot handle merging exports of the same package from different bundles

" 


TODO : identity them, separate them, test build & application
Comment 1 Marc Dutoo CLA 2010-05-06 09:33:41 EDT
My analysis of the package conflicts :

   * jwt-we-conf-model.edit/org.eclipse.jwt.we.conf.aspects.event.provider : already in jwt-we-conf-model, moved to .provider, no impact because was obsolete and not exported DONE
   * jwt-we-conf-property-model/org.eclipse.jwt.we.conf.aspects.factory : already in jwt-we-conf-model, moved to .property, 1 impact in jwt-we-conf-property-model.edit (as well as in manifest and plugin.xml) DONE
   * jwt-we-sample-staticaspect/org.jwt.sample.logging : just been removed, in duplicate with those in jwt-we-sample-logging DONE
   * jwt-we-helpers-application/org.eclipse.jwt.we : already in jwt-we STILL TODO

Still TODO : separate jwt-we-helpers-application/org.eclipse.jwt.we, test build and app
Comment 2 Marc Dutoo CLA 2010-05-06 11:32:27 EDT
Tested my changes OK.

Still TODO : separate jwt-we-helpers-application/org.eclipse.jwt.we .
Comment 3 Christian Saad CLA 2010-06-30 07:26:01 EDT
seems good now