Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] dependency on a fragment in a sibling project

So I created a SSCE at

With this project you can import each of the projects into eclipse,
right-click Run As -> Eclipse Application on the project (with -console
argument), and then search for the bundle in the osgi console and start
it.  You will see the bundle print something from the

OK, so PDE is happy, now how to get it to build?  You can see from this
build log, the problem that occurs:

Any ideas appreciated.

On 6/19/13 3:23 PM, "Tim Harsch" <tharsch@xxxxxxxx> wrote:

>Thanks so much Jan!
>   I am not, intentionally anyway, attempting a split package.  I will
>work up a small self contained example to make more clear...  In the
>meantime it may be useful to know that the reason I am creating a fragment
>is that I am attempting to add some capability to an eclipse-plugin that I
>do not own, or have the source for.  I think I could get the third party
>plugin to add the functionality that I need but, their release cycle won't
>get it out the door before my release cycle comes.  So I need to modify
>their plugin in this way (I think).
>I ran into this fragment issue in the Eclipse PDE environment as well.  I
>was able to solve my compile time problems in PDE through the use of
>Eclipse-ExtensibleAPI manifest header.   As described here:
>Yes, that means I had to crack the 3rd party bundle, add that manifest
>header to the manifest and repackage the bundle.  Yuck! I'm only willing
>to do that because the header is addressing an Eclipse PDE issue and
>shouldn't be needed in the OSGI container.  The bundle and the fragment
>should get fused.  Or said another way:  From what I understand this
>shouldn't be an issue at runtime when the bundle and its fragment are
>deployed into Equinox because the container will treat them as one bundle
>and I'm home free.
>I spent the vast portion of the day working out side issues, so that I
>could verify that I really do need this bundle and fragment in this way.
>Turns out I do, so I now really need to work out the tycho build part of
>the problem.  I will cook up a small self contained example and send it
>out ASAP.
>On 6/19/13 12:17 AM, "Sievers, Jan" <jan.sievers@xxxxxxx> wrote:
>>From what I can tell, what you have is a split package [1] with the
>>additional complication that some of the classes come fom a fragment.
>>At this point, all I can recommend is to avoid split packages altogether,
>>even more in combination with fragments.
>>E.g. there are known bugs in p2 [2] which prevent split package
>>If we would know the problem you are trying to solve here, we might be
>>able to give better advice.
>>From: tycho-user-bounces@xxxxxxxxxxx
>>[mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Tim Harsch
>>Sent: Mittwoch, 19. Juni 2013 01:23
>>To: Tycho user list
>>Subject: [tycho-user] dependency on a fragment in a sibling project
>>Hi all,
>>I have a project where the parent has two children A & B.  A is a
>>fragment that is providing an additional class via package to the
>>host bundle (H) .  H exports package  B is an eclipse-plugin
>>that imports the packages
>>When my I run maven compile at the parent.  A builds fine.  And B chokes
>>when looking for the new class in
>>Note:  B is referencing the project A via a <dependency> declaration in
>>its pom.
>>I hope that was clear, any additional info I can provide let me know.
>>tycho-user mailing list
>tycho-user mailing list

Back to the top