[GRADLE-2113] Error generating manifest in WAR where excluded dependencies are getting included Created: 21/Feb/12 Updated: 04/Jan/13 Resolved: 28/Feb/12 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | 1.0-milestone-7, 1.0-milestone-8, 1.0-milestone-8a |
Fix Version/s: | None |
Type: | Bug | ||
Reporter: | Gradle Forums | Assignee: | Szczepan Faber |
Resolution: | Not A Bug | Votes: | 0 |
Description |
I've upgraded from milestone-3 to milestone-8a and noticed a problem when I generate manifest files in a WAR. I set excludes for some of the transitive dependencies (like the JTA jar file), however in milestone-8a these excluded dependencies are getting included in the generated manifest file. I normally use a local Ivy repository (which does include the JTA) however for the purposes of a simple re-creatable the example below uses maven central. apply plugin: 'war' repositories { configurations { dependencies { warManifest group: 'cglib', name: 'cglib-nodep', version: '2.1_3' //hibernate has dependencies on older versions of these JAR's - override to use our versions warManifest ('org.hibernate:hibernate:3.2.5.ga') { warManifest (group: "org.hibernate", name: "hibernate-entitymanager", version: "3.3.1.ga", configuration: "default") { war { doFirst { .sort().join(' ') ) When I run the war task I get the error below. As you can see the error occurs resolving javax.transaction:jta:1.0.1B - which should have been excluded. This runs OK on milestone-3. Has something changed around the WAR task or the way excluded dependencies are managed? I've read through the release notes etc for all the releases between milestone-3 and 8 but didn't spot anything. F:\tmp\gradle-exclude-test>gradle clean war FAILURE: Build failed with an exception.
BUILD FAILED |
Comments |
Comment by Gradle Forums [ 21/Feb/12 ] |
I think this is a bug. I'm just replicating it with a simple example... |
Comment by Szczepan Faber [ 21/Feb/12 ] |
BTW. also reported here: http://support.gradleware.com/tickets/1158 |
Comment by Szczepan Faber [ 22/Feb/12 ] |
This is not a bug. I'll fix the documentation and once it's done I'll close this issue with a link to the docs. |
Comment by Szczepan Faber [ 27/Feb/12 ] |
Updated the documentation, see: http://gradle.org/docs/nightly/userguide/userguide_single.html#exclude-dependencies Also, I've updated the release notes to include this potential breaking change. |
Comment by Luke Daley [ 28/Feb/12 ] |
I've exported it to jira and I've narrowed down the example. |
Comment by Luke Daley [ 28/Feb/12 ] |
Thanks, is there a jira ticket I can watch? |
Comment by Luke Daley [ 28/Feb/12 ] |
Sure it's |