Closed michal-nowak closed 10 years ago
Thanks for the pull request. I am going to have a look at it soon.
It turned out that not only transitive but also direct dependencies in scope provided are packaged inside war archives. I added two additional test cases for that.
I looked at current WarPlugin and providedCompile implementation in gradle codebase. War packaging is handled by removing provided dependencies from each War task runtime classpath. I implemented similar thing for nebula 'provided' configuration.
Fix for resolving transitive provided dependencies between projects is implemented by removing provided dependencies from default configuration.
Thanks, Michal
Thanks so much for the pull request. I has been merged. It would be great if you could see if there's any impact on the EAR plugin as well.
Thanks for merging the code. We'll be rolling the updated plugin in our projects soon.
I was looking at the EAR plugin and couldn't think of a good test case. There are two dependency usages there:
dependencies {
deploy project(':war')
earlib group: 'log4j', name: 'log4j', version: '1.2.15', ext: 'jar'
}
But both 'deploy' and 'earlib' configurations use other artifacts that are already tested. I guess there will be some test cases after this ticket is resolved: https://issues.gradle.org/browse/GRADLE-1637 But now all transitive dependencies in ear plugin need to handled manually so I can't think of any 'provided' related test cases.
Thanks for looking into this. We should be good for now. I can't think of another use case in conjunction with the EAR plugin either.
Let us know if you still run into issues with the WAR plugin.
We migrated part of the codebase to provided-base and everything's ok. Thanks again for the plugin and addressing the fixes!
Great! Thank you for fixing it.
Removing provided dependencies from War tasks runtime classpath. Fix problem with provided dependencies being included in war archive
Excluding provided dependencies from default configuration. Fix problem with provided dependencies transitively included when one project depends on another
Removing @Ignore annotation from relevant test cases