My root problem is that when running \"spring-test\"-based tests for my controllers and Freemarker views I need to have all taglibs inside WEB-INF/lib folder - otherwise fre
Here is how I solved this problem (the same as in maven actually):
Add another configuration for dependencies:
configurations {
taglibs { transitive = false }
}
Add needed dependency to this configuration:
dependencies {
...
taglibs "org.springframework.security:spring-security-taglibs:$springSecurityVersion"
...
}
Add gradle code to copy these dependencies to required folder:
task copytaglibs(type: Copy) {
from configurations.taglibs
into 'src/main/webapp/WEB-INF/lib'
}
compileTestJava {
dependsOn copytaglibs
}
This is it.