Excluding Grails Build Dependency

Using Grails 2.4.3, how can I eliminate the dependency defined in the build ?

Example

Grails comes with the spock-core-0.7-groovy-2.0.jar ; when adding a standard global dependency exception:
 ... grails.project.dependency.resolution = { // inherit Grails' default dependencies inherits('global') { excludes 'spock-core' } ... 

Spock is excluded from all dependency areas except the build .

+6
source share
1 answer

Is this a problem in which you do not want this in your .war file? If so, you can remove it like this:

 grails.war.resources = { stagingDir -> delete(file:"${stagingDir}/WEB-INF/lib/spock-core-0.7-groovy-2.0.jar") } 
0
source

Source: https://habr.com/ru/post/976409/


All Articles