Our customer want us to provide them a lib from only the data layer of our multimodule spring boot project, that they can use in their whatever (probably spring) project. So they have to use our dependencies, but we do not really want to enforcing them to use specific versions that we use.
Our aim is to provide one publishable module in which:
- our modules are shaded (
very-neat-bigdata
,very-neat-util
,very-neat-other
) - libs not shaded but added to published pom
- don't want to exclude libs one by one
Our project looks like this:
very-neat-project
very-neat-web
-> spring-web 1.5.4
very-neat-bigdata <- this
-> spring-context 1.5.4
-> hbase
-> very-neat-util
-> guava 26
-> very-neat-other
-> common.util 1.5.6
-> ...ton of other dependency...
So our approach would be to create a shaded lib that customer can include to their project like this:
customer-project
customer-web
-> spring-web 1.6.8
-> spring-context 1.6.8
-> very-neat-bigdata-shaded <- this
-> guava 28
-> hbase
-> common.util 1.5.4
-> ..ton of other dependency..
How to solve this using gradle? Or if is this a bad approach what would be the best practice for this problem?