Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. COHiding the dependencies eliminates the following: What is this "jar" going to pull in for me that will conflict with my version of "X". Example 1) A client application uses spring 2.5 while internally I use spring 3.0. I don't want to force the client to upgrade. The intent is to internalize my dependencies so that the client doesn't care whats internally referenced. In my case we have spring clients and NON spring clients, but I don't want to directly tell them now, go load up a context and include 40 new jars for using my API. Just wondering if this is even easily possible in Java.
      singulars
    2. COThis is not practically doable. OSGi can help, but this would force your clients to use OSGi, or you will have to embed OSGi inside your implementation (never done this but I believe it is doable - Neil can probably confirm). Basically you will have to try some sort of classloader manipulation to hide those dependencies. Then the next problem will be that you will have to redeploy your lib when a bug is found in any of your dependencies, instead of simply having your client get Spring 3.0.1 (for example). I think this makes your solution more complicated and fragile in the long run.
      singulars
    3. CORobin - I agree that using OSGi for this purpose is predicated on actually running in an OSGi environment. Furthermore I would not advise OP to convert his environment if it is *only* for the reasons set out in his question. On the other hand if he does build on OSGi and uses it to hide implementation details from consumers of his API then he will end up with a simple, stabler and less fragile solution in the long run.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload