Thanks for all the hints!
Current project is maven modules. Then modules has dependencies to inner-source libraries that can in turn use open source libraries :-)
Users write test code like:
XX myXXResource = Resource.getXXResource();
myXXResource.connect();
myXXResource.upgrade();
//helpers to poll for a ready state on the resource before we can continue.
So end-users have their own repo (git) and creates a dependency to our framework and then write testcases using similar code as above.
The problem as I see it is that we deploy one large jar (monolith) but only a portion is really needed by each test repo.
And besides, as mentioned in the heading of this message, we have the same dependency in multiple places which makes it hard to upgrade.
OSGI seems interesting...
In an ideal world when test code is running in a user repo we should only load components that are actually used and not more.
I appreciate all your thoughts and ideas and experienced input for an open discussion.
//mike