According to the Spring Boot gradle plugin reference, I should be able to package a particular pattern of jars into a specific layer (for making better docker files).
I'm confused about the pattern matching used in the documentation. Here's an example:
tasks.getByName<BootJar>("bootJar") {
layered {
isIncludeLayerTools = true
application {
intoLayer("spring-boot-loader") {
include("org/springframework/boot/loader/**")
}
intoLayer("application")
}
dependencies {
intoLayer("module-dependencies") {
include("com*:*:*")
}
intoLayer("dependencies")
}
layerOrder = listOf("dependencies", "spring-boot-loader", "module-dependencies", "application")
}
}
What I don't understand is what this pattern matching is matching on:
intoLayer("module-dependencies") { include("com*::") }
Is it the group, artifact and version of a jar ? Is it the name of the jar ?
If I have a multi-module project that has modules aa,ab and ac, equating to aa.jar, ab.jar and ac.jar and an external dependency org.something:anartifact:25 equating to anartifact-25.jar what pattern do I need to add to include aa,ab and ac in one layer and every other dependency in another layer ?