I want to exclude some Grails 3.1.9 Plugins for deploying, because i do not need them in production. I know i can use provided
instead of compile
but then all dependencies of this Plugin are also excluded even if a other plugin have the same dependencies.
Example:
- Plugin 1 depends on
mail.jar
andlog.jar
- Plugin 2 depends on
log.jar
andmath.jar
snippet of build.gradle
:
dependencies{
compile "com.plugin1"
compile "com.plugin2"
}
If i run gradle war
, in the resulting archieve file I can find mail.jar
, log.jar
and math.jar
. In production I do not need plugin1
so I change dependencies-block like this:
dependencies{
provided "com.plugin1"
compile "com.plugin2"
}
After gradle war
it only includes math.jar.
How can i change the build.gradle
file in order to pack a war- file which includes only plugin2
and all it is dependencies: log.jar
and math.jar
Thanks in advance!