java - Gradle Eclipse WTP: War file gets included in another war file -
i have 2 web (war) projects , b. b depends on a. when build b, gets included a.jar in web-inf of b expected.
i using gradle's eclipse , eclipsewtp plugins generate eclipse projects. when deploy b on tomcat via eclipse, , browse deployment directory, i find a.war instead of a.jar in b's web-inf directory. won't work. besides, if has other jar dependencies, not included in web-inf of b.
i have created simple test this. can downloaded link below. import projects in eclipse , deploy them tomcat via eclipse. go deployment location > web-inf/lib. find a.war there. makes no sense include built war there. expecting a.jar (and jars in turn depends on)
buildscript { repositories { jcenter() } } subprojects { apply plugin: 'java' apply plugin: 'war' apply plugin: 'eclipse-wtp' } project(':a') { } project(':b') { dependencies { compile project(':a') } } 

download link: test projects , build script
gradle version:
gradle 2.4 build time: 2015-05-05 08:09:24 utc build number: none revision: 5c9c3bc20ca1c281ac7972643f1e2d190f2c943c
groovy: 2.3.10 ant: apache ant(tm) version 1.9.4 compiled on april 29 2014 jvm: 1.8.0_40 (oracle corporation 25.40-b25) os: windows 7 6.1 amd64
Comments
Post a Comment