java - How can I use a different version of a package from the one required by a dependency? -
I am trying to create an OSGI bundle, and IAM is running in the following problem:
Let's call my plugin "PA" ??? Now, P has dependency on another plug-in; Line ??? It needs to use some of the interfaces it has exported. At the same time, I want to use version 2 of the library. Plugin in P. However, it uses DL, apart from it depends on version 1 of the library. Version 1 is provided by the container.
The point is that none of the classes and interfaces of LC are visible anywhere in the DPI (at least none using the IA). That is, P and D use sections from each internal class, but they never exchange.
Therefore, as far as I can tell, for each of them to be completely safe to use different versions of L, unless I provide my copy of Lv2, I It can not understand how it is working for its life.
Here I have what: PAC's PM.XML is a ??? ? Providedâ ???? D dependence, and a compilation Dependence L I am not the source of D, but the OSGI tells me that there is an import-package for L; Version = [1,2].
There is no combination of bundle instructions I tried to manage to do this work. Whatever I do, either goes to DL v2, which leads to a "compulsion violation". The bundle exemplifies D, or Pâ € ™ s classes, gets the V1 of L, which leads to a nochle defound error during my code run (BTW, the missing class was not explicitly used by my code It is used only as a stable member of any other class in a separate package of L.)
Any ideas?
The legal answer is that it means that you have your own (with) a plugin P to export any such service, and then Since you do not have a source for D, so D under D. You may also have to write a simple shim over it (public components need to specify an interface in In this scenario, both P and DP list their proper import list and they Can those versions not specify that they require. pom.xml And with
atlassian-plugin.xm L, you have to separate your own buildable plugin in D (let's get this new plugin "DP"). Within the DP, you need to use
& lt; Component-import & gt; to get them in P
& lt; component & gt; definition, which means that you will probably need to write one If you want to access the services in D, there are only classes and not interfaces.)
Comments
Post a Comment