I have a project that uses a 3rd party library (the netapp nmsdk package, but that's not really relevant). This library appears to use guava r08, and specifically calls com.google.commons.io.NullPointerStream. The problem is that class was removed after r15. Adding to the difficulty, the library doesn't seem know about it's dependencies, so we must manually include guava r08 in our project in order for the application to find the class at runtime.
Now, we use guava in a couple of places, but unfortunately we require features found in a newer version of guava. Thus later in our project pipeline-stack-whatever, we reference r21, the current version.
But maven excludes the transient dependency for r08 in favor of r21, so now we don't have the required class at runtime!
I've tried to get shading to work, but since it doesn't seem to bring in the classes from r08, there's nothing to shade.
Can someone help me figure out how to "include" the required transient files in r08 alongside the explicit dependency on r21. Alternatively, if I'm on the wrong track, can I get directions on the right way? Thanks!
EDIT: I wanted to explicitly state that the 3rd party library doesn't appear to be a proper maven artifact, and is entirely closed source that we do not have access to.
EDIT 2: Ok, so I lied earlier, its actually three projects (fine, you caught me, there are 12, but only 3 matter).
- 3rd Party library requires Guavar08 and throws ClassNotFound exception at runtime. 3rd party library doesn't have transient dependencies or included dependencies.
- Project-A uses the 3rd party library, and has guava r08 so 3rd Party can find it at runtime.
- Project-B uses Project-A and also Guava 21.
- Project-C uses Project-A, Project-B and does not, itself, use Guava.
- The fat jar is built from a profile of Project-C.