Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 2.0.3, 2.0.4
-
Fix Version/s: None
-
Component/s: Build System
-
Labels:None
Description
Excluding dependency A from a plugin works fine if the plugin has a direct dependency to A:
runtime(':mail:1.0') {
excludes 'mail'
}
'javax.mail:mail:1.4.3' is successfully excluded.
But if A has a dependency to B, it does not always work to exclude B:
runtime(':mail:1.0') {
excludes 'activation'
}
Plugin ':mail:1.0' has a compile dependency to 'javax.mail:mail:1.4.3', which have a dependency to 'javax.activation:activation:1.1'
Here I would expect 'javax.activation:activation:1.1' to be excluded, but it's not.
When changing plugin scope til 'compile', it works though:
compile(':mail:1.0') {
excludes 'activation'
}
Looks like transitive dependencies are only excluded if scope matches plugins scope, but for direct dependencies scope doesn't matter.
User list thread: http://grails.1312388.n4.nabble.com/Exclude-jars-from-plugin-tt4630055.html
To reproduce:
$ grails create-app excludetest
Add the following to BuildConfig.groovy's plugins:
runtime(':mail:1.0') {
excludes 'activation'
}
$ grails war
$ jar tf target/excludetest-0.1.war |grep activation
WEB-INF/lib/activation-1.1.jar
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
GRAILS-6910looks similar, but it is set to fixed in 2.0-M1.