I have a use case where I need to create a smart fat jar. What, exactly does that mean?
Essentially I have different repositories which our application dependencies can be resolved from, some of them exist in a globally replicated file share (which is served as an ivy repository), while others exist in a private maven repository that is not productionized, and should not be used directly by applications in production.
I would like to create a fat jar in a smart way, such that:
- If the dependency came from the private maven repository, it should be added to the fat jar.
- If the dependency came from the file share, it points to the jar'directly in that file share (i.e. that fat jar's manifest adds that jar to the classpath.
Do any facilities exist for me to be able to distinguish where a dependency is resolved from?
For example:
repositories {
stableIvy()
unreliableMaven()
}
dependencies {
...
}