Gradle Eclipse WTP: war file is included in another war file
I have two web projects (wars) A and B. B depends on A. When I build B, A will be included as A.jar in WEB-INF B as expected.
I am also using Gradle eclipse and eclipseWtp plugins to create Eclipse projects. When I deploy B to Tomcat via Eclipse and browse the deployment directory, I find A.war instead of A.jar in B's WEB-INF directory . This obviously won't work. Also, if A has other JAR dependencies, even those not included in WEB-INF from B.
I created a simple test for this. It can be downloaded from the link below. Import projects to eclipse and deploy to tomcat via Eclipse. Then go to deployment location> WEB-INF / lib. You will find A.war there. There is no point in including a completely built war. I expected A.jar (and any jars that A 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: Testing Projects and Building Script
Gradle Version:
Gradle 2.4 Build Time: 2015-05-05 08:09:24 UTC Build Number: None View: 5c9c3bc20ca1c281ac7972643f1e2d190f2c943c
Groovy: 2.3.10 Ant: Apache Ant (TM) version 1.9.4, compiled on Apr 29, 2014 JVM: 1.8.0_40 (Oracle Corporation 25.40-b25) OS: Windows 7 6.1 amd64
source to share
No one has answered this question yet
See similar questions:
or similar: